Visitar URL original
Fix sticky positioning lifecycle and geometry issues from #887 by nicoburns · Pull Request #960 · DioxusLabs/blitz · GitHub
Skip to content

Fix sticky positioning lifecycle and geometry issues from #887 - #960

Open
nicoburns wants to merge 26 commits into
mainfrom
devin/1790527540-sticky-review-fixes
Open

nicoburns wants to merge 26 commits into
mainfrom
devin/1790527540-sticky-review-fixes

Conversation

@nicoburns

@nicoburns nicoburns commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes the ten new High/Medium findings from the review of #887, in review order with a separate implementation commit per issue.

The base branch mirrors that PR's exact head, e6c68325ed5f44d7b245448ce4ab489c92355d15, because its fork branch is not writable here. This PR contains only the follow-up fixes; it does not target main.

Ordered fixes

  1. Validate removed nodes and cached dependencies before scroll-time refresh.
  2. Clear stale visual offsets when sticky registration ends.
  3. Register generated ::before / ::after boxes during box construction.
  4. Recompute ancestor ordering after reparenting.
  5. Canonicalize root overflow to viewport scroll state and dimensions.
  6. Reduce the effective logical end inset when the sticky view rectangle cannot fit the border box.
  7. Target the current sticky position in scrollIntoView().
  8. Separate local offsets from inherited table-part offsets; cache the cells receiving each shift instead of recursively adding to their local offset.
  9. Measure non-atomic inline stickies from their Parley fragments and apply the same offsets to CSSOM, hits, text positions, glyphs, backgrounds, decorations, selection, and atomic children.
  10. Use actual scrollports through fixed ancestors, while excluding viewport scroll from viewport-fixed constraints. Share fixed-containing-block detection across geometry, paint, and hits.

Follow-up commits fix a test borrow and issues found during integration validation: viewport hit coordinates, root filter hints, and discarded anonymous layout ancestors. Public hit testing accepts viewport coordinates; pointer dispatch retains its document-coordinate path.

Validation

  • cargo test --workspace — passed, including 18 sticky integration regressions and a CPU-rendered pixel comparison before/after scrolling.
  • cargo test -p blitz-dom sticky --lib — 8 passed.
  • cargo clippy --workspace — passed without warnings.
  • cargo fmt --all --check and git diff --check — passed.
  • Focused WPT runs verified both root-filter-hint tests pass and the multicol/inline crash test now passes (it crashes on the exact base).
  • CI — all 15 checks passed (archive job skipped).

WPT caveats

position-sticky-scrollIntoView.html expects the unshifted position and now fails. That expectation conflicts with CSS Position §3.4.1, which requires the offsetted position. Fix 7 follows the current spec; the upstream test was not modified.

sticky-anchor-position-invalid.html fails on both this branch and the exact PR 887 base; verified by running the same WPT selection in both worktrees.

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

WPT results

Subtests: 216 newly passing, 2 newly failing (net +214).

Subtest changes by area (10 areas)
+ css                   | +214 (+216 / -2) | 59.64% -> 59.75% ( +0.11%) | 118842 -> 119056 / 199259
!   css-anchor-position |   +0 (  +1 / -1) | 13.89% -> 13.89% ( +0.00%) |   1933 ->   1933 /  13916
+   css-contain         |   +1 (  +1 / -0) | 47.69% -> 47.79% ( +0.10%) |    465 ->    466 /    975
+   css-grid            |   +4 (  +4 / -0) | 77.99% -> 78.01% ( +0.02%) |  13731 ->  13735 /  17606
+     alignment         |   +4 (  +4 / -0) | 83.70% -> 83.90% ( +0.20%) |   1638 ->   1642 /   1957
+   css-position        |  +63 ( +64 / -1) | 66.11% -> 69.74% ( +3.62%) |   1149 ->   1212 /   1738
+     sticky            |  +62 ( +63 / -1) | 31.71% -> 69.51% (+37.80%) |     52 ->    114 /    164
+   css-tables          |   +1 (  +1 / -0) | 53.06% -> 53.15% ( +0.09%) |    590 ->    591 /   1112
+     tentative         |   +1 (  +1 / -0) | 28.69% -> 28.97% ( +0.28%) |    103 ->    104 /    359
+   cssom               | +145 (+145 / -0) | 78.61% -> 81.92% ( +3.31%) |   3448 ->   3593 /   4386
Full diff (48 changed tests)
+ FAIL => PASS      [1/1]   +1  css/css-anchor-position/anchor-sticky-fixed-drift.html
- PASS => FAIL      [0/1]   -1  css/css-anchor-position/sticky-anchor-position-invalid.html
+ FAIL => PASS      [1/1]   +1  css/css-contain/contain-layout-021.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
+ 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-fixed-ancestor.html
+ FAIL => PASS      [1/1]   +1  css/css-position/sticky/position-sticky-flexbox.html
+ FAIL => FAIL      [1/3]   +1  css/css-position/sticky/position-sticky-get-bounding-client-rect.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
- PASS => FAIL      [0/1]   -1  css/css-position/sticky/position-sticky-scrollIntoView.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

@nicoburns
nicoburns changed the base branch from devin/1790528855-sticky-887-base to main October 13, 2026 10:37
@staging-devin-ai-integration
staging-devin-ai-integration Bot force-pushed the devin/1790527540-sticky-review-fixes branch 2 times, most recently from 019d937 to f12a8fc Compare October 28, 2026 22:42
LinuxBoy-96 and others added 25 commits October 30, 2026 16:26

This branch has not been deployed

No deployments
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