Latest Results
feat: implement CSS stacking context support with paint-order sorting
Move paint-order logic from the iOS renderer into the engine's
extract_layout_tree phase so all renderers receive correctly ordered
LayoutBox trees per CSS2.1 Appendix E.
- Add creates_stacking_context() detecting 15 CSS triggers (position,
z-index, opacity, transform, filter, backdrop-filter, perspective,
clip-path, mix-blend-mode, isolation, contain, container-type,
will-change, flex/grid items)
- Add sort_children_by_paint_order() using stable sort with
(paint_layer, z_index) composite key and DOM-order tiebreaking
- Add creates_stacking_context field to LayoutBox
- Remove flat z-index sort from iOS renderer (now just iterates
children in engine-provided order)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>claude/festive-chatterjee feat: implement CSS stacking context support with Appendix E paint order
Re-implement stacking context on the new EngineRenderer<R> architecture.
Engine side (engine/src/layout/stacking.rs):
- PaintLayer enum with repr(u8) discriminants matching Appendix E steps
- creates_stacking_context() detects 12 CSS properties (position,
z-index, opacity, transform, filter, perspective, mix-blend-mode,
isolation, contain, will-change)
- apply_paint_order() does 3-pass in-place sort: detect SC β classify
children β stable-sort by (PaintLayer, z_index), then recurse
- Wired into compute_layout() so LayoutBox trees arrive pre-sorted
Renderer side (ios-renderer-backend):
- Replaced per-node Vec<&LayoutBox> z-index sort with plain DFS
- Added child_index tracking to NodeSnapshot for reattach on reorder
27 e2e tests covering SC detection, paint layer classification,
full Appendix E ordering, nested isolation, and stable sort.
https://claude.ai/code/session_01CG8HRdm2T5rYjVXU1oDCzWclaude/research-stacking-context-14sv2 feat: Parley text layout, iOS text rendering, and commit hook wiring (#49)
## Summary
- **Parley text layout**: Replace `MockTextMeasurer` with real text
measurement via Parley (`FontContext` + `LayoutContext`), supporting
font size, weight, and line wrapping. `TextLayoutContext` is owned by
`Document` and created eagerly.
- **iOS text rendering**: Full pipeline from DOM text nodes β
`LayoutBox` β text ops β `CATextLayer`. Adds 6 new op-codes
(`DeclareText`, `SetTextContent`, `SetTextFont`, `SetTextColor`,
`DetachText`, `ReleaseText`) with a string table for variable-length
text content.
- **Commit hook wiring**: `RuntimeState.commit_hook` delivers
`LayoutBox` β `ViewTree` β `OpBuffer` β completion callback, resolving
the long-standing TODO in `thread.rs`. Ops and string table are now
delivered to Swift on every `__commit`.
- **WASM `__create_text_node`**: New host function + `rust-wasm-binding`
wrapper for WASM guests to create text nodes.
- **iOS tests**: Fix broken Xcode tests (missing
`demoWat`/`postRunWat`), add `paws_renderer_post_run_wat` FFI, and add 3
text rendering tests (`testTextNodeCreatesTextLayer`,
`testTextLayerHasContent`, `testTextLayerHasNonZeroFrame`).
- **iOS CI**: New `ios-tests.yml` workflow on `macos-15` runner with
simulator-based `xcodebuild test`.
## Test plan
- [x] `cargo test --all` β 308 tests pass
- [x] `cargo clippy --all-targets --all-features -- -D warnings` β clean
- [x] `cargo fmt --check` β clean
- [ ] iOS simulator tests via `xcodebuild test` (new CI workflow)
π€ Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> test: add comprehensive e2e tests for stacking context features
Add 19 new tests (27 total) covering:
- SC detection: sticky, absolute+z-index, transform, filter,
perspective, mix-blend-mode, isolation
- Negative tests: opacity:1, position:static should NOT create SC
- Paint layer classification: float, inline, positioned z-auto,
negative z-index, positive z-index
- Complex scenarios: full Appendix E order, multiple z-index levels,
nested SC isolation, stable sort with equal z-index, deeply nested
independent sorting
https://claude.ai/code/session_01CG8HRdm2T5rYjVXU1oDCzWclaude/research-stacking-context-14sv2 Latest Branches
-33%
claude/festive-chatterjee -35%
claude/research-stacking-context-14sv2 +38%
Β© 2026 CodSpeed Technology