Bug 137417 - Add a deprecation warning for Element.webkitMatchesSelector
Summary: Add a deprecation warning for Element.webkitMatchesSelector
Status: RESOLVED LATER
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Benjamin Poulain
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-03 20:46 PDT by Benjamin Poulain
Modified: 2014-10-06 13:48 PDT (History)
6 users (show)

See Also:


Attachments
Patch (3.28 KB, patch)
2014-10-03 20:49 PDT, Benjamin Poulain
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2 (631.83 KB, application/zip)
2014-10-03 22:11 PDT, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-03 for mac-mountainlion (653.09 KB, application/zip)
2014-10-03 22:52 PDT, Build Bot
no flags Details
Patch (17.38 KB, patch)
2014-10-04 00:31 PDT, Benjamin Poulain
cdumez: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Poulain 2014-10-03 20:46:02 PDT
Add a deprecation warning for Element.webkitMatchesSelector
Comment 1 Benjamin Poulain 2014-10-03 20:49:15 PDT
Created attachment 239261 [details]
Patch
Comment 2 Build Bot 2014-10-03 22:11:10 PDT
Comment on attachment 239261 [details]
Patch

Attachment 239261 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/6194595117400064

New failing tests:
jquery/data.html
jquery/deferred.html
jquery/manipulation.html
jquery/core.html
fast/dom/SelectorAPI/undefined-null-stringify.html
jquery/css.html
jquery/offset.html
fast/dom/SelectorAPI/detached-element.html
jquery/event.html
jquery/traversing.html
fast/dom/SelectorAPI/caseID.html
fast/dom/SelectorAPI/caseID-almost-strict.html
jquery/attributes.html
jquery/dimensions.html
fast/dom/SelectorAPI/attrname-case-sensitive.xhtml
fast/forms/radio/radio-live-validation-style.html
fast/dom/SelectorAPI/caseTag.html
fast/dom/SelectorAPI/caseTagX.xhtml
fast/dom/SelectorAPI/caseID-strict.html
fast/dom/SelectorAPI/not-supported-namespace-in-selector.html
fast/dom/SelectorAPI/attrname-case-insensitive.html
Comment 3 Build Bot 2014-10-03 22:11:12 PDT
Created attachment 239263 [details]
Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-12  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 4 Benjamin Poulain 2014-10-03 22:39:08 PDT
Comment on attachment 239261 [details]
Patch

Arg, of course.
Comment 5 Build Bot 2014-10-03 22:52:15 PDT
Comment on attachment 239261 [details]
Patch

Attachment 239261 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/5009325072318464

New failing tests:
jquery/data.html
jquery/deferred.html
jquery/manipulation.html
jquery/core.html
fast/dom/SelectorAPI/undefined-null-stringify.html
jquery/css.html
jquery/offset.html
fast/dom/SelectorAPI/detached-element.html
jquery/event.html
jquery/traversing.html
fast/dom/SelectorAPI/caseID.html
fast/dom/SelectorAPI/caseID-almost-strict.html
jquery/attributes.html
jquery/dimensions.html
fast/dom/SelectorAPI/attrname-case-sensitive.xhtml
fast/forms/radio/radio-live-validation-style.html
fast/dom/SelectorAPI/caseTag.html
fast/dom/SelectorAPI/caseTagX.xhtml
fast/dom/SelectorAPI/caseID-strict.html
fast/dom/SelectorAPI/not-supported-namespace-in-selector.html
fast/dom/SelectorAPI/attrname-case-insensitive.html
Comment 6 Build Bot 2014-10-03 22:52:18 PDT
Created attachment 239266 [details]
Archive of layout-test-results from webkit-ews-03 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-03  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 7 Benjamin Poulain 2014-10-04 00:31:59 PDT
Created attachment 239270 [details]
Patch
Comment 8 Chris Dumez 2014-10-04 22:57:15 PDT
Comment on attachment 239270 [details]
Patch

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

> Source/WebCore/ChangeLog:12
> +        This patch add a deprecation warning for Element.webkitMatchesSelector with the hope

