Bug 249555
| Summary: | HitTest for RootInlineBox/InlineFlowBox should take care of border-radius. | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
| Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | bfulgham, karlcow, simon.fraser, webkit-bug-importer, zalan |
| Priority: | P2 | Keywords: | BrowserCompat, InRadar |
| Version: | Safari Technology Preview | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Ahmad Saleem
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Ahmad Saleem
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.
alan
This fails with IFC too so a fix in legacy won't do much at this point.
Radar WebKit Bug Importer
<rdar://problem/103696378>
Ahmad Saleem
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;
}