[Webkit-unassigned] [Bug 23744] stylesheet not applied because css file not parsed correctly if it contains comments and charset

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 20 05:07:05 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=23744





------- Comment #3 from taruchhaya at rediffmail.com  2009-02-20 05:07 PDT -------
I have done some analysis on this bug.My observations are:

1) "leftframe.css" :: Issue is caused by the css file not being applied
correctly because of the /*comment*/ and @charset in its contents. The css file
looks like: 
/* Dfinition de rgle */
@charset "iso-8859-1";
.leftframe {color: 0067c6; font-family: "Times New Roman", Times, serif;
font-size: 10px; font-weight: bold; line-height: normal; text-lign: center}

Reason::The @charset At-Rule is allowed to occur only once in an external style
sheet and it must be the very first statement in the style sheet. 

QUERIES:
1) "/*comment*/" is a valid CSS statement, which is escaped/ignored while
executing the code. So shouldn't the same approach be followed in this case and
@charset should be considered/honored.

While debugging the Grammar.y, I found that "/*comment*/" is not the issue. The
issue is in "/r" & "/n" after the comment, which is forcing the parser to
consider the rest of the document as an invalid rule.

2) I also found another issue in this bug,i.e. in "Link Tag".
Reason:: In Safari, Link Tag is not able to open/recognize the externally
linked CSS file. 
As, HTML document contains the following snippet for link tag:
<link href="leftframe.css" rel="stylesheet" type="text/css">
<link href="../leftframe.css" rel="stylesheet" type="text/css"> 

Here, In second link statement: "../leftframe.css" is invalid because it is
trying to access the .css file from the root level, which is not available,
webkit should check this condition and then resolve it by appending to the base
URI just like how IE does.

Please provide me some suggestions on the above issues.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list