Skip to content

css: bound the payload cloned when splitting target-incompatible selectors - #31913

Open
robobun wants to merge 8 commits into
mainfrom
farm/7c1c01a3/css-split-clone-budget
Open

css: bound the payload cloned when splitting target-incompatible selectors#31913
robobun wants to merge 8 commits into
mainfrom
farm/7c1c01a3/css-split-clone-budget

css: charge clone weight for custom-property names and selector text

cda35aa
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jun 6, 2026 in 25m 18s

Code review found 1 important issue

Found 5 candidates, confirmed 4. See review comments for details.

Details

Severity Count
🔴 Important 1
🟡 Nit 0
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important src/css/rules/mod.rs:1086-1094 clone_weight still undercounts four more borrowed-text carriers

Annotations

Check failure on line 1094 in src/css/rules/mod.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

clone_weight still undercounts four more borrowed-text carriers

🔴 Round 3 of the same gap family — four more variants carry input-sized borrowed text re-emitted per clone but fall through `_ => 0`: `PseudoElement::ViewTransition{Group,ImagePair,Old,New}.part_name` (`CustomIdent` text), `PseudoElement::{CueFunction,CueRegionFunction}.selector` (wrapped `Box<Selector>` never reached by `selector_slice`), `PseudoClass::{Local,Global}.selector` (same shape, CSS-modules-gated), and `UnknownAtRule.name` in `rule()`'s `Unknown` arm (prelude/block are charged but `n