NEW 249555
HitTest for RootInlineBox/InlineFlowBox should take care of border-radius.
https://bugs.webkit.org/show_bug.cgi?id=249555
Summary HitTest for RootInlineBox/InlineFlowBox should take care of border-radius.
Ahmad Saleem
Reported 2022-12-18 08:27:35 PST
Hi Team, While going through Blink's commit, I came across another failing: Commit - https://chromium.googlesource.com/chromium/blink/+/33dd960f98fa10ffcbd8f9539ff4221ce8d08f43 Webkit GitHub Source - https://jsfiddle.net/xngkjt9s/show ^ Failing in Safari 16.2 and STP160 while Chrome Canary 111 and Firefox Nightly 110 passes all. WebKit Source - https://github.com/WebKit/WebKit/blob/e6ff73fa8a9f8a8196001a303e29a06e1bbd294e/Source/WebCore/rendering/LegacyInlineFlowBox.cpp#L1070 Just wanted to raise it so we can fix this as well. Thanks!
Attachments
Ahmad Saleem
Comment 1 2022-12-20 13:27:48 PST
if (renderer().style()->hasBorderRadius()) { LayoutRect borderRect = logicalFrameRect() borderRect.moveBy(accumulatedOffset) FloatRoundedRect border = renderer.style()->getRoundedBorderFor(borderRect, includeLogicalLeftEdge(), includeLogicalRightEdge()); (!locationInContainer.intersects(border)) return false; } ^ I think it will work, will try and let's see. Might need some help.
zalan
Comment 2 2022-12-21 13:35:17 PST
This fails with IFC too so a fix in legacy won't do much at this point.
Radar WebKit Bug Importer
Comment 3 2022-12-25 08:28:15 PST
Ahmad Saleem
Comment 4 2024-02-23 14:23:31 PST
This compiles but does not fix the failing test (might be IFC taking over): if (renderer().style().hasBorderRadius()) { auto borderRect = logicalFrameRect(); borderRect.moveBy(accumulatedOffset); auto border = renderer().style().getRoundedBorderFor(LayoutRect(borderRect), includeLogicalLeftEdge(), includeLogicalRightEdge()); if (!locationInContainer.intersects(border)) return false; }
Note You need to log in before you can comment on or make changes to this bug.