forked from qtwebkit/qtwebkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace scoped flag in Event by composed flag
https://bugs.webkit.org/show_bug.cgi?id=158415 Reviewed by Chris Dumez. Source/WebCore: Replace `scoped` flag with `composed` flag and negate its meaning per the latest spec: https://dom.spec.whatwg.org/#dom-event-composed WICG/webcomponents#513 In the old spec, every event was assumed to be "composed" (crosses shadow boundaries) by default and there was `scoped` flag which prevented the event from crossing bondaries, and there was a handful of events for which `scoped` was set true when dispatched by UA. In the new spec, every event is assumed to be "scoped" and a handful of user-initiated events set `composed` flag to true, which is also exposed in EventInit dictionary. `relatedTargetScoped` flag has been removed. New behavior is identical to when this flag was set to true. No new tests since existing tests are updated to test the new flag and behavior. * dom/CompositionEvent.cpp: (WebCore::CompositionEvent::isCompositionEvent): Added. * dom/CompositionEvent.h: * dom/Event.cpp: (WebCore::Event::Event): Initialize m_composed. Also re-ordered m_type and m_isInitialized for better packing. (WebCore::Event::composed): Renamed from Event::composed. We return true whenever composed is set to true in EventInit, or the engine is dispatching an user-initiated event listed in: WICG/webcomponents#513 (comment) as well as keypress, cut, paste, and, copy as discussed in: WICG/webcomponents#513 (comment) (WebCore::Event::isCompositionEvent): Added. * dom/Event.h: (WebCore::Event::composed): Added. (WebCore::Event::scoped): Deleted. (WebCore::Event::relatedTargetScoped): Deleted. (WebCore::Event): Reordered m_type and m_isInitialized for better packing. Added m_composed and removed m_scoped and m_relatedTargetScoped. * dom/Event.idl: * dom/EventPath.cpp: (WebCore::shouldEventCrossShadowBoundary): Returns true if the event did not originate from a shadow tree (this event entered the current shadow tree via a slot so we need to proceed with the normal bubble path outside the shadow tree) or composed flag is set true. (WebCore::EventPath::EventPath): m_event no longer exists, which was only used to get the value of relatedTargetScoped which has been removed. (WebCore::EventPath::setRelatedTarget): Behave as if relatedTargetScoped is always set true since the flag has been removed. * dom/EventPath.h: * dom/FocusEvent.cpp: (WebCore::FocusEvent::relatedTargetScoped): Deleted. * dom/FocusEvent.h: * dom/MouseEvent.cpp: (WebCore::MouseEvent::relatedTargetScoped): Deleted. * dom/MouseEvent.h: LayoutTests: Updated the tests to reflect the rename of scoped to composed and the negation of its semantics. Now every Event is assumed to be scoped / non-composed by default, and we need to explicitly set composed to true in order for events to cross shadow boundaries. Also, every Event behaves as if related target is assumed to be scoped in the old terminology althoug the flag no longer exists. * fast/shadow-dom/Extensions-to-Event-Interface-expected.txt: * fast/shadow-dom/Extensions-to-Event-Interface.html: Removed a test case that was testing relatedTargetScoped to false since this flag no longer exists. * fast/shadow-dom/MouseEvent-prototype-offsetX-offsetY.html: * fast/shadow-dom/event-inside-shadow-tree.html: * fast/shadow-dom/event-inside-slotted-node.html: * fast/shadow-dom/event-with-related-target.html: * fast/shadow-dom/trusted-event-scoped-flags-expected.txt: * fast/shadow-dom/trusted-event-scoped-flags.html: * fast/xmlhttprequest/xmlhttprequest-get-expected.txt: * http/tests/workers/worker-importScriptsOnError-expected.txt: * inspector/model/remote-object-get-properties-expected.txt: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@202953 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
6aac2e8
commit 07c8579
Showing
23 changed files
with
242 additions
and
371 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,30 @@ | ||
2016-07-07 Ryosuke Niwa <[email protected]> | ||
|
||
Replace scoped flag in Event by composed flag | ||
https://bugs.webkit.org/show_bug.cgi?id=158415 | ||
|
||
Reviewed by Chris Dumez. | ||
|
||
Updated the tests to reflect the rename of scoped to composed and the negation of its semantics. | ||
Now every Event is assumed to be scoped / non-composed by default, and we need to explicitly set | ||
composed to true in order for events to cross shadow boundaries. | ||
|
||
Also, every Event behaves as if related target is assumed to be scoped in the old terminology | ||
althoug the flag no longer exists. | ||
|
||
* fast/shadow-dom/Extensions-to-Event-Interface-expected.txt: | ||
* fast/shadow-dom/Extensions-to-Event-Interface.html: Removed a test case that was testing | ||
relatedTargetScoped to false since this flag no longer exists. | ||
* fast/shadow-dom/MouseEvent-prototype-offsetX-offsetY.html: | ||
* fast/shadow-dom/event-inside-shadow-tree.html: | ||
* fast/shadow-dom/event-inside-slotted-node.html: | ||
* fast/shadow-dom/event-with-related-target.html: | ||
* fast/shadow-dom/trusted-event-scoped-flags-expected.txt: | ||
* fast/shadow-dom/trusted-event-scoped-flags.html: | ||
* fast/xmlhttprequest/xmlhttprequest-get-expected.txt: | ||
* http/tests/workers/worker-importScriptsOnError-expected.txt: | ||
* inspector/model/remote-object-get-properties-expected.txt: | ||
|
||
2016-05-09 Ryosuke Niwa <[email protected]> | ||
|
||
REGRESSION (198056): Unable to use edit buttons on WordPress | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.