Changeset 209780 in webkit
- Timestamp:
- Dec 13, 2016 3:22:03 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r209777 r209780 1 2016-12-13 Ryosuke Niwa <rniwa@webkit.org> 2 3 :hover rule causes a single tap to not activate a slotted anchor element 4 https://bugs.webkit.org/show_bug.cgi?id=165551 5 6 Reviewed by Antti Koivisto. 7 8 Added a test for tapping on an anchor element assigned to a slot, which has been fixed in r209065. 9 10 Also added a new helper JS wrapepr, UIHelper, defined inside LayoutTests/resources/js-helper.js 11 to provide an abstraction around EventSender and UIScriptController. 12 13 Fixed click-text-inside-linked-slot.html on iOS using UIHelper. 14 15 * fast/shadow-dom/click-on-slotted-anchor-with-hover-expected.txt: Added. 16 * fast/shadow-dom/click-on-slotted-anchor-with-hover.html: Added. 17 * fast/shadow-dom/click-text-inside-linked-slot.html: 18 * platform/ios-simulator/fast/shadow-dom/click-text-inside-linked-slot-expected.txt: Added. 19 * resources/ui-helper.js: Added. 20 (window.UIHelper.isIOS): 21 (window.UIHelper.activateAt.return.new.Promise): 22 (window.UIHelper.activateAt): 23 (window.UIHelper.wait): 24 (window.UIHelper): 25 * platform/ios-simulator-wk2/TestExpectations: Skip the test in the open source iOS's WebKit2. 26 1 27 2016-12-13 Dave Hyatt <hyatt@apple.com> 2 28 -
trunk/LayoutTests/fast/shadow-dom/click-text-inside-linked-slot.html
r206605 r209780 4 4 <p>This tests clicking on a Text node assigned to a slot inside an anchor element. The link should be activated.<br> 5 5 To manually test, click "here" below and you should see "PASS" and the mouse cursor should indicate it's a hyperlink, not text:</p> 6 <script src="../../resources/ui-helper.js"></script> 6 7 <script> 7 8 … … 25 26 document.getElementById('activation').textContent = 'FAIL'; 26 27 document.write('<div>Cursor: <span id="cursor">FAIL<span></div>'); 27 eventSender.mouseMoveTo(shadowHost.offsetLeft + 5, shadowHost.offsetTop + 5); 28 eventSender.mouseDown(); 29 eventSender.mouseUp(); 28 UIHelper.wait(UIHelper.activateAt(shadowHost.offsetLeft + 5, shadowHost.offsetTop + 5)); 30 29 } 31 30 -
trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations
r209770 r209780 1778 1778 imported/blink/editing/selection/selectstart-event-crash.html [ Skip ] 1779 1779 fast/dom/Window/post-message-user-action.html [ Skip ] 1780 fast/shadow-dom/click-on-slotted-anchor-with-hover.html [ Skip ] 1780 1781 fast/shadow-dom/click-text-inside-linked-slot.html [ Skip ] 1781 1782 fast/shadow-dom/fullscreen-in-shadow-fullscreenElement.html -
trunk/Source/WebCore/ChangeLog
r209777 r209780 1 2016-12-13 Ryosuke Niwa <rniwa@webkit.org> 2 3 :hover rule causes a single tap to not activate a slotted anchor element 4 https://bugs.webkit.org/show_bug.cgi?id=165551 5 6 Reviewed by Antti Koivisto. 7 8 Fixed a bug in ancestorRespondingToClickEvents that we were traversing the ancestor nodes without taking 9 shadow roots and slots into account. This prevented tapping on a text node assigned to a slot inside 10 an anchor element to activate the hyperlink on iOS. 11 12 This bug was supposed to be fixed in r206605, and it was still broken on iOS due to the bug in 13 ancestorRespondingToClickEvents. It is now tested by click-text-inside-linked-slot.html. 14 15 Tests: fast/shadow-dom/click-on-slotted-anchor-with-hover.html 16 fast/shadow-dom/click-text-inside-linked-slot.html 17 18 * page/ios/FrameIOS.mm: 19 (WebCore::ancestorRespondingToClickEvents): 20 (WebCore::Frame::qualifyingNodeAtViewportLocation): 21 1 22 2016-12-13 Dave Hyatt <hyatt@apple.com> 2 23 -
trunk/Source/WebCore/page/ios/FrameIOS.mm
r209683 r209780 60 60 #import "RenderView.h" 61 61 #import "RenderedDocumentMarker.h" 62 #import "ShadowRoot.h" 62 63 #import "TextBoundaries.h" 63 64 #import "TextIterator.h" … … 259 260 260 261 Node* pointerCursorNode = nullptr; 261 for (Node* node = hitTestResult.innerNode(); node && node != terminationNode; node = node->parent Node()) {262 ASSERT(!node->isInShadowTree() );262 for (Node* node = hitTestResult.innerNode(); node && node != terminationNode; node = node->parentInComposedTree()) { 263 ASSERT(!node->isInShadowTree() || node->containingShadowRoot()->mode() != ShadowRootMode::UserAgent); 263 264 264 265 // We only accept pointer nodes before reaching the body tag. … … 406 407 407 408 while (candidate && !candidate->isElementNode()) 408 candidate = candidate->parent Node();409 candidate = candidate->parentInComposedTree(); 409 410 410 411 if (candidate)
Note: See TracChangeset
for help on using the changeset viewer.