event.composedPath() should include the window object, as defined in the spec (https://dom.spec.whatwg.org/#dom-event-composedpath): http://jsbin.com/gebebag/edit?html,output
<rdar://problem/29210383>
Created attachment 294568 [details] Fixes the bug
Comment on attachment 294568 [details] Fixes the bug Attachment 294568 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/2500714 New failing tests: fast/shadow-dom/event-path-with-window.html
Created attachment 294572 [details] Archive of layout-test-results from ews105 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Comment on attachment 294568 [details] Fixes the bug Attachment 294568 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/2500808 New failing tests: fast/shadow-dom/event-path-with-window.html
Created attachment 294573 [details] Archive of layout-test-results from ews102 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-yosemite Platform: Mac OS X 10.10.5
Created attachment 294574 [details] Rebaselined the test
Created attachment 294579 [details] Fixes the bug
Comment on attachment 294579 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=294579&action=review > Source/WebCore/dom/EventPath.cpp:176 > + if (!ambgiousContext.isMouseOrFocusEventContext()) > + continue; > + auto& context = downcast<MouseOrFocusEventContext>(ambgiousContext); is<MouseOrFocusEventContext>() pairs better with the cast than using a member test function. > Source/WebCore/dom/EventPath.cpp:221 > + if (context->isTouchEventContext()) { > + Node* currentRelatedNode = retargeter.currentNode(currentTarget); > + downcast<TouchEventContext>(*context).touchList(touchListType)->append(touch.cloneWithNewTarget(currentRelatedNode)); Same here with is<TouchEventContext>() > Source/WebCore/dom/EventPath.cpp:267 > + if (const DOMWindow* domWindow = const_cast<EventTarget&>(target).toDOMWindow()) { > + targetNode = domWindow->document(); > + ASSERT(targetNode); > + } else > + return path; I'd prefer this in early return style without else.
Created attachment 294584 [details] Patch for landing
Comment on attachment 294584 [details] Patch for landing Rejecting attachment 294584 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-01', 'validate-changelog', '--check-oops', '--non-interactive', 294584, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit ChangeLog entry in LayoutTests/ChangeLog contains OOPS!. Full output: http://webkit-queues.webkit.org/results/2501394
Comment on attachment 294584 [details] Patch for landing Will land with the right reviewer name after waiting for EWS.
Committed r208641: <http://trac.webkit.org/changeset/208641>