Last Comment Bug 735481 - CSS class selector became case sensitive
: CSS class selector became case sensitive
Status: VERIFIED FIXED
[qa!]
: regression
Product: Core
Classification: Components
Component: CSS Parsing and Computation (show other bugs)
: 13 Branch
: x86 Windows 7
: P1 normal (vote)
: mozilla14
Assigned To: Boris Zbarsky [:bz]
:
Mentors:
Depends on:
Blocks: 705877
  Show dependency treegraph
 
Reported: 2012-03-13 15:18 PDT by Jack Eidsness
Modified: 2012-05-10 09:10 PDT (History)
8 users (show)
bzbarsky: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
-
verified


Attachments
quirks-class.html shows style selector matching inconsistently (608 bytes, text/html)
2012-03-13 15:18 PDT, Jack Eidsness
no flags Details
Skip ancestor filtering on IDs and classes in quirks mode, because that matching needs to be case-insensitive. (8.76 KB, patch)
2012-03-13 21:47 PDT, Boris Zbarsky [:bz]
dbaron: review+
akeybl: approval‑mozilla‑aurora+
Details | Diff | Review

Description Jack Eidsness 2012-03-13 15:18:55 PDT
Created attachment 605561 [details]
quirks-class.html shows style selector matching inconsistently

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:13.0) Gecko/20120313 Firefox/13.0a1
Build ID: 20120313090404

Steps to reproduce:

I am up-to-date with the latest windows 64 bit nightly, and noticed some CSS styles stopped working.  I have a mixed case class name, which works for one element but doesn't work in a second more complicated selector where a style needs to be applied to a child element of the one with the class. I'm attaching an example.


Actual results:

The style was applied if case matches perfectly.


Expected results:

The style is supposed to be applied.
Comment 1 Alice0775 White 2012-03-13 18:43:07 PDT
Works:
http://hg.mozilla.org/integration/mozilla-inbound/rev/6799a5e6912f
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120312 Firefox/13.0a1 ID:20120312224507
Fails:
http://hg.mozilla.org/integration/mozilla-inbound/rev/4bd80687cb32
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120312 Firefox/13.0a1 ID:20120312225607
Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=6799a5e6912f&tochange=4bd80687cb32
Comment 2 Boris Zbarsky [:bz] 2012-03-13 20:53:25 PDT
Gah.  How could we not have a testcase for this?

This is definitely a regression from bug 705877.
Comment 3 Boris Zbarsky [:bz] 2012-03-13 21:47:33 PDT
Created attachment 605656 [details] [diff] [review]
Skip ancestor filtering on IDs and classes in quirks mode, because that matching needs to be case-insensitive.
Comment 4 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2012-03-13 21:50:07 PDT
Comment on attachment 605656 [details] [diff] [review]
Skip ancestor filtering on IDs and classes in quirks mode, because that matching needs to be case-insensitive.

r=dbaron
Comment 5 Boris Zbarsky [:bz] 2012-03-13 22:44:56 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/c1c473ede628

Jack, thank you for finding this and reporting it!
Comment 6 Boris Zbarsky [:bz] 2012-03-13 22:47:33 PDT
Comment on attachment 605656 [details] [diff] [review]
Skip ancestor filtering on IDs and classes in quirks mode, because that matching needs to be case-insensitive.

[Approval Request Comment]
Regression caused by (bug #): bug 705877
User impact if declined: Incorrect CSS selector matching on some quirks-mode
                         pages.
Testing completed (on m-c, etc.): Passes attached testcase and new regression
                                  test.
Risk to taking this patch (and alternatives if risky): Risk is very low.  This
   simply disables, in quirks mode, part of the optimization added in bug
   705877 that happens to not be valid in quirk mode as things stand.  If we
   don't approve this patch, we should back out bug 705877 from aurora, but
   that will bring back the performance issues on a number of sites that the
   patch in that bug fixed.
String changes made by this patch: None.
Comment 7 Jack Eidsness 2012-03-14 14:16:16 PDT
My pleasure! Thanks for all the work you all do :)
Comment 8 Marco Bonardo [::mak] 2012-03-15 07:54:59 PDT
https://hg.mozilla.org/mozilla-central/rev/c1c473ede628
Comment 9 Alex Keybl [:akeybl] 2012-03-15 14:37:19 PDT
Comment on attachment 605656 [details] [diff] [review]
Skip ancestor filtering on IDs and classes in quirks mode, because that matching needs to be case-insensitive.

[Triage Comment]
Approved for Aurora 13 - we think there's enough time left in the release cycle to shake out any regressions.
Comment 10 Boris Zbarsky [:bz] 2012-03-15 15:20:43 PDT
http://hg.mozilla.org/releases/mozilla-aurora/rev/3b2d0342130a

Thanks for the quick approval!
Comment 11 Ioana (away) 2012-05-10 09:10:08 PDT
Verified the issue as fixed on Firefox 13.0 beta 3 (BuildID: 20120509070325) using the test case attached by the reporter.

Note You need to log in before you can comment on or make changes to this bug.