Summary: | Attribute selectors don't handle glob namespaces (e.g. *|E) | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Sam Weinig <sam> | ||||||||
Component: | CSS | Assignee: | Sam Weinig <sam> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | mitz, webkit.review.bot | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Sam Weinig
2011-07-14 15:59:31 PDT
It seems like the issue stems from call to Element::getAttribute() in CSSStyleSelector::SelectorChecker::checkOneSelector not taking into account the *. We probably need a version of Element::getAttribute that does this using the semantics we want. Created attachment 100919 [details] WIP Patch Attaching a WIP patch which fixes the test case (and a few test cases @ http://www.w3.org/Style/CSS/Test/CSS3/Selectors/current/ in xhtml mode). I may want to check that suite in before landing this, or, maybe I will just write some more dedicated tests including testing querySelectorAll. Attachment 100919 [details] did not pass style-queue:
Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/css/CSSStyleSelector.cpp']" exit_code: 1
Source/WebCore/css/CSSStyleSelector.cpp:2416: Non-label code inside switch statements should be indented. [whitespace/indent] [4]
Source/WebCore/css/CSSStyleSelector.cpp:2426: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5]
Total errors found: 2 in 1 files
If any of these errors are false positives, please file a bug against check-webkit-style.
I decided to land the selectors test suite after all (see https://bugs.webkit.org/show_bug.cgi?id=64610) so that provides a good test bed. Created attachment 101047 [details]
Patch
Committed r91151: <http://trac.webkit.org/changeset/91151> |