Bug 137393 - CSS Selectors Level 4: Implement :matches in SelectorChecker
Summary: CSS Selectors Level 4: Implement :matches in SelectorChecker
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-03 06:39 PDT by Yusuke Suzuki
Modified: 2014-10-16 22:34 PDT (History)
1 user (show)

See Also:


Attachments
Patch (7.71 KB, patch)
2014-10-14 19:20 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (98.62 KB, patch)
2014-10-15 23:31 PDT, Yusuke Suzuki
benjamin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2014-10-03 06:39:08 PDT
CSS Selectors Level 4: Implement :matches in SelectorChecker
Comment 1 Yusuke Suzuki 2014-10-14 19:20:13 PDT
Created attachment 239839 [details]
Patch
Comment 2 Yusuke Suzuki 2014-10-14 19:20:54 PDT
Added WIP patch, not enough tests are added, I'll add them later and update the patch.
Comment 3 Benjamin Poulain 2014-10-14 20:45:59 PDT
Woot! I can't wait :)
Comment 4 Yusuke Suzuki 2014-10-15 23:31:02 PDT
Created attachment 239931 [details]
Patch
Comment 5 Yusuke Suzuki 2014-10-15 23:33:29 PDT
(In reply to comment #3)
> Woot! I can't wait :)

Yay! Added initial implementation with test cases based on the not-selector-list test :)
In this implementation, pseudo element is not considered.
I'll create the issue for supporting that.
Comment 6 Benjamin Poulain 2014-10-16 21:36:46 PDT
Comment on attachment 239931 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=239931&action=review

Looks like a good start for the baseline, the patch looks correct to me.

I did not check the actual test results but the test themselves seem to cover the important use cases.

> Source/WebCore/ChangeLog:9
> +        In this current implementation, we don't consider about pseudo elements.

You can drop the "about".

> LayoutTests/fast/selectors/querySelector-matches.html:68
> +// When using querySelector, the pseudo element produces the unmatch.

"produces the unmatch" -> "cannot match"?
Comment 7 Yusuke Suzuki 2014-10-16 22:34:07 PDT
Comment on attachment 239931 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=239931&action=review

Thank you for your review! After landing this patch, I'll extend the SelectorChecker to annotate multiple pseudo elements at once.

>> Source/WebCore/ChangeLog:9
>> +        In this current implementation, we don't consider about pseudo elements.
> 
> You can drop the "about".

Thanks! Done.

>> LayoutTests/fast/selectors/querySelector-matches.html:68
>> +// When using querySelector, the pseudo element produces the unmatch.
> 
> "produces the unmatch" -> "cannot match"?

Right. I'll fix this to "the selectors containing the pseudo elements cannot match".
Comment 8 Yusuke Suzuki 2014-10-16 22:34:50 PDT
Committed r174811: <http://trac.webkit.org/changeset/174811>