Bug 165551

Summary: :hover rule causes a single tap to not activate a slotted anchor element
Product: WebKit Reporter: Derek Gray <dgray90>
Component: UI EventsAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, cdumez, koivisto, rniwa, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 10   
Hardware: iPhone / iPad   
OS: iOS 10   
Bug Depends on:    
Bug Blocks: 148695    
Attachments:
Description Flags
Reproduction in comment #0
none
Adds a test
none
Archive of layout-test-results from ews100 for mac-yosemite
none
Archive of layout-test-results from ews104 for mac-yosemite-wk2
none
Archive of layout-test-results from ews116 for mac-yosemite
none
Archive of layout-test-results from ews125 for ios-simulator-wk2
none
Adds a test and fixes a bug
koivisto: review+, buildbot: commit-queue-
Archive of layout-test-results from ews125 for ios-simulator-wk2 none

Description Derek Gray 2016-12-07 14:38:13 PST
Example to reproduce here: https://gist.github.com/tuespetre/678f13f3a55a3644f0084ce8bc217479

Note that this applies also to fallback content within a slot that is the fallback content of another slot. There is just a lot of weirdness around this area.
Comment 1 Ryosuke Niwa 2016-12-07 23:22:44 PST
Created attachment 296497 [details]
Reproduction in comment #0
Comment 2 Ryosuke Niwa 2016-12-07 23:26:03 PST
I can reproduce this on iOS 10 but it’s fixed on the latest WebKit build on iOS.
Comment 3 Derek Gray 2016-12-08 06:00:59 PST
That's good to know. Thanks Ryosuke
Comment 4 Ryosuke Niwa 2016-12-09 23:57:23 PST
This was fixed by https://trac.webkit.org/changeset/209065. Let's actually add a test.
Comment 5 Ryosuke Niwa 2016-12-12 18:09:40 PST
Created attachment 296976 [details]
Adds a test
Comment 6 Ryosuke Niwa 2016-12-12 18:12:16 PST
<rdar://problem/29632041>
Comment 7 Build Bot 2016-12-12 18:47:27 PST
Comment on attachment 296976 [details]
Adds a test

Attachment 296976 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/2709142

New failing tests:
fast/shadow-dom/click-on-slotted-anchor-with-hover.html
Comment 8 Build Bot 2016-12-12 18:47:31 PST
Created attachment 296977 [details]
Archive of layout-test-results from ews100 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 9 Build Bot 2016-12-12 18:52:18 PST
Comment on attachment 296976 [details]
Adds a test

Attachment 296976 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/2709156

New failing tests:
fast/shadow-dom/click-on-slotted-anchor-with-hover.html
Comment 10 Build Bot 2016-12-12 18:52:21 PST
Created attachment 296978 [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 11 Build Bot 2016-12-12 18:58:11 PST
Comment on attachment 296976 [details]
Adds a test

Attachment 296976 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/2709160

New failing tests:
fast/shadow-dom/click-on-slotted-anchor-with-hover.html
Comment 12 Build Bot 2016-12-12 18:58:15 PST
Created attachment 296980 [details]
Archive of layout-test-results from ews116 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews116  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 13 Build Bot 2016-12-12 19:11:49 PST
Comment on attachment 296976 [details]
Adds a test

Attachment 296976 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/2709179

New failing tests:
fast/shadow-dom/click-on-slotted-anchor-with-hover.html
Comment 14 Build Bot 2016-12-12 19:11:55 PST
Created attachment 296982 [details]
Archive of layout-test-results from ews125 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews125  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.6
Comment 15 Ryosuke Niwa 2016-12-12 22:18:27 PST
Created attachment 296990 [details]
Adds a test and fixes a bug
Comment 16 Build Bot 2016-12-12 23:42:20 PST
Comment on attachment 296990 [details]
Adds a test and fixes a bug

Attachment 296990 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/2710680

New failing tests:
fast/shadow-dom/click-on-slotted-anchor-with-hover.html
Comment 17 Build Bot 2016-12-12 23:42:27 PST
Created attachment 296992 [details]
Archive of layout-test-results from ews125 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews125  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.6
Comment 18 Antti Koivisto 2016-12-13 01:17:22 PST
Comment on attachment 296990 [details]
Adds a test and fixes a bug

View in context: https://bugs.webkit.org/attachment.cgi?id=296990&action=review

> Source/WebCore/page/ios/FrameIOS.mm:263
> +    for (Node* node = hitTestResult.innerNode(); node && node != terminationNode; node = node->parentInComposedTree()) {
> +        ASSERT(!node->isInShadowTree() || node->containingShadowRoot()->mode() != ShadowRootMode::UserAgent);

The assert doesn't look correct. With <details> you can move from normal tree to UA shadow tree.
Comment 19 Ryosuke Niwa 2016-12-13 15:22:38 PST
Committed r209780: <http://trac.webkit.org/changeset/209780>