RESOLVED FIXED 64567
Attribute selectors don't handle glob namespaces (e.g. *|E)
https://bugs.webkit.org/show_bug.cgi?id=64567
Summary Attribute selectors don't handle glob namespaces (e.g. *|E)
Sam Weinig
Reported 2011-07-14 15:59:31 PDT
Created attachment 100882 [details] Test case We don't seem to support glob namespaces for attributes selectors as specified in Selectors Level 3 (http://www.w3.org/TR/css3-selectors/#attrnmsp). We should, Firefox does.
Attachments
Test case (656 bytes, application/xhtml+xml)
2011-07-14 15:59 PDT, Sam Weinig
no flags
WIP Patch (7.43 KB, patch)
2011-07-14 19:58 PDT, Sam Weinig
no flags
Patch (1.82 MB, patch)
2011-07-15 14:48 PDT, Sam Weinig
andersca: review+
Sam Weinig
Comment 1 2011-07-14 15:59:45 PDT
Sam Weinig
Comment 2 2011-07-14 16:30:00 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.
Sam Weinig
Comment 3 2011-07-14 19:58:33 PDT
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.
WebKit Review Bot
Comment 4 2011-07-14 20:01:22 PDT
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.
Sam Weinig
Comment 5 2011-07-15 14:28:46 PDT
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.
Sam Weinig
Comment 6 2011-07-15 14:48:59 PDT
Sam Weinig
Comment 7 2011-07-16 12:07:26 PDT
Note You need to log in before you can comment on or make changes to this bug.