[webkit-dev] Bug ID:23744

taruchhaya singh taruchhaya at rediffmail.com
Thu Feb 19 05:23:28 PST 2009


Hi,

I am analyzing the Bug ID: 23744:: stylesheet not applied because css file not parsed correctly if it contains comments and charset.
https://bugs.webkit.org/show_bug.cgi?id=23744

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:



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.

Regards,
Taruchhaya  


On Sun, 15 Feb 2009 13:09:48 +0530  wrote
>Hi,
>
>Need some clarifications regrading the Bug ID: 23744:: stylesheet not applied because css file not parsed correctly if it contains comments and charset
>https://bugs.webkit.org/show_bug.cgi?id=23744
>
>I am looking into Bug ID:23744, is this bug is open/valid ? Want to know the current status?
>
>I have done some analysis on this bug.My observations are:
>
>Problem found:
>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-align: 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. 
>
>If i will remove the very first statement in leftframe.css i.e,/* Dfinition de rgle */, it is working fine.
>
>2) Even after fixing the above issue, bug is in "Link Tag".
>Reason::Link Tag is not able to open/recognize the externally linked CSS:
>      
>       
>
>"Safari" browser is not able to link the leftframe.css.But IE is able to link.
>
>Please provide me the status and suggest on the above issue.
>
>Thanks & Regards,
>Taruchhaya
>
>
>
>_______________________________________________
>webkit-dev mailing list
>webkit-dev at lists.webkit.org
>http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20090219/be60b34b/attachment.html>


More information about the webkit-dev mailing list