version 1.144, 2002/07/16 17:56:46
|
version 1.145, 2002/07/22 07:51:00
|
Line 4818 void ApplyCSSRules (Element el, char *cs
|
Line 4818 void ApplyCSSRules (Element el, char *cs
|
} |
} |
|
|
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
ReadCSSRules: is the front-end function called by the HTML parser |
ReadCSSRules: is the front-end function called by the document parser |
when detecting a <STYLE TYPE="text/css"> indicating it's the |
when detecting a <style type="text/css"> indicating it's the |
beginning of a CSS fragment or when reading a file .css. |
beginning of a CSS fragment or when reading a file .css. |
|
|
The CSS parser has to handle <!-- ... --> constructs used to |
The CSS parser has to handle <!-- ... --> constructs used to |
prevent prehistoric browser from displaying the CSS as a text |
prevent prehistoric browser from displaying the CSS as a text |
content. It will stop on any sequence "<x" where x is different |
content. It will stop on any sequence "<x" where x is different |
from ! and will return x as to the caller. Theorically x should |
from ! and will return x as to the caller. Theorically x should |
be equal to / for the </STYLE> end of style. |
be equal to / for the </style> end of style. |
|
|
The parameter doc gives the document tree that contains CSS information. |
The parameter doc gives the document tree that contains CSS information. |
The parameter docRef gives the document to which CSS are to be applied. |
The parameter docRef gives the document to which CSS are to be applied. |
This function uses the current css context or creates it. It's able |
This function uses the current css context or creates it. It's able |
Line 4837 void ApplyCSSRules (Element el, char *cs
|
Line 4836 void ApplyCSSRules (Element el, char *cs
|
Parameter numberOfLinesRead indicates the number of lines already |
Parameter numberOfLinesRead indicates the number of lines already |
read in the file. |
read in the file. |
Parameter withUndo indicates whether the changes made in the document |
Parameter withUndo indicates whether the changes made in the document |
structure and content have to be registered in the Undo queue or not |
structure and content have to be registered in the Undo queue or not. |
|
refElement is the element (image or use, for instance) that references |
|
the document containing the style element to be parsed. |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
char ReadCSSRules (Document docRef, CSSInfoPtr css, char *buffer, char *url, |
char ReadCSSRules (Document docRef, CSSInfoPtr css, char *buffer, char *url, |
int numberOfLinesRead, ThotBool withUndo, |
int numberOfLinesRead, ThotBool withUndo, |
Element styleElement) |
Element styleElement, Element refElement) |
{ |
{ |
DisplayMode dispMode; |
DisplayMode dispMode; |
char c; |
char c; |
Line 4885 char ReadCSSRules (Document docRef, CSSI
|
Line 4886 char ReadCSSRules (Document docRef, CSSI
|
if (css == NULL) |
if (css == NULL) |
css = AddCSS (docRef, docRef, CSS_DOCUMENT_STYLE, NULL, NULL, |
css = AddCSS (docRef, docRef, CSS_DOCUMENT_STYLE, NULL, NULL, |
styleElement); |
styleElement); |
|
if (css) |
|
css->refEl = refElement; |
|
|
/* register parsed CSS file and the document to which CSS are to be applied*/ |
/* register parsed CSS file and the document to which CSS are to be applied*/ |
ParsedDoc = docRef; |
ParsedDoc = docRef; |