Nit: "adds"

> LayoutTests/jquery/resources/src/sizzle/sizzle.js:1203
> +		matches = html.matches || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector,

I don't know what's the policy about editing scripts in the jquery folder. Aren't we supposed to keep it matching upstream?
Comment 9 Chris Dumez 2014-10-04 22:57:28 PDT
r=me
Comment 10 Benjamin Poulain 2014-10-04 23:22:34 PDT
Thanks for the review.

(In reply to comment #8)
> > LayoutTests/jquery/resources/src/sizzle/sizzle.js:1203
> > +		matches = html.matches || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector,
> 
> I don't know what's the policy about editing scripts in the jquery folder. Aren't we supposed to keep it matching upstream?

Yep, that's indeed the policy.

I am doing an exception here because:
-Updating the jquery tests is out of scope for this patch.
-The real sizzle has been updated a long time ago (https://github.com/jquery/sizzle/blob/master/src/sizzle.js#L672). Better keep the test coverage for everything else.
Comment 11 Benjamin Poulain 2014-10-05 19:09:14 PDT
Committed r174336: <http://trac.webkit.org/changeset/174336>
Comment 12 Csaba Osztrogonác 2014-10-06 03:26:07 PDT
(In reply to comment #11)
> Committed r174336: <http://trac.webkit.org/changeset/174336>

It broke 5 performance tests because of jquery:

Running Dromaeo/cssquery-jquery.html (49 of 140)
ERROR: CONSOLE MESSAGE: Element.webkitMatchesSelector is deprecated. Use Element.matches instead.
FAILED
Finished: 181.807474 s

Running Dromaeo/jslib-attr-jquery.html (61 of 140)
ERROR: CONSOLE MESSAGE: Element.webkitMatchesSelector is deprecated. Use Element.matches instead.
FAILED
Finished: 31.081577 s

Running Dromaeo/jslib-event-jquery.html (63 of 140)
ERROR: CONSOLE MESSAGE: Element.webkitMatchesSelector is deprecated. Use Element.matches instead.
FAILED
Finished: 34.961821 s

Running Dromaeo/jslib-style-jquery.html (66 of 140)
ERROR: CONSOLE MESSAGE: Element.webkitMatchesSelector is deprecated. Use Element.matches instead.
FAILED
Finished: 41.230456 s

Running Dromaeo/jslib-traverse-jquery.html (68 of 140)
ERROR: CONSOLE MESSAGE: Element.webkitMatchesSelector is deprecated. Use Element.matches instead.
FAILED
Finished: 41.187652 s
Comment 13 Benjamin Poulain 2014-10-06 10:19:24 PDT
(In reply to comment #12)
> (In reply to comment #11)
> > Committed r174336: <http://trac.webkit.org/changeset/174336>
> 
> It broke 5 performance tests because of query.

Thanks for tracking that. We should find if the real Dromaeo uses webkitMatchesSelector. If it does, we'll have to revert this deprecation warning :(
Comment 14 Carlos Alberto Lopez Perez 2014-10-06 13:35:34 PDT
(In reply to comment #12)
> (In reply to comment #11)
> > Committed r174336: <http://trac.webkit.org/changeset/174336>
> 
> It broke 5 performance tests because of jquery:
> 

After r174359 <http://trac.webkit.org/r174359> fixed the crash on the performance test Speedometer/Full.html, this test is also failing with the same output.

$ Tools/Scripts/run-perf-tests  --platform gtk --release -2 Speedometer/Full.html
Running 1 tests
Running Speedometer/Full.html (1 of 1)
ERROR: CONSOLE MESSAGE: Element.webkitMatchesSelector is deprecated. Use Element.matches instead.
FAILED
Finished: 77.595549 s

So, the number of tests broken is 6.
Comment 15 Benjamin Poulain 2014-10-06 13:45:08 PDT
Committed r174363: <http://trac.webkit.org/changeset/174363>
Comment 16 Benjamin Poulain 2014-10-06 13:48:14 PDT
The original tests still use an old sizzle. I reverted the patch :(