fix(images): parse source sizes with shared CSS primitives by ldm0 · Pull Request #1796 · lexmount/moli · GitHub
Skip to content

fix(images): parse source sizes with shared CSS primitives - #1796

Open
ldm0 wants to merge 1 commit into
mainfrom
wpt/20261021-image-source-sizes
Open

ldm0 wants to merge 1 commit into
mainfrom
wpt/20261021-image-source-sizes

Conversation

@ldm0

@ldm0 ldm0 commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Parse responsive-image sizes with the native CSS length and media condition machinery, preserving list boundaries and viewport-dependent candidate selection. Cover calc/math, invalid branches and document-owned media conditions without another ad-hoc length grammar. Preserve an in-flight image request across equivalent source-size expressions using its existing exact request identity, while restarting when URL, CORS or density changes. Adapt to current cssparser/Stylo APIs while explicitly rejecting percentages and retaining unsimplified multiplication/division until computed-value validation.

Validation on base bd0ddc3f8d88: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast. All passed (20,525 passed, 18 existing skips; 32 build jobs and test threads, no automatic retries). Focused regressions also passed.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Spider Bench A/B

⚠️ Spider Bench infrastructure failed before a comparison could be produced.

Workflow: failure. Inspect the workflow run for the failing build, harness, or artifact step.

No benchmark result or performance conclusion is available for this run.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

CI Regression Report

Source CI run · source state at render: failure · artifacts: 0/6

Check Status Signal
Release regression ⚪ artifact unavailable or invalid
Frontend differential ⚪ artifact unavailable or invalid
Agent episodes ⚪ artifact unavailable or invalid
Runtime/CDP contracts ⚪ artifact unavailable or invalid
CDP smoke ⚪ artifact unavailable or invalid
WebMainBench ⚪ artifact unavailable or invalid
Release regression — ⚪ artifact unavailable or invalid

Artifact unavailable or invalid. See the source CI run for infrastructure details.

Frontend differential — ⚪ artifact unavailable or invalid

Artifact unavailable or invalid. See the source CI run for infrastructure details.

Agent episodes · Moli vs Chromium — ⚪ artifact unavailable or invalid

Artifact unavailable or invalid. See the source CI run for infrastructure details.

Runtime and CDP session contracts — ⚪ artifact unavailable or invalid

Artifact unavailable or invalid. See the source CI run for infrastructure details.

CDP smoke — ⚪ artifact unavailable or invalid

Artifact unavailable or invalid. See the source CI run for infrastructure details.

WebMainBench · 545 pages — ⚪ artifact unavailable or invalid

Artifact unavailable or invalid. See the source CI run for infrastructure details.

All artifact fields are parsed by the trusted default-branch renderer; missing or invalid inputs remain visible as unavailable.

Replace comma/string splitting with CSS component parsing and shared Stylo length math and media conditions. Resolve sizes against the owning document viewport, initial font metrics and emulated media features. Validate computed math before property clamping and retain fractional CSS pixels.

Canonicalize zero source sizes, including negative zero, to positive infinite density so request keys cannot abort the renderer. Keep existing auto sizing behavior while requiring an exact leading CSS auto identifier. Cover CSS boundaries, media conditions, non-finite math, request reuse and successful decode without layout.
@ldm0
ldm0 force-pushed the wpt/20261021-image-source-sizes branch from 3a431f4 to c635d52 Compare October 22, 2026 04:58
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.

1 participant