Paint text decorations at the decorating box's baseline; repin parley - #833
Open
nicoburns wants to merge 4 commits into
Open
Paint text decorations at the decorating box's baseline; repin parley#833nicoburns wants to merge 4 commits into
nicoburns wants to merge 4 commits into
Conversation
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
staging-devin-ai-integration
Bot
force-pushed
the
devin/1788386630-vertical-align
branch
from
September 8, 2026 14:37
e96d37d to
8db3deb
Compare
staging-devin-ai-integration
Bot
force-pushed
the
devin/1788397525-vertical-align-fixes
branch
5 times, most recently
from
September 9, 2026 16:24
6daf4dc to
87a1e04
Compare
staging-devin-ai-integration
Bot
force-pushed
the
devin/1788386630-vertical-align
branch
from
September 10, 2026 20:45
1d54d87 to
69a9265
Compare
staging-devin-ai-integration
Bot
force-pushed
the
devin/1788397525-vertical-align-fixes
branch
from
September 10, 2026 20:46
87a1e04 to
ba8dd10
Compare
Underlines/overlines/line-throughs of a decorating element are drawn at that element's inline-box baseline on each line (via Line::style_baseline through the parley style parent chain) instead of at each glyph run's shifted baseline, so vertically aligned descendants no longer carry the decoration with them. Pin parley to 1fd63fba72b38df9ec14892bd6f20e96fe2c1176, which adds Style::parent / Line::style_baseline and stops a trailing space from starting an extra empty line.
staging-devin-ai-integration
Bot
force-pushed
the
devin/1788397525-vertical-align-fixes
branch
from
September 10, 2026 21:12
ba8dd10 to
c3e984a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #832, from running the WPT suite against it (report posted on #832).
Decoration baseline (
blitz-paint/src/text.rs). Underline/overline/line-through of an element were drawn per glyph run at that run's shifted baseline, so<u>a <sup>b</sup></u>drew thebpart of the underline raised with thesup. CSS 2 §16.3.1: the decoration is positioned by the decorating box, and descendants withvertical-aligndon't move it.stroke_textnow takes the wholeparley::Layout(not just the line iterator) and, for each decoration entry owned bynode_id, walks the run's style up the Parley style tree (Style::parent()) to the style whose brush is that node and usesLine::style_baseline(index):DecorationRunGeometry::baselineis now "baseline of the decorating box on this line". Fixescss/CSS2/text/text-decoration-va-length-001.xht.Parley repin →
c12395697bc595007febe3dab7ed7219b4590899(DioxusLabs/parley#23 = #18's head + linebender/parley#762 + the fixes): adds the two accessors above, and stops a trailing space from starting an empty final line / breaking after the first hanging space. This is what fixes thepre-wrap-00[1-7],white-space-pre-wrap-trailing-spaces-*,hanging-whitespace-004WPTs; #762 itself brings thetext-justify-and-trailing-spaces-*,word-break-break-all-018/021,inline-block-zorder-004/005passes.WPT (4 required dirs + visudet/normal-flow/css1/css-values, 4188 run): main 2420 → #832 2507 → this 2533 passing. PASS→FAIL:
break-spaces-001/010,white-space-intrinsic-size-001(white-space: break-spacesis mapped topre-wrap,stylo_to_parley.rs:291TODO; they only passed via the old break-after-first-space bug) andline-break-anywhere-overrides-uax-behavior-004/006(accidental passes noted in #762's description).Note:
cargo clippy -p blitz-paint -D warningsfails on a pre-existingneedless_returninblitz-dom/src/mutator.rs:1250(not touched here);cargo clippy -p blitz-dom -D warningsandcargo check --workspace --all-targetspass.Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/881b791ebc35447fb39a382f186fa28c
Open in Devin Desktop: https://dioxus.staging.devinenterprise.com/desktop/session/881b791ebc35447fb39a382f186fa28c?variant=devin-insiders
Requested by: @nicoburns
WPT results
Subtests: 424 newly passing, 99 newly failing (net +325).
Full diff (407 changed tests)
Generated by the WPT workflow.