Visitar URL original
Sticky: expose sticky-resolved insets to getComputedStyle (on top of #887) by nicoburns · Pull Request #950 · DioxusLabs/blitz · GitHub
Skip to content

Sticky: expose sticky-resolved insets to getComputedStyle (on top of #887) - #950

Closed
nicoburns wants to merge 10 commits into
mainfrom
devin/1790445330-sticky-resolved-insets-on-887
Closed

nicoburns wants to merge 10 commits into
mainfrom
devin/1790445330-sticky-resolved-insets-on-887

Conversation

@nicoburns

@nicoburns nicoburns commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

Summary

This PR is stacked on #887 and is currently rebased onto its head 6beade9f. #887 comes from a fork, so this PR targets main and its diff includes #887. Only the last commit is new.

getComputedStyle now returns the sticky insets that #887's sticky code actually uses, rather than recomputing the scrollport in resolved_style.rs. As a result, css/cssom/getComputedStyle-insets-sticky*.html now test the sticky implementation's scrollport lookup and percentage resolution.

  • sticky.rs: adds BaseDocument::sticky_resolved_insets(node) -> Option<Rect<Option<f32>>>. It reads StickyConstraints.{top,right,bottom,left} from the registry, as set by the last update_sticky_offsets().
  • resolved_style.rs: adds a Position::Sticky arm. A non-auto inset resolves to the value above in px. An auto inset, or a box with no constraints yet, falls back to the computed value.
  • sticky.rs fix: percentage insets now resolve against the scroll container's content box. Previously they resolved against the padding box (size - border), because padding was not subtracted. The abspos WPT variant catches this: it expects 18.4px, which is 10% of the 184px content height, not of the 200px padding box.

Local WPT results, compared with the #887 head 6beade9f:

  • getComputedStyle-insets-sticky.html: 180/252 → 252/252
  • getComputedStyle-insets-sticky-container-for-abspos.html: 180/252 → 252/252
  • getComputedStyle-insets-relative.html and getComputedStyle-insets-static.html: unchanged, both still fully passing
  • css/css-position/sticky: no test changed status (114/164 subtests)

Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/c0abbbd0d6164e688cd103ac2998dff3
Open in Devin Desktop: https://dioxus.staging.devinenterprise.com/desktop/session/c0abbbd0d6164e688cd103ac2998dff3?variant=devin-insiders
Requested by: @nicoburns

WPT results

Subtests: 212 newly passing, 2 newly failing (net +210). Crashes: +1.

Full diff (44 changed tests)
- PASS => FAIL       [0/1]   -1  css/css-anchor-position/sticky-anchor-position-invalid.html
+ FAIL => PASS       [2/2]   +2  css/css-grid/alignment/grid-column-axis-alignment-sticky-positioned-items-002.html
+ FAIL => PASS       [2/2]   +2  css/css-grid/alignment/grid-row-axis-alignment-sticky-positioned-items-002.html
- PASS => CRASH      [0/1]   -1  css/css-position/crashtests/inline-containing-block-multicol-balancing-001.html
+ FAIL => PASS       [1/1]   +1  css/css-position/position-sticky-dynamic-ancestor-001.html
+ FAIL => PASS       [1/1]   +1  css/css-position/sticky/position-sticky-bottom-002.html
+ FAIL => PASS       [1/1]   +1  css/css-position/sticky/position-sticky-bottom-003.html
+ FAIL => PASS       [1/1]   +1  css/css-position/sticky/position-sticky-bottom-007.html
+ FAIL => PASS       [3/3]   +2  css/css-position/sticky/position-sticky-bottom.html
+ FAIL => PASS       [1/1]   +1  css/css-position/sticky/position-sticky-contained-by-display-table.html
+ FAIL => PASS       [1/1]   +1  css/css-position/sticky/position-sticky-escape-scroller-004.html
+ FAIL => PASS       [1/1]   +1  css/css-position/sticky/position-sticky-fixed-ancestor-002.html
+ FAIL => PASS       [1/1]   +1  css/css-position/sticky/position-sticky-fixed-ancestor-003.html
+ FAIL => PASS       [1/1]   +1  css/css-position/sticky/position-sticky-flexbox.html
+ FAIL => PASS       [4/4]   +4  css/css-position/sticky/position-sticky-horizontal-rtl-overconstrained.html
+ FAIL => PASS       [1/1]   +1  css/css-position/sticky/position-sticky-in-fixed-container.html
+ FAIL => PASS       [1/1]   +1  css/css-position/sticky/position-sticky-inflow-position.html
+ FAIL => PASS       [4/4]   +4  css/css-position/sticky/position-sticky-left-and-right-overconstrained.html
+ FAIL => PASS       [3/3]   +2  css/css-position/sticky/position-sticky-left.html
+ FAIL => PASS       [3/3]   +2  css/css-position/sticky/position-sticky-margins.html
+ FAIL => PASS       [5/5]   +3  css/css-position/sticky/position-sticky-nested-bottom.html
+ FAIL => PASS       [5/5]   +4  css/css-position/sticky/position-sticky-nested-left.html
+ FAIL => PASS       [5/5]   +3  css/css-position/sticky/position-sticky-nested-right.html
+ FAIL => PASS       [5/5]   +4  css/css-position/sticky/position-sticky-nested-top.html
+ FAIL => PASS       [1/1]   +1  css/css-position/sticky/position-sticky-offset-overflow.html
+ FAIL => PASS       [1/1]   +1  css/css-position/sticky/position-sticky-offset-print.html
+ FAIL => PASS       [2/2]   +2  css/css-position/sticky/position-sticky-offset-top-left.html
+ FAIL => PASS       [1/1]   +1  css/css-position/sticky/position-sticky-padding-001.html
+ FAIL => PASS       [1/1]   +1  css/css-position/sticky/position-sticky-padding-002.html
+ FAIL => PASS       [3/3]   +2  css/css-position/sticky/position-sticky-right.html
+ FAIL => PASS       [1/1]   +1  css/css-position/sticky/position-sticky-root-scroller.html
+ FAIL => PASS       [1/1]   +1  css/css-position/sticky/position-sticky-rtl.html
+ FAIL => FAIL       [1/2]   +1  css/css-position/sticky/position-sticky-single-axis-basic.html
+ FAIL => PASS       [1/1]   +1  css/css-position/sticky/position-sticky-single-axis-nested.html
+ FAIL => PASS       [1/1]   +1  css/css-position/sticky/position-sticky-top-002.html
+ FAIL => PASS       [1/1]   +1  css/css-position/sticky/position-sticky-top-003.html
+ FAIL => PASS       [1/1]   +1  css/css-position/sticky/position-sticky-top-and-bottom-003.html
+ FAIL => PASS       [4/4]   +4  css/css-position/sticky/position-sticky-top-and-bottom-overconstrained.html
+ FAIL => PASS       [2/2]   +2  css/css-position/sticky/position-sticky-top-and-bottom.html
+ FAIL => PASS       [3/3]   +2  css/css-position/sticky/position-sticky-top.html
+ FAIL => FAIL       [1/3]   +1  css/css-tables/tentative/position-sticky-container.html
+ FAIL => PASS   [252/252]  +72  css/cssom/getComputedStyle-insets-sticky-container-for-abspos.html
+ FAIL => PASS   [252/252]  +72  css/cssom/getComputedStyle-insets-sticky.html
+ FAIL => PASS       [1/1]   +1  css/cssom/getComputedStyle-sticky-pos-percent.html

Generated by the WPT workflow.

@staging-devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access that start with 'Devin'.

  • Disable automatic comment, CI, and merge conflict monitoring

@staging-devin-ai-integration
staging-devin-ai-integration Bot force-pushed the devin/1790445330-sticky-resolved-insets-on-887 branch from 07283e4 to e6c6832 Compare September 27, 2026 12:56
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.

2 participants