RESOLVED WONTFIX Bug 55619
Stylesheet rule cssText is all lowercase
https://bugs.webkit.org/show_bug.cgi?id=55619
Summary Stylesheet rule cssText is all lowercase
Moxiecode Systems
Reported 2011-03-02 14:43:47 PST
Description: The stylesheet rules are forced into lowercase. It should retain the case that is specified in the CSS file. Steps to reproduce: 1. Open the attached url. 2. Click the test button. 3. Observe that the CSS rule text is all lowercase instead of the original values. Expected result: The CSS rule should be the same case as the one inside the stylesheet. Actual result: The CSS rule is forced into lowercase it's not impossible to get the original case for a class.
Attachments
modifed test case (533 bytes, text/html)
2011-09-16 00:13 PDT, Kishore Bolisetty
no flags
Ryosuke Niwa
Comment 1 2011-03-02 17:44:43 PST
I suspect that fixing this bug requires considerable amount of work.
Simon Fraser (smfr)
Comment 2 2011-03-02 17:51:48 PST
I don't think any spec requires that case is round-tripped.
Karthik Sarap
Comment 3 2011-07-05 03:08:38 PDT
This issue is because of the rule we have for class: in CSSGrammar.y in the following lines if (!p->m_strict) $2.lower(); While loading the page, the call flow is CSSStyleSheet::parseStringAtLine() => CSSParser::parseSheet()=> cssyyparse(this); And while parsing as per the above logic, we convert the class string to lower case if the parser is running in NON-strict mode We have verified that if we add DOCTYPE on top of my html (which makes the CSSParser in strict mode), the style class info is shown maintaining proper casing given in the html page. Therefore, Does any one know why do we have that logic(as mentioned above) of converting string to lowercase for non-strict mode in CSSGrammar.y? Based on this, we can decide whether or not to fix the issue
Eric Seidel (no email)
Comment 4 2011-07-05 10:28:21 PDT
It's a documented quirk of Mozilla's quirks mode: https://developer.mozilla.org/en/mozilla_quirks_mode_behavior
Eric Seidel (no email)
Comment 5 2011-07-05 10:29:13 PDT
Or rather the case-insensitivity is: In quirks mode css class names are case insensitive. In standards mode they are case sensitive.
Ryosuke Niwa
Comment 6 2011-07-05 10:31:26 PDT
class name is nothing to do with this bug. This bug is about cssText being lower case.
Mustafizur Rahaman (rahaman)
Comment 7 2011-07-05 23:11:59 PDT
(In reply to comment #5) > Or rather the case-insensitivity is: > > In quirks mode css class names are case insensitive. In standards mode they are case sensitive. My interpretation is if a html page does not mention any DOCTYPE, then it is by default quirks mode, correct? Then does it mean Mozilla has an issue here because in quirks mode also FF is respecting the CSS class names, which it should not do as per link given above?
Kishore Bolisetty
Comment 8 2011-09-16 00:13:46 PDT
Created attachment 107614 [details] modifed test case Attached the modifed test case . Just Added <!DOCTYPE html> to the actual test case.
Kishore Bolisetty
Comment 9 2011-09-16 00:17:27 PDT
http://www.w3.org/TR/html5-diff/#doctype In my opinion, the above link strengthens comments 5 & 7. As per the spec, browser need not render the page in standars mode unless <!DOCTYPE html> is mentioned. If I am correct, can some one move this to INVALID/WONTFIX state.
Note You need to log in before you can comment on or make changes to this bug.