Summary: | REGRESSION (r278377): incorrect hit-testing with clip-path() | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Antoine Quint <graouts> | ||||||||||||
Component: | Layout and Rendering | Assignee: | zalan <zalan> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Normal | CC: | bfulgham, changseok, christoph-wk, esprehn+autocc, ews-watchlist, fred.wang, glenn, kondapallykalyan, pdr, simon.fraser, webkit-bug-importer, zalan | ||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||
Hardware: | Unspecified | ||||||||||||||
OS: | Unspecified | ||||||||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=226499 | ||||||||||||||
Attachments: |
|
Description
Antoine Quint
2021-07-02 07:00:01 PDT
The test case shows the intermediate container is the one being hit-tested since the wait cursor is shown when hovering over the black rectangle. We fail this check in Path::contains() under this call stack when consider the RenderLayer for the "leaf" element: if (!fastBoundingRect().contains(point)) return false; #0 0x000000073c986373 in WebCore::Path::contains(WebCore::FloatPoint const&, WebCore::WindRule) const at WebCore/platform/graphics/cg/PathCG.cpp:227 #1 0x000000073cdca823 in WebCore::RenderBox::hitTestClipPath(WebCore::HitTestLocation const&, WebCore::LayoutPoint const&) const at WebCore/rendering/RenderBox.cpp:1388 #2 0x000000073ceba871 in WebCore::RenderLayer::hitTestLayer(WebCore::RenderLayer*, WebCore::RenderLayer*, WebCore::HitTestRequest const&, WebCore::HitTestResult&, WebCore::LayoutRect const&, WebCore::HitTestLocation const&, bool, WebCore::HitTestingTransformState const*, double*) at WebCore/rendering/RenderLayer.cpp:4122 The provided point is indeed outside of the bounds and seems to be in page coordinates, or at least converted to the coordinates of this element. Created attachment 432805 [details]
More self-explanatory, non-flex testcase
Created attachment 432818 [details]
Another test reduction
Created attachment 432839 [details]
Patch
Comment on attachment 432839 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=432839&action=review > Source/WebCore/ChangeLog:13 > + 3. The clip-path instersecting takes coordinates relative to the containing block. "instersecting" Created attachment 432851 [details]
Patch
Committed r279544 (239380@main): <https://commits.webkit.org/239380@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 432851 [details]. *** Bug 228262 has been marked as a duplicate of this bug. *** |