Changeset 200580 in webkit
- Timestamp:
- May 9, 2016 10:47:01 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r200579 r200580 1 2016-05-09 Ryosuke Niwa <rniwa@webkit.org> 2 3 REGRESSION (198056): Unable to use edit buttons on WordPress 4 https://bugs.webkit.org/show_bug.cgi?id=157475 5 6 Reviewed by Antti Koivisto. 7 8 Updated the tests. 9 10 * fast/shadow-dom/Extensions-to-Event-Interface-expected.txt: 11 * fast/shadow-dom/Extensions-to-Event-Interface.html: 12 * fast/shadow-dom/resources/event-path-test-helpers.js: 13 (dispatchEventWithLog): 14 1 15 2016-05-09 Ryan Haddad <ryanhaddad@apple.com> 2 16 -
trunk/LayoutTests/fast/shadow-dom/Extensions-to-Event-Interface-expected.txt
r198056 r200580 1 1 2 PASS deepPath() must exist on Event3 PASS deepPath() must return an empty array when the event has not been dispatched4 PASS deepPath() must return an empty array when the event is no longer dispatched2 PASS composedPath() must exist on Event 3 PASS composedPath() must return an empty array when the event has not been dispatched 4 PASS composedPath() must return an empty array when the event is no longer dispatched 5 5 PASS scoped must exist on Event 6 6 PASS scoped on EventInit must default to false … … 21 21 PASS The event must propagate out of open mode shadow tree in which the relative target and the relative related target are the same 22 22 PASS The event must propagate out of closed mode shadow tree in which the relative target and the relative related target are the same 23 PASS deepPath() must contain and only contain the unclosed nodes of target in open mode shadow trees24 PASS deepPath() must contain and only contain the unclosed nodes of target in closed mode shadow trees23 PASS composedPath() must contain and only contain the unclosed nodes of target in open mode shadow trees 24 PASS composedPath() must contain and only contain the unclosed nodes of target in closed mode shadow trees 25 25 -
trunk/LayoutTests/fast/shadow-dom/Extensions-to-Event-Interface.html
r198056 r200580 4 4 <title>Shadow DOM: Extensions to Event Interface</title> 5 5 <meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"> 6 <meta name="assert" content="Event interface must have deepPath() as a method">6 <meta name="assert" content="Event interface must have composedPath() as a method"> 7 7 <link rel="help" href="http://w3c.github.io/webcomponents/spec/shadow/#extensions-to-event-interface"> 8 8 <script src="../../resources/testharness.js"></script> … … 16 16 17 17 test(function () { 18 assert_true(' deepPath' in Event.prototype);19 assert_true(' deepPath' in new Event('my-event'));20 }, ' deepPath() must exist on Event');21 22 test(function () { 23 var event = new Event('my-event'); 24 assert_array_equals(event. deepPath(), []);25 }, ' deepPath() must return an empty array when the event has not been dispatched');18 assert_true('composedPath' in Event.prototype); 19 assert_true('composedPath' in new Event('my-event')); 20 }, 'composedPath() must exist on Event'); 21 22 test(function () { 23 var event = new Event('my-event'); 24 assert_array_equals(event.composedPath(), []); 25 }, 'composedPath() must return an empty array when the event has not been dispatched'); 26 26 27 27 test(function () { 28 28 var event = new Event('my-event'); 29 29 document.body.dispatchEvent(event); 30 assert_array_equals(event. deepPath(), []);31 }, ' deepPath() must return an empty array when the event is no longer dispatched');30 assert_array_equals(event.composedPath(), []); 31 }, 'composedPath() must return an empty array when the event is no longer dispatched'); 32 32 33 33 test(function () { … … 88 88 assert_array_equals(log.pathAtTargets[1], expectedPath); 89 89 assert_array_equals(log.pathAtTargets[2], mode == 'open' ? expectedPath : ['A1', 'A-SR', 'A'], 90 ' deepPath must only contain unclosed nodes of the current target.');90 'composedPath must only contain unclosed nodes of the current target.'); 91 91 }, 'The event must propagate out of ' + mode + ' mode shadow boundaries when the scoped flag is unset'); 92 92 } … … 275 275 assert_array_equals(log.pathAtTargets[8], mode == 'open' ? expectedPath : pathExposedToB); 276 276 assert_array_equals(log.relatedTargets, expectedRelatedTarget); 277 }, ' deepPath() must contain and only contain the unclosed nodes of target in ' + mode + ' mode shadow trees');277 }, 'composedPath() must contain and only contain the unclosed nodes of target in ' + mode + ' mode shadow trees'); 278 278 } 279 279 -
trunk/LayoutTests/fast/shadow-dom/resources/event-path-test-helpers.js
r198056 r200580 16 16 relatedTargets.push(event.relatedTarget ? event.relatedTarget.label : null); 17 17 18 if (!event. deepPath) // Don't fail all tests just for the lack of deepPath.18 if (!event.composedPath) // Don't fail all tests just for the lack of composedPath. 19 19 return; 20 20 21 pathAtTargets.push(event. deepPath().map(function (node) { return node.label; }));21 pathAtTargets.push(event.composedPath().map(function (node) { return node.label; })); 22 22 }).bind(node)); 23 23 } -
trunk/Source/WebCore/ChangeLog
r200578 r200580 1 2016-05-09 Ryosuke Niwa <rniwa@webkit.org> 2 3 REGRESSION (198056): Unable to use edit buttons on WordPress 4 https://bugs.webkit.org/show_bug.cgi?id=157475 5 6 Reviewed by Antti Koivisto. 7 8 Renamed Event.prototype.deepPath() to composedPath() per discussions on 9 https://github.com/whatwg/dom/issues/242 as the old name was not Web compatible. 10 11 Test: fast/shadow-dom/Extensions-to-Event-Interface.html 12 13 * dom/Event.cpp: 14 (WebCore::Event::composedPath): Renamed from deepPath. 15 * dom/Event.h: 16 * dom/Event.idl: 17 1 18 2016-05-09 Alex Christensen <achristensen@webkit.org> 2 19 -
trunk/Source/WebCore/dom/Event.cpp
r200464 r200580 188 188 } 189 189 190 Vector<EventTarget*> Event:: deepPath() const190 Vector<EventTarget*> Event::composedPath() const 191 191 { 192 192 if (!m_eventPath) -
trunk/Source/WebCore/dom/Event.h
r198056 r200580 125 125 void setEventPath(const EventPath& path) { m_eventPath = &path; } 126 126 void clearEventPath() { m_eventPath = nullptr; } 127 Vector<EventTarget*> deepPath() const;127 Vector<EventTarget*> composedPath() const; 128 128 129 129 void stopPropagation() { m_propagationStopped = true; } -
trunk/Source/WebCore/dom/Event.idl
r199969 r200580 62 62 readonly attribute DOMTimeStamp timeStamp; 63 63 64 [Conditional=SHADOW_DOM, EnabledAtRuntime=ShadowDOM] sequence<Node> deepPath();64 [Conditional=SHADOW_DOM, EnabledAtRuntime=ShadowDOM] sequence<Node> composedPath(); 65 65 66 66 void stopPropagation();
Note: See TracChangeset
for help on using the changeset viewer.