Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d02501613445a848889b70532a94e2c058a922e2
https://github.com/WebKit/WebKit/commit/d02501613445a848889b70532a94e2c058a922e2
Author: Alan Baradlay <[email protected]>
Date: 2026-02-20 (Fri, 20 Feb 2026)
Changed paths:
M
LayoutTests/fast/block/inside-inlines/getClientRects-on-inline-box-missing-entry-expected.txt
A LayoutTests/fast/inline/empty-inline-box-bounding-rect-expected.txt
A LayoutTests/fast/inline/empty-inline-box-bounding-rect.html
M Source/WebCore/rendering/RenderInline.cpp
Log Message:
-----------
REGRESSION (303091@main): getClientRects() can include rects with no width
and height
https://bugs.webkit.org/show_bug.cgi?id=308175
<rdar://problem/170681795>
Reviewed by Antti Koivisto.
303091@main introduced inline box construction for visually empty lines (see
the example in that revision).
As a result, these empty inline boxes are now exposed through geometry APIs
such as getClientRects().
However, this behavior differs from other engines and from WebKit's shipping
behavior.
Although these empty inline boxes are necessary for determining enclosing
geometries, they can -and should- be excluded when collecting results for
geometry APIs.
(Note that we only omit zero rects where both height and width are 0).
Test: fast/inline/empty-inline-box-bounding-rect.html
*
LayoutTests/fast/block/inside-inlines/getClientRects-on-inline-box-missing-entry-expected.txt:
* LayoutTests/fast/inline/empty-inline-box-bounding-rect-expected.txt: Added.
* LayoutTests/fast/inline/empty-inline-box-bounding-rect.html: Added.
* Source/WebCore/rendering/RenderInline.cpp:
(WebCore::RenderInline::generateLineBoxRects const):
Canonical link: https://commits.webkit.org/307916@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications