Bug 224483

Summary: text-decoration-thickness property doesn't always trigger repaint when changed
Product: WebKit Reporter: Vanita Barrett-Smith <vanita.barrett>
Component: TextAssignee: Tim Nguyen (:ntim) <ntim>
Status: RESOLVED FIXED    
Severity: Normal CC: mmaxfield, ntim, oliver.byford, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: Mac (Intel)   
OS: macOS 10.15   
See Also: https://github.com/web-platform-tests/wpt/pull/37799
Attachments:
Description Flags
HTML example (alternative to CodePen) none

Description Vanita Barrett-Smith 2021-04-13 05:59:48 PDT
Created attachment 425866 [details]
HTML example (alternative to CodePen)

## Steps to reproduce
1. Open https://codepen.io/36degrees/pen/LYxQBbm or the attached example.html
2. Hover over both links of the links on the line “17px link / with colour change” - text decoration thickness property expands to 3px
3. Hover over both of the links on the line “19px link / with colour change” - text decoration thickness property only expands to 3px on the link with colour change.

## Expected Behaviour 
The text underline thickness should increase to 3px on all links when hovered.

## Actual Behaviour
In this example, the text-decoration-thickness only increases to 3px on hover on links up to a font-size of 19px, unless the link also has a colour change on hover.

The font-size at which the text-decoration-thickness property stops working changes depending on the thickness being set on hover. In the CodePen / attached example, text-decoration-thickness is set to 3px on hover and stops working at links of font-size: 19px. Other examples:

text-decoration-thickness on hover: 2px 
font-size value at which it stops working: 15px

text-decoration-thickness on hover: 5px 
font-size value at which it stops working: 27px
Comment 1 Alexey Proskuryakov 2021-04-13 14:55:58 PDT
In Safari 14.1, the underlines for 19px+ links are not painted at all (but the color ones are). Not sure if we'd want to track this aspect as a separate bug.
Comment 2 Radar WebKit Bug Importer 2021-04-20 06:00:17 PDT
<rdar://problem/76895249>
Comment 3 Tim Nguyen (:ntim) 2023-01-07 23:31:46 PST
I have a fix for this.
Comment 4 Tim Nguyen (:ntim) 2023-01-08 00:00:06 PST
Pull request: https://github.com/WebKit/WebKit/pull/8372
Comment 5 Tim Nguyen (:ntim) 2023-01-08 00:01:22 PST
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/37799
Comment 6 EWS 2023-01-08 13:14:10 PST
Committed 258641@main (6be98ae1629f): <https://commits.webkit.org/258641@main>

Reviewed commits have been landed. Closing PR #8372 and removing active labels.