Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 72507aefee70488d92075839e96d6bf5d9bcb53c
https://github.com/WebKit/WebKit/commit/72507aefee70488d92075839e96d6bf5d9bcb53c
Author: Alan Baradlay <[email protected]>
Date: 2025-12-23 (Tue, 23 Dec 2025)
Changed paths:
A
LayoutTests/fast/block/inside-inlines/hidpi-missing-hugging-outline-expected.html
A LayoutTests/fast/block/inside-inlines/hidpi-missing-hugging-outline.html
M Source/WebCore/platform/graphics/PathUtilities.cpp
Log Message:
-----------
Hugging outline fails to enclose trailing content
https://bugs.webkit.org/show_bug.cgi?id=304613
Reviewed by Antti Koivsito.
GeometryUtilities::findIntersection may produce slightly different intersection
points when the input coordinates are flipped,
due to floating-point arithmetic.
e.g.
p1: { x = 706.5, y = 58.5 } p2: { x = 7.5, y = 58.5 }
d1: { x = 16.5, y = 57.5 } d2: { x = 16.5, y = 76.5 }
This yields an intersection at { x = 16.5, y = 58.5 }.
If the inputs are flipped:
p1: { x = 16.5, y = 57.5 } p2: { x = 16.5, y = 76.5 }
d1: { x = 706.5, y = 58.5 } d2: { x = 7.5, y = 58.5 }
(i.e. p1-p2 and d1-d2 are swapped),
the computed intersection becomes { x = 16.5000153, y = 58.5 }.
When pathWithShrinkWrappedRectsForOutline encounters corner points that are
this close together, it may fail to create a line between them.
FloatPointGraph::findOrCreateNode is intended to filter out duplicate corners,
and this change ensures that such near-identical points are correctly
recognized as the same node.
Test: fast/block/inside-inlines/hidpi-missing-hugging-outline.html
*
LayoutTests/fast/block/inside-inlines/hidpi-missing-hugging-outline-expected.html:
Added.
* LayoutTests/fast/block/inside-inlines/hidpi-missing-hugging-outline.html:
Added.
* Source/WebCore/platform/graphics/PathUtilities.cpp:
(WebCore::FloatPointGraph::findOrCreateNode): Note that epsilon is a percent
value.
Canonical link: https://commits.webkit.org/304908@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications