Changeset 236384 in webkit
- Timestamp:
- Sep 22, 2018 1:13:52 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r236380 r236384 1 2018-09-21 Ryosuke Niwa <rniwa@webkit.org> 2 3 Cannot start a drag inside a shadow tree when an inclusive-ancestor of its shadow host is a draggable element 4 https://bugs.webkit.org/show_bug.cgi?id=136836 5 6 Reviewed by Wenson Hsieh. 7 8 Added regression tests for dragging a element with a shadow tree, which is fixed in this bug 9 as well as dragging an element inside a shadow tree, which was already functional but had no tests. 10 11 * TestExpectations: 12 * fast/shadow-dom/dragging-element-inside-shadow-tree-expected.txt: Added. 13 * fast/shadow-dom/dragging-element-inside-shadow-tree.html: Added. 14 * fast/shadow-dom/dragging-element-with-shadow-tree-expected.txt: Added. 15 * fast/shadow-dom/dragging-element-with-shadow-tree.html: Added. 16 * platform/ios/TestExpectations: Don't mark the entirety of fast/shadow-dom as PASS. 17 * platform/mac-wk1/TestExpectations: 18 1 19 2018-09-21 Devin Rousso <drousso@apple.com> 2 20 -
trunk/LayoutTests/TestExpectations
r236292 r236384 105 105 editing/pasteboard/drag-file-promises-to-editable-element-as-attachment.html [ Skip ] 106 106 editing/pasteboard/file-input-files-access-promise.html [ Skip ] 107 fast/shadow-dom/dragging-element-with-shadow-tree.html [ Skip ] 108 fast/shadow-dom/dragging-element-inside-shadow-tree.html [ Skip ] 107 109 http/tests/security/clipboard/drag-drop-html-cross-origin-iframe-in-same-origin.html [ Skip ] 108 110 -
trunk/LayoutTests/platform/ios/TestExpectations
r236274 r236384 779 779 editing/inserting/smart-quote-with-all-configurations.html [ Skip ] 780 780 781 webkit.org/b/148695 fast/shadow-dom [ Pass ]782 783 781 # No tab navigation support on iOS 784 782 fast/shadow-dom/focus-on-iframe.html [ Failure ] -
trunk/LayoutTests/platform/mac-wk1/TestExpectations
r236273 r236384 25 25 editing/pasteboard/drag-file-promises-to-editable-element-as-attachment.html [ Pass ] 26 26 editing/pasteboard/file-input-files-access-promise.html [ Pass ] 27 fast/shadow-dom/dragging-element-with-shadow-tree.html [ Pass ] 28 fast/shadow-dom/dragging-element-inside-shadow-tree.html [ Pass ] 27 29 http/tests/security/clipboard/drag-drop-html-cross-origin-iframe-in-same-origin.html [ Pass ] 28 30 -
trunk/Source/WebCore/ChangeLog
r236383 r236384 1 2018-09-21 Ryosuke Niwa <rniwa@webkit.org> 2 3 Cannot start a drag inside a shadow tree when an inclusive-ancestor of its shadow host is a draggable element 4 https://bugs.webkit.org/show_bug.cgi?id=136836 5 6 Reviewed by Wenson Hsieh. 7 8 Fixed the bug by simply generalizing the existing code path existed for video / input type=color. 9 10 Tests: fast/shadow-dom/dragging-element-inside-shadow-tree.html 11 fast/shadow-dom/dragging-element-with-shadow-tree.html 12 13 * page/DragController.cpp: 14 (WebCore::DragController::startDrag): 15 1 16 2018-09-22 Chris Dumez <cdumez@apple.com> 2 17 -
trunk/Source/WebCore/page/DragController.cpp
r235775 r236384 906 906 HitTestResult hitTestResult = src.eventHandler().hitTestResultAtPoint(dragOrigin, HitTestRequest::ReadOnly | HitTestRequest::Active); 907 907 908 // FIXME(136836): Investigate whether all elements should use the containsIncludingShadowDOM() path here. 909 bool includeShadowDOM = false; 910 #if ENABLE(VIDEO) 911 includeShadowDOM = state.source->isMediaElement(); 912 #endif 913 #if ENABLE(INPUT_TYPE_COLOR) 914 bool isColorControl = is<HTMLInputElement>(state.source) && downcast<HTMLInputElement>(*state.source).isColorControl(); 915 includeShadowDOM = includeShadowDOM || isColorControl; 916 #endif 917 bool sourceContainsHitNode; 918 if (!includeShadowDOM) 919 sourceContainsHitNode = state.source->contains(hitTestResult.innerNode()); 920 else 921 sourceContainsHitNode = state.source->containsIncludingShadowDOM(hitTestResult.innerNode()); 922 908 bool sourceContainsHitNode = state.source->containsIncludingShadowDOM(hitTestResult.innerNode()); 923 909 if (!sourceContainsHitNode) { 924 910 // The original node being dragged isn't under the drag origin anymore... maybe it was … … 1179 1165 1180 1166 #if ENABLE(INPUT_TYPE_COLOR) 1167 bool isColorControl = is<HTMLInputElement>(state.source) && downcast<HTMLInputElement>(*state.source).isColorControl(); 1181 1168 if (isColorControl && m_dragSourceAction & DragSourceActionColor) { 1182 1169 auto& input = downcast<HTMLInputElement>(*state.source);
Note: See TracChangeset
for help on using the changeset viewer.