Changeset 219551 in webkit
- Timestamp:
- Jul 16, 2017 7:10:42 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r219549 r219551 1 2017-07-16 Ali Juma <ajuma@chromium.org> 2 3 DisallowUserAgentShadowContent moves out of non-UA shadow roots 4 https://bugs.webkit.org/show_bug.cgi?id=165647 5 6 Reviewed by Ryosuke Niwa. 7 8 * fast/dom/nodesFromRect/nodesFromRect-shadow-expected.txt: Added. 9 * fast/dom/nodesFromRect/nodesFromRect-shadow.html: Added. 10 * fast/dom/nodesFromRect/resources/nodesFromRect.js: 11 (check): 12 (checkShadowContent): 13 (nodesFromRectAsString): 14 1 15 2017-07-16 Antoine Quint <graouts@apple.com> 2 16 -
trunk/LayoutTests/fast/dom/nodesFromRect/resources/nodesFromRect.js
r145364 r219551 43 43 doc = document; 44 44 45 var nodes = internals.nodesFromRect(doc, x, y, topPadding, rightPadding, bottomPadding, leftPadding, true /* ignoreClipping */, false /* allow shadow content */, false /* allow child-frame content */);45 var nodes = internals.nodesFromRect(doc, x, y, topPadding, rightPadding, bottomPadding, leftPadding, true /* ignoreClipping */, false /* allow user-agent shadow content */, false /* allow child-frame content */); 46 46 if (!nodes) 47 47 return; … … 79 79 doc = document; 80 80 81 var nodes = internals.nodesFromRect(doc, x, y, topPadding, rightPadding, bottomPadding, leftPadding, true /* ignoreClipping */, true /* allow ShadowContent */, false /* allow child-frame content */);81 var nodes = internals.nodesFromRect(doc, x, y, topPadding, rightPadding, bottomPadding, leftPadding, true /* ignoreClipping */, true /* allowUserAgentShadowContent */, false /* allow child-frame content */); 82 82 if (!nodes) 83 83 return; … … 146 146 function nodesFromRectAsString(doc, x, y, topPadding, rightPadding, bottomPadding, leftPadding) 147 147 { 148 var nodes = internals.nodesFromRect(doc, x, y, topPadding, rightPadding, bottomPadding, leftPadding, true /* ignoreClipping */, false /* allow shadow content */, true /* allow child-frame content */);148 var nodes = internals.nodesFromRect(doc, x, y, topPadding, rightPadding, bottomPadding, leftPadding, true /* ignoreClipping */, false /* allow user-agent shadow content */, true /* allow child-frame content */); 149 149 if (!nodes) 150 150 return ""; -
trunk/Source/WebCore/ChangeLog
r219549 r219551 1 2017-07-16 Ali Juma <ajuma@chromium.org> 2 3 DisallowUserAgentShadowContent moves out of non-UA shadow roots 4 https://bugs.webkit.org/show_bug.cgi?id=165647 5 6 Reviewed by Ryosuke Niwa. 7 8 Make rect-based hit-testing include nodes in non-UA shadow trees when the 9 HitTestRequest has type DisallowUserAgentShadowContent. 10 11 Test: fast/dom/nodesFromRect/nodesFromRect-shadow.html 12 13 * rendering/HitTestResult.cpp: 14 (WebCore::HitTestResult::addNodeToRectBasedTestResult): 15 * testing/Internals.cpp: 16 (WebCore::Internals::nodesFromRect): 17 * testing/Internals.h: 18 1 19 2017-07-16 Antoine Quint <graouts@apple.com> 2 20 -
trunk/Source/WebCore/rendering/HitTestResult.cpp
r219237 r219551 668 668 return true; 669 669 670 // FIXME: This moves out of a author shadow tree. 671 if (request.disallowsUserAgentShadowContent()) 670 if (request.disallowsUserAgentShadowContent() && node->isInUserAgentShadowTree()) 672 671 node = node->document().ancestorNodeInThisScope(node); 673 672 … … 689 688 return true; 690 689 691 // FIXME: This moves out of a author shadow tree. 692 if (request.disallowsUserAgentShadowContent()) 690 if (request.disallowsUserAgentShadowContent() && node->isInUserAgentShadowTree()) 693 691 node = node->document().ancestorNodeInThisScope(node); 694 692 -
trunk/Source/WebCore/testing/Internals.cpp
r219419 r219551 1836 1836 // different document, and could just make the call through another Internals 1837 1837 // instance instead. 1838 ExceptionOr<RefPtr<NodeList>> Internals::nodesFromRect(Document& document, int centerX, int centerY, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allow ShadowContent, bool allowChildFrameContent) const1838 ExceptionOr<RefPtr<NodeList>> Internals::nodesFromRect(Document& document, int centerX, int centerY, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowUserAgentShadowContent, bool allowChildFrameContent) const 1839 1839 { 1840 1840 if (!document.frame() || !document.frame()->view()) … … 1855 1855 if (ignoreClipping) 1856 1856 hitType |= HitTestRequest::IgnoreClipping; 1857 if (!allow ShadowContent)1857 if (!allowUserAgentShadowContent) 1858 1858 hitType |= HitTestRequest::DisallowUserAgentShadowContent; 1859 1859 if (allowChildFrameContent) -
trunk/Source/WebCore/testing/Internals.h
r219419 r219551 250 250 ExceptionOr<Ref<DOMRectList>> passiveTouchEventListenerRects(); 251 251 252 ExceptionOr<RefPtr<NodeList>> nodesFromRect(Document&, int x, int y, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allow ShadowContent, bool allowChildFrameContent) const;252 ExceptionOr<RefPtr<NodeList>> nodesFromRect(Document&, int x, int y, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowUserAgentShadowContent, bool allowChildFrameContent) const; 253 253 254 254 String parserMetaData(JSC::JSValue = JSC::JSValue::JSUndefined);
Note: See TracChangeset
for help on using the changeset viewer.