[webkit-changes] [WebKit/WebKit] 8cf800: An infinite loop happens when drawing wavy underli...
Said Abou-Hallawa
noreply at github.com
Fri Jan 31 22:00:09 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8cf800b33c662574f43084f92d26ca705e39a8c2
https://github.com/WebKit/WebKit/commit/8cf800b33c662574f43084f92d26ca705e39a8c2
Author: Said Abou-Hallawa <said at apple.com>
Date: 2025-01-31 (Fri, 31 Jan 2025)
Changed paths:
A LayoutTests/fast/text/text-large-x-small-size-wavy-style-expected.txt
A LayoutTests/fast/text/text-large-x-small-size-wavy-style.html
M Source/WebCore/rendering/TextDecorationPainter.cpp
Log Message:
-----------
An infinite loop happens when drawing wavy underline for small text at a very large x-position
https://bugs.webkit.org/show_bug.cgi?id=286831
rdar://141022987
Reviewed by Simon Fraser.
If the text is displayed at x which is larger than 2^23 and the wavy step is less
than 0.5, the for-loop in strokeWavyTextDecoration() will not terminate. We will
keep adding PathSegements to the Path till WebKit jetsams.
The fix is to use `double` for for-loop control variable so it can add the small
step and we eventually exit the for-loop.
* LayoutTests/fast/text/text-large-x-small-size-wavy-style-expected.txt: Added.
* LayoutTests/fast/text/text-large-x-small-size-wavy-style.html: Added.
* Source/WebCore/rendering/TextDecorationPainter.cpp:
(WebCore::strokeWavyTextDecoration):
Canonical link: https://commits.webkit.org/289659@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list