Summary: | Improve window.event compliance: Should not be set when target is in shadow tree | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Anne van Kesteren <annevk> | ||||||
Component: | DOM | Assignee: | Chris Dumez <cdumez> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | cdumez, commit-queue, darin, ews-watchlist, ggaren, koivisto, rniwa, sam, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=233834 | ||||||||
Attachments: |
|
Description
Anne van Kesteren
2018-06-04 04:55:18 PDT
Created attachment 344229 [details]
Patch
Comment on attachment 344229 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=344229&action=review > Source/WebCore/bindings/js/JSEventListener.cpp:163 > + if (!isTargetInsideShadowTree) It probably doesn't matter but maybe we should also avoid calling setCurrentEvent later when we restore the saved event to maintain the symmetry? Comment on attachment 344229 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=344229&action=review >> Source/WebCore/bindings/js/JSEventListener.cpp:163 >> + if (!isTargetInsideShadowTree) > > It probably doesn't matter but maybe we should also avoid calling setCurrentEvent later when we restore the saved event to maintain the symmetry? I prefer it this way for a couple of reasons: - Trying to avoid the setting / restore adds a little bit of code complexity / branching - Setting the event is cheap - The current behavior matches the spec exactly (https://dom.spec.whatwg.org/#concept-event-listener-inner-invoke) I am not opposed to doing it if you feel strongly about it though. Comment on attachment 344229 [details] Patch Attachment 344229 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/8429641 New failing tests: accessibility/smart-invert-reference.html Created attachment 344240 [details]
Archive of layout-test-results from ews107 for mac-sierra-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
Comment on attachment 344240 [details]
Archive of layout-test-results from ews107 for mac-sierra-wk2
Failure does not look related
Comment on attachment 344229 [details] Patch Clearing flags on attachment: 344229 Committed r233489: <https://trac.webkit.org/changeset/233489> All reviewed patches have been landed. Closing bug. |