Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Issue 396283004: Make the MediaQueryList listener an EventListener (Closed)

Created:
6 years, 5 months ago by cbiesinger
Modified:
6 years, 3 months ago
CC:
abarth-chromium, darktears, apavlov+blink_chromium.org, arv+blink, blink-reviews, blink-reviews-bindings_chromium.org, blink-reviews-css, blink-reviews-dom_chromium.org, blink-reviews-events_chromium.org, blink-reviews-html_chromium.org, Inactive, dglazkov+blink, eae+blinkwatch, ed+blinkwatch_opera.com, kenneth.christiansen, rwlbuis, rune+blink, sof, Yoav Weiss
Project:
blink
Visibility:
Public.

Description

Make the MediaQueryList listener an EventListener The spec changed from a callback to using DOM events, update our code accordingly. See the note at http://dev.w3.org/csswg/cssom-view/#dom-mediaquerylist-removelistener for how this is compatible with existing content. BUG=375658 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=181124

Patch Set 1 #

Patch Set 2 : forgot a git add #

Patch Set 3 : argh, forgot a --reset-results #

Total comments: 1

Patch Set 4 : rebased #

Patch Set 5 : minor fixes #

Patch Set 6 : rebased #

Patch Set 7 : self-contained patch again #

Patch Set 8 : retry due to timeout error #

Patch Set 9 : hasPendingActivity needs to check for event listeners too #

Patch Set 10 : rebased #

Total comments: 16

Patch Set 11 : remove js code from mediaquerylistlistener #

Patch Set 12 : changes made #

Patch Set 13 : using DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED #

Patch Set 14 : rebased #

Patch Set 15 : rebased #

Total comments: 11

Patch Set 16 : fix review comments #

Total comments: 2

Patch Set 17 : fix tests #

Patch Set 18 : review comment #

