Add elementFromPoint on ShadowRoot. Chrome already supports it.
Created attachment 290539 [details] Adds the support
Comment on attachment 290539 [details] Adds the support Attachment 290539 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/2214107 New failing tests: fast/dom/non-numeric-values-numeric-parameters.html fast/shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint.html
Created attachment 290543 [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
Comment on attachment 290539 [details] Adds the support Attachment 290539 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/2214112 New failing tests: fast/dom/non-numeric-values-numeric-parameters.html fast/shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint.html
Created attachment 290544 [details] Archive of layout-test-results from ews106 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Comment on attachment 290539 [details] Adds the support Attachment 290539 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/2214131 New failing tests: media/video-click-dblckick-standalone.html editing/selection/selection-in-iframe-removed-crash.html fast/dom/non-numeric-values-numeric-parameters.html fast/shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint.html fast/dom/adopt-node-crash-2.html
Created attachment 290546 [details] Archive of layout-test-results from ews115 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews115 Port: mac-yosemite Platform: Mac OS X 10.10.5
Comment on attachment 290539 [details] Adds the support Attachment 290539 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/2214145 New failing tests: fast/dom/non-numeric-values-numeric-parameters.html fast/shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint.html
Created attachment 290548 [details] Archive of layout-test-results from ews122 for ios-simulator-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews122 Port: ios-simulator-elcapitan-wk2 Platform: Mac OS X 10.11.6
Created attachment 290572 [details] Reverted the unintended type changes in IDL
Comment on attachment 290572 [details] Reverted the unintended type changes in IDL Attachment 290572 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/2215792 New failing tests: fast/shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint.html
Created attachment 290574 [details] Archive of layout-test-results from ews101 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-yosemite Platform: Mac OS X 10.10.5
Comment on attachment 290572 [details] Reverted the unintended type changes in IDL Attachment 290572 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/2215794 New failing tests: fast/shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint.html
Created attachment 290576 [details] Archive of layout-test-results from ews104 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Comment on attachment 290572 [details] Reverted the unintended type changes in IDL Attachment 290572 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/2215782 New failing tests: fast/shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint.html
Created attachment 290579 [details] Archive of layout-test-results from ews126 for ios-simulator-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews126 Port: ios-simulator-elcapitan-wk2 Platform: Mac OS X 10.11.6
Comment on attachment 290572 [details] Reverted the unintended type changes in IDL Attachment 290572 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/2215793 New failing tests: fast/shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint.html
Created attachment 290580 [details] Archive of layout-test-results from ews112 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews112 Port: mac-yosemite Platform: Mac OS X 10.10.5
Comment on attachment 290572 [details] Reverted the unintended type changes in IDL View in context: https://bugs.webkit.org/attachment.cgi?id=290572&action=review > LayoutTests/fast/shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint.html:9 > +<script src="/Volumes/Data/git-webkit/LayoutTests/resources/testharness.js"></script> Nice :D
Comment on attachment 290572 [details] Reverted the unintended type changes in IDL View in context: https://bugs.webkit.org/attachment.cgi?id=290572&action=review > Source/WebCore/ChangeLog:12 > + Added TreeScope::retargetToScope which implements implements.. what?
Created attachment 290647 [details] Fixed testharness.js path
Comment on attachment 290647 [details] Fixed testharness.js path View in context: https://bugs.webkit.org/attachment.cgi?id=290647&action=review > Source/WebCore/ChangeLog:12 > + Added TreeScope::retargetToScope which implements Which implements.. what? > Source/WebCore/dom/TreeScope.cpp:174 > +Node& TreeScope::retargetToScope(Node& node) const The spec says: """ To retarget an object A against an object B, repeat these steps until they return an object: If A’s root is not a shadow root, or A’s root is a shadow-including inclusive ancestor of B, then return A. Set A to A’s root’s host. """ This seems simpler than what you implemented and would not require allocating vectors for the whole ancestry. Also, I may have misread that doesn't your implementation assume this and node have the same depth? -> while (i > 0 && j > 0 && nodeTreeScopes[i - 1] == ancestorScopes[j - 1]) { > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:3216 > + RuntimeEnabledFeatures::sharedFeatures().setCustomElementsEnabled(true || store.getBoolValueForKey(WebPreferencesKey::customElementsEnabledKey())); Probably did not mean to include this?
Comment on attachment 290647 [details] Fixed testharness.js path View in context: https://bugs.webkit.org/attachment.cgi?id=290647&action=review >> Source/WebCore/dom/TreeScope.cpp:174 >> +Node& TreeScope::retargetToScope(Node& node) const > > The spec says: > """ > To retarget an object A against an object B, repeat these steps until they return an object: > > If A’s root is not a shadow root, or A’s root is a shadow-including inclusive ancestor of B, then return A. > > Set A to A’s root’s host. > """ > > This seems simpler than what you implemented and would not require allocating vectors for the whole ancestry. > > Also, I may have misread that doesn't your implementation assume this and node have the same depth? > > -> while (i > 0 && j > 0 && nodeTreeScopes[i - 1] == ancestorScopes[j - 1]) { Ryosuke explained offline and I now believe this works. I still think this is a bit obscure and is not guaranteed to be faster in common cases than the trivial implementation. That said, I don't feel strongly either way.
Committed r206795: <http://trac.webkit.org/changeset/206795>
<rdar://problem/28642151>