version 1.310, 2005/05/23 12:26:56
|
version 1.311, 2005/05/25 06:56:08
|
Line 68 CSSProperty;
|
Line 68 CSSProperty;
|
static char *DocURL = NULL; /* The parsed CSS file */ |
static char *DocURL = NULL; /* The parsed CSS file */ |
static int LineNumber = -1; /* The line where the error occurs */ |
static int LineNumber = -1; /* The line where the error occurs */ |
static int NewLineSkipped = 0; |
static int NewLineSkipped = 0; |
static ThotBool Style_parsing = FALSE; /* TRUE when parsing a set of CSS rules */ |
static int RedisplayImages = 0; /* number of BG images loading */ |
|
static int RedisplayDoc = 0; /* document to be redisplayed */ |
|
static int Style_parsing = 0; /* > 0 when parsing a set of CSS rules */ |
static ThotBool RedisplayBGImage = FALSE; /* TRUE when a BG image is inserted */ |
static ThotBool RedisplayBGImage = FALSE; /* TRUE when a BG image is inserted */ |
static ThotBool DoApply = TRUE; |
static ThotBool DoApply = TRUE; |
|
|
Line 1828 void ParseCSSImageCallback (Document doc
|
Line 1830 void ParseCSSImageCallback (Document doc
|
} |
} |
|
|
TtaFreeMemory (callblock); |
TtaFreeMemory (callblock); |
/* restore the display mode */ |
RedisplayImages--; |
if (doc) |
if (doc) |
{ |
{ |
if (dispMode == DisplayImmediately) |
if (dispMode == DisplayImmediately) |
|
/* restore the display mode */ |
TtaSetDisplayMode (doc, dispMode); |
TtaSetDisplayMode (doc, dispMode); |
} |
} |
else if (css && !Style_parsing) |
else if (css && Style_parsing == 0 && RedisplayImages == 0 && RedisplayDoc) |
{ |
{ |
/* all background images are now loaded */ |
/* all background images are now loaded */ |
for (doc = 1; doc < DocumentTableLength; doc++) |
//for (doc = 1; doc < DocumentTableLength; doc++) |
if (css->infos[doc] && |
doc = RedisplayDoc; |
/* don't manage a document used by make book */ |
if (css->infos[doc] && |
(DocumentMeta[doc] == NULL || |
/* don't manage a document used by make book */ |
DocumentMeta[doc]->method != CE_MAKEBOOK)) |
(DocumentMeta[doc] == NULL || |
{ |
DocumentMeta[doc]->method != CE_MAKEBOOK)) |
pInfo = css->infos[doc]; |
{ |
enabled = FALSE; |
pInfo = css->infos[doc]; |
while (pInfo && !enabled) |
enabled = FALSE; |
{ |
while (pInfo && !enabled) |
enabled = pInfo->PiEnabled; |
{ |
pInfo = pInfo->PiNext; |
enabled = pInfo->PiEnabled; |
} |
pInfo = pInfo->PiNext; |
/* Change the Display Mode to take into account the new |
} |
presentation */ |
/* Change the Display Mode to take into account the new |
dispMode = TtaGetDisplayMode (doc); |
presentation */ |
if (dispMode == DisplayImmediately) |
dispMode = TtaGetDisplayMode (doc); |
{ |
if (dispMode == DisplayImmediately) |
/* @@@@@@@@@@@@ force the redisplay of this box */ |
{ |
TtaSetDisplayMode (doc, NoComputedDisplay); |
/* force the redisplay of this box */ |
/* Restore the display mode */ |
TtaSetDisplayMode (doc, NoComputedDisplay); |
TtaSetDisplayMode (doc, dispMode); |
TtaSetDisplayMode (doc, dispMode); |
} |
} |
} |
RedisplayBGImage = FALSE; |
|
} |
} |
} |
else |
else |
RedisplayBGImage = TRUE; |
RedisplayBGImage = TRUE; |
Line 1912 static char *SetCSSImage (Element elemen
|
Line 1916 static char *SetCSSImage (Element elemen
|
callblock->ruleType = ruleType; |
callblock->ruleType = ruleType; |
/* new use of the context */ |
/* new use of the context */ |
ctxt->uses += 1; |
ctxt->uses += 1; |
|
RedisplayImages++; |
/* check if the image url is related to an external CSS */ |
/* check if the image url is related to an external CSS */ |
if (css) |
if (css) |
{ |
{ |
|
RedisplayDoc = ctxt->doc; |
if (css->url) |
if (css->url) |
/* the image concerns a CSS file */ |
/* the image concerns a CSS file */ |
NormalizeURL (url, 0, tempname, imgname, css->url); |
NormalizeURL (url, 0, tempname, imgname, css->url); |
Line 6220 char ReadCSSRules (Document docRef, CSSI
|
Line 6226 char ReadCSSRules (Document docRef, CSSI
|
index = 0; |
index = 0; |
base = NULL; |
base = NULL; |
/* entering the CSS parsing */ |
/* entering the CSS parsing */ |
Style_parsing = TRUE; |
Style_parsing++; |
screentype = TtaGetEnvString ("SCREEN_TYPE"); |
screentype = TtaGetEnvString ("SCREEN_TYPE"); |
/* number of new lines parsed */ |
/* number of new lines parsed */ |
newlines = 0; |
newlines = 0; |
Line 6565 char ReadCSSRules (Document docRef, CSSI
|
Line 6571 char ReadCSSRules (Document docRef, CSSI
|
} |
} |
} |
} |
/* closing the CSS parsing */ |
/* closing the CSS parsing */ |
Style_parsing = FALSE; |
Style_parsing--; |
|
if (Style_parsing == 0 && RedisplayImages == 0 && RedisplayBGImage) |
/* restore the display mode */ |
|
if (RedisplayBGImage) |
|
{ |
{ |
|
/* CSS parsing finishes after a BG image was loaded */ |
RedisplayBGImage = FALSE; |
RedisplayBGImage = FALSE; |
|
RedisplayDoc = 0; |
TtaSetDisplayMode (docRef, NoComputedDisplay); |
TtaSetDisplayMode (docRef, NoComputedDisplay); |
} |
|
if (dispMode == DisplayImmediately) |
|
{ |
|
TtaSetDisplayMode (docRef, dispMode); |
TtaSetDisplayMode (docRef, dispMode); |
} |
} |
|
else if (dispMode == DisplayImmediately) |
|
/* restore the display mode */ |
|
TtaSetDisplayMode (docRef, dispMode); |
|
|
/* Prepare the context for style attributes */ |
/* Prepare the context for style attributes */ |
DocURL = DocumentURLs[docRef]; |
DocURL = DocumentURLs[docRef]; |