Patch Set 19 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+201 lines, -107 lines) Patch
M LayoutTests/fast/media/media-query-list-listener.html View 1 chunk +2 lines, -1 line 0 comments Download
M LayoutTests/fast/media/media-query-list-listener-expected.txt View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M LayoutTests/virtual/stable/webexposed/global-constructors-listing-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/webexposed/global-constructors-listing-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/scripts/v8_types.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +0 lines, -4 lines 0 comments Download
M Source/bindings/templates/methods.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +7 lines, -6 lines 0 comments Download
M Source/bindings/tests/idls/TestObject.idl View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +0 lines, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestObject.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +0 lines, -25 lines 0 comments Download
M Source/core/core.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +3 lines, -0 lines 0 comments Download
M Source/core/css/MediaQueryList.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +18 lines, -2 lines 0 comments Download
M Source/core/css/MediaQueryList.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +28 lines, -12 lines 0 comments Download
M Source/core/css/MediaQueryList.idl View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +12 lines, -3 lines 0 comments Download
A Source/core/css/MediaQueryListEvent.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +93 lines, -0 lines 0 comments Download
A + Source/core/css/MediaQueryListEvent.idl View 1 2 3 4 6 1 chunk +5 lines, -3 lines 0 comments Download
M Source/core/css/MediaQueryListListener.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +1 line, -17 lines 0 comments Download
M Source/core/css/MediaQueryListListener.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +0 lines, -24 lines 0 comments Download
M Source/core/css/MediaQueryListTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +10 lines, -4 lines 0 comments Download
M Source/core/css/MediaQueryMatcher.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +8 lines, -2 lines 0 comments Download
M Source/core/dom/Document.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/dom/Document.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +5 lines, -1 line 0 comments Download
M Source/core/events/EventTargetFactory.in View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 34 (1 generated)
cbiesinger
6 years, 5 months ago (2014-07-16 22:14:21 UTC) #1
cbiesinger
Hmm, do I need to make this an ActiveDOMObject now?
6 years, 5 months ago (2014-07-16 22:15:23 UTC) #2
haraken
The bindings/ looks good. Can we split the change to implement MediaQueryListEvent out of this ...
6 years, 5 months ago (2014-07-17 01:47:26 UTC) #3
cbiesinger
On 2014/07/17 01:47:26, haraken wrote: > The bindings/ looks good. > > Can we split ...
6 years, 5 months ago (2014-07-17 03:22:41 UTC) #4
cbiesinger
(see the note at http://dev.w3.org/csswg/cssom-view/#dom-mediaquerylist-removelistener for some more details; I've updated the CL description a ...
6 years, 5 months ago (2014-07-17 03:27:57 UTC) #5
cbiesinger
I've now split this up into more CLs, and rebased this CL so that it ...
6 years, 5 months ago (2014-07-17 20:41:20 UTC) #6
cbiesinger
6 years, 5 months ago (2014-07-18 00:01:01 UTC) #7
cbiesinger
On 2014/07/16 22:15:23, cbiesinger wrote: > Hmm, do I need to make this an ActiveDOMObject ...
6 years, 5 months ago (2014-07-18 00:01:33 UTC) #8
haraken
Thanks for the split, but I'm not really happy about landing code that is not ...
6 years, 5 months ago (2014-07-18 01:15:38 UTC) #9
cbiesinger
On 2014/07/18 01:15:38, haraken wrote: > Thanks for the split, but I'm not really happy ...
6 years, 5 months ago (2014-07-19 01:19:08 UTC) #10
cbiesinger
On 2014/07/19 01:19:08, cbiesinger wrote: > On 2014/07/18 01:15:38, haraken wrote: > > Thanks for ...
6 years, 5 months ago (2014-07-19 01:23:09 UTC) #11
haraken
I understand it's hard to split this CL... I'm sorry about taking your time on ...
6 years, 5 months ago (2014-07-20 05:14:49 UTC) #12
cbiesinger
Changes made. I've also simplified MediaQueryListListener now that it does not have to handle JavaScript. ...
6 years, 5 months ago (2014-07-21 22:07:19 UTC) #13
haraken
https://codereview.chromium.org/396283004/diff/180001/Source/core/css/MediaQueryList.cpp File Source/core/css/MediaQueryList.cpp (right): https://codereview.chromium.org/396283004/diff/180001/Source/core/css/MediaQueryList.cpp#newcode72 Source/core/css/MediaQueryList.cpp:72: void MediaQueryList::addMediaQueryListListener(PassRefPtrWillBeRawPtr<MediaQueryListListener> listener) On 2014/07/21 22:07:19, cbiesinger wrote: > ...
6 years, 5 months ago (2014-07-22 01:30:14 UTC) #14
esprehn
Is this ready for review? I'm not sure the state of all the broken up ...
6 years, 4 months ago (2014-08-01 14:15:10 UTC) #15
haraken
This is ready for review.
6 years, 4 months ago (2014-08-01 14:38:53 UTC) #16
cbiesinger
Maybe I could move the bindings cleanup to a separate CL, if that would help?
6 years, 4 months ago (2014-08-06 23:31:13 UTC) #17
haraken
On 2014/08/06 23:31:13, cbiesinger wrote: > Maybe I could move the bindings cleanup to a ...
6 years, 4 months ago (2014-08-06 23:53:29 UTC) #18
esprehn
We should use a separate interface for C++ listeners. DOM events are dangerous because the ...
6 years, 4 months ago (2014-08-06 23:59:56 UTC) #19
cbiesinger
On 2014/08/06 23:59:56, esprehn wrote: > We should use a separate interface for C++ listeners. ...
6 years, 4 months ago (2014-08-07 01:12:07 UTC) #20
esprehn
lgtm https://codereview.chromium.org/396283004/diff/280001/Source/core/css/MediaQueryList.cpp File Source/core/css/MediaQueryList.cpp (right): https://codereview.chromium.org/396283004/diff/280001/Source/core/css/MediaQueryList.cpp#newcode64 Source/core/css/MediaQueryList.cpp:64: addEventListener("change", listener, false); EventTypeNames::change https://codereview.chromium.org/396283004/diff/280001/Source/core/css/MediaQueryList.cpp#newcode69 Source/core/css/MediaQueryList.cpp:69: removeEventListener("change", listener.get(), ...
6 years, 4 months ago (2014-08-13 22:48:36 UTC) #21
cbiesinger
https://codereview.chromium.org/396283004/diff/280001/Source/core/css/MediaQueryList.cpp File Source/core/css/MediaQueryList.cpp (right): https://codereview.chromium.org/396283004/diff/280001/Source/core/css/MediaQueryList.cpp#newcode64 Source/core/css/MediaQueryList.cpp:64: addEventListener("change", listener, false); On 2014/08/13 22:48:36, esprehn wrote: > ...
6 years, 4 months ago (2014-08-16 00:00:47 UTC) #22
cbiesinger
https://codereview.chromium.org/396283004/diff/280001/Source/core/css/MediaQueryList.cpp File Source/core/css/MediaQueryList.cpp (right): https://codereview.chromium.org/396283004/diff/280001/Source/core/css/MediaQueryList.cpp#newcode69 Source/core/css/MediaQueryList.cpp:69: removeEventListener("change", listener.get(), false); On 2014/08/16 00:00:47, cbiesinger wrote: > ...
6 years, 4 months ago (2014-08-16 00:01:15 UTC) #23
cbiesinger
The CQ bit was checked by cbiesinger@chromium.org
6 years, 4 months ago (2014-08-16 00:01:22 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cbiesinger@chromium.org/396283004/300001
6 years, 4 months ago (2014-08-16 00:02:36 UTC) #25
haraken
LGTM
6 years, 4 months ago (2014-08-16 00:46:02 UTC) #26
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_blink_dbg on tryserver.blink ...
6 years, 4 months ago (2014-08-16 01:08:56 UTC) #27
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-16 01:38:12 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/20919)
6 years, 4 months ago (2014-08-16 01:38:13 UTC) #29
Jens Widell
https://codereview.chromium.org/396283004/diff/300001/Source/bindings/templates/methods.cpp File Source/bindings/templates/methods.cpp (right): https://codereview.chromium.org/396283004/diff/300001/Source/bindings/templates/methods.cpp#newcode292 Source/bindings/templates/methods.cpp:292: if (info.Length() >= 2 && listener && !impl->toNode()) Should ...
6 years, 4 months ago (2014-08-16 06:56:08 UTC) #30
cbiesinger
https://codereview.chromium.org/396283004/diff/300001/Source/bindings/templates/methods.cpp File Source/bindings/templates/methods.cpp (right): https://codereview.chromium.org/396283004/diff/300001/Source/bindings/templates/methods.cpp#newcode292 Source/bindings/templates/methods.cpp:292: if (info.Length() >= 2 && listener && !impl->toNode()) On ...
6 years, 3 months ago (2014-08-29 22:54:13 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cbiesinger@chromium.org/396283004/360001
6 years, 3 months ago (2014-08-29 23:18:41 UTC) #33
commit-bot: I haz the power
6 years, 3 months ago (2014-08-30 00:23:17 UTC) #34
Message was sent while issue was closed.
Committed patchset #19 (id:360001) as 181124

Powered by Google App Engine
This is Rietveld 408576698