Skip to content

Implement text decoration styles (rebased) - #753

Merged
nicoburns merged 19 commits into
mainfrom
text-decoration-styles-rebased
Aug 19, 2026
Merged

Implement text decoration styles (rebased)#753
nicoburns merged 19 commits into
mainfrom
text-decoration-styles-rebased

Conversation

@nicoburns

@nicoburns nicoburns commented Aug 19, 2026

Copy link
Copy Markdown
Member

Summary

Rebase of #510 onto latest main (couldn't push to the fork branch, so opening as a new PR).

Implements:

  • text-decoration-style (solid / double / dotted / dashed / wavy, with geometry built explicitly for cross-renderer consistency; dashed gap selection mirrors Blink's SelectBestDashGap)
  • text-decoration-thickness
  • text-decoration-inset
  • text-underline-offset
  • text-underline-position
  • overline support

Decorations are now accumulated per "decorating box" across a whole line (LineDecoration keyed by node id) and flushed once per line, so mixed font sizes within a box draw a single straight line rather than stepped per-run segments (matching Firefox). Overline/strikethrough placement uses the OS/2 usWinAscent (via a new read-fonts dependency), matching browser behaviour.

Rebase changes vs #510:

  • resolved import conflicts in packages/blitz-paint/src/text.rs
  • new commit "Adapt text-decoration code to NodeId newtype": node ids in the new decoration code (DecorationStackEntry, LineDecoration, path_scratch, stroke_text's inline_root_id) changed from usize to the NodeId newtype introduced on main

Verified with cargo check, clippy, fmt, and by rendering examples/assets/text-decoration.html with the screenshot example.

Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/1e40516b22b34e3d89abb619530f4b45
Requested by: @nicoburns

WPT results

18 newly passing, 11 newly failing (net +7).

Full diff (29 changed tests)
- Pass => Fail css/CSS2/text/painting-order-underline-001.xht
+ Fail => Pass css/css-text-decor/text-decoration-dotted-002.html
+ Fail => Pass css/css-text-decor/text-decoration-inset-001.html
+ Fail => Pass css/css-text-decor/text-decoration-inset-007.html
- Pass => Fail css/css-text-decor/text-decoration-inset-010.html
+ Fail => Pass css/css-text-decor/text-decoration-inset-015.html
+ Fail => Pass css/css-text-decor/text-decoration-inset-016.html
+ Fail => Pass css/css-text-decor/text-decoration-inset-024.html
- Pass => Fail css/css-text-decor/text-decoration-propagation-dynamic-001.html
+ Fail => Pass css/css-text-decor/text-decoration-propagation-shadow.html
+ Fail => Pass css/css-text-decor/text-decoration-style-multiple.html
- Pass => Fail css/css-text-decor/text-decoration-style-recalc.html
+ Fail => Pass css/css-text-decor/text-decoration-subelements-002.html
- Pass => Fail css/css-text-decor/text-decoration-subelements-004.html
+ Fail => Pass css/css-text-decor/text-decoration-thickness-001.html
+ Fail => Pass css/css-text-decor/text-decoration-thickness-calc.html
+ Fail => Pass css/css-text-decor/text-decoration-thickness-fixed.html
+ Fail => Pass css/css-text-decor/text-decoration-thickness-linethrough-001.html
+ Fail => Pass css/css-text-decor/text-decoration-thickness-scroll-001.html
+ Fail => Pass css/css-text-decor/text-decoration-thickness-single.html
+ Fail => Pass css/css-text-decor/text-underline-offset-001.html
- Pass => Fail css/css-text-decor/text-underline-offset-002.html
+ Fail => Pass css/css-text-decor/text-underline-offset-negative.html
+ Fail => Pass css/css-text-decor/text-underline-offset-scroll-001.html
- Pass => Fail css/css-text-decor/text-underline-offset-variable.html
- Pass => Fail css/css-text-decor/text-underline-offset-vertical-001.html
- Pass => Fail css/css-text-decor/text-underline-offset-vertical-002.html
- Pass => Fail css/css-text-decor/text-underline-offset-vertical-003.html
- Pass => Fail css/selectors/not-links.html

Generated by the WPT workflow.

@staging-devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@staging-devin-ai-integration
staging-devin-ai-integration Bot force-pushed the text-decoration-styles-rebased branch from 998e6c3 to b2f357e Compare August 19, 2026 13:09
@nicoburns
nicoburns enabled auto-merge (squash) August 19, 2026 13:30
@nicoburns
nicoburns merged commit 2c75d47 into main Aug 19, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant