Bug 283621
Summary: | Repaint not triggered when only text-underline-offset changes | ||
---|---|---|---|
Product: | WebKit | Reporter: | s7tya |
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | bfulgham, koivisto, simon.fraser, webkit-bug-importer, zalan |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari 18 | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
s7tya
# Step to reproduce
1) Go to https://jsfiddle.net/6t73Lekh/ (or use the code provided below)
2) Hover your cursor over the links.
```html
<style>
a {
text-decoration: underline;
text-decoration-skip-ink: none;
&:hover {
text-underline-offset: -5px;
}
}
#ok:hover {
color: orange;
}
</style>
<a href="https://example.com" id="ok">OK</div>
<a href="https://example.com" id="ng">NG</div>
```
Expected Results:
A repaint should be triggered, and the underline should move up to the middle of the link when hovering.
Actual Results:
The repaint does not occur, and the underline remains in its original position for now.
# Potential Cause:
This issue might be due to a missing comparison in the `RenderStyle::changeRequiresRepaintIfText`.
Specifically, we should check: `m_rareInheritedData->textUnderlineOffset != other.m_rareInheritedData->textUnderlineOffset`.
https://github.com/mdubet/WebKit/blob/4a51bf6f3d5146526cc00c18289073f512e40637/Source/WebCore/rendering/style/RenderStyle.cpp#L1345-L1354
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
s7tya
Oops, I accidentally shared the fork URL. Here's the original: https://github.com/WebKit/WebKit/blob/d0f5adbe2b117c3a9c7755d54e7ddf643b8a672f/Source/WebCore/rendering/style/RenderStyle.cpp#L1346-L1353
s7tya
Pull request: https://github.com/WebKit/WebKit/pull/37074
EWS
Committed 287048@main (958c0c8b47a0): <https://commits.webkit.org/287048@main>
Reviewed commits have been landed. Closing PR #37074 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/140517513>