Skip to content

servo-patches: drop dead code the series introduces, and normalise the files - #3

Merged
jonathanKingston merged 1 commit into
mainfrom
claude/great-matsumoto-0df43e
Aug 25, 2026
Merged

jonathanKingston merged 1 commit into
mainfrom
claude/great-matsumoto-0df43e

Conversation

@jonathanKingston

Copy link
Copy Markdown
Contributor

Fixes the five compiler warnings the servo-patches/ series produces in its
own code, and regenerates the whole series to one consistent format.

The warnings

Warning Introduced by
integration.rs:312 unused import kurbo::Shape as _ 0016
integration.rs:313 unused imports LayoutElement as _, LayoutNode as _ 0016
integration.rs:406 unused import LayoutElement 0016
scene.rs:16 unused import Rgba 0017
svgstyleelement.rs:164 method get_stylesheet is never used 0023

All five are pre-existing in the series as authored, not fallout from the
base moving off f4dde27:

  • Applying the series to f4dde27 and to 77fccacc yields byte-identical
    integration.rs, scene.rs and svgstyleelement.rs.
  • Upstream's f4dde27..77fccacc delta touches inline text shaping,
    script_module, globalscope, node, webcrypto, android/mach/CI and
    dependency bumps. components/shared/layout — where LayoutNode and
    LayoutElement live — is untouched, as is components/script/dom/svg/.
  • kurbo is pinned at 0.13.1 on both.

Per patch:

  • 0016svg_geometry carries a copy of the import block bounds_of
    genuinely needs. The wrapper only calls Rect::width/Rect::height, which
    are inherent, so nothing resolves through those traits. bounds_of's own
    copy is left alone. enclosing_viewport_basis likewise imported
    LayoutElement without calling anything through it.
  • 0017scene.rs kept Rgba in its super::paint import when this
    patch replaced fill: Option<(Rgba, FillRule)> with the Paint-based
    field. 0010 introduced the import legitimately; 0017 stranded it.
  • 0023SVGStyleElement::get_stylesheet has never had a caller. Its
    HTMLStyleElement counterpart exists to feed get_cssom_stylesheet, which
    this patch deliberately does not implement ("No CSSOM sheet accessor" in its
    own message; the WebIDL it adds is a bare interface with no LinkStyle).
    Deleting it is what that message already claims.

0019–0022 change only because their context and blob ids shift behind those
edits.

Format normalisation

The files had accumulated three generations of git: real vs zeroed From
lines, plain [PATCH] beside stale [PATCH 10/17] and [PATCH 19/21]
numbering in a series that is now 24 long, 10- and 11-character index
abbreviations, and leftover 2.43.0 signature blocks in 0002 and 0005.
Regenerated with

git format-patch --zero-commit --no-signature --full-index --numbered

against f4dde27, the revision the series is authored against.

Full index lines are the substantive part — abbreviation width follows the
generating repository's object count, so the old files were not reproducible,
and git apply --3way needs the blob ids to fall back at all. Author, date
and message bodies are untouched; only Subject folding moves, because the
prefix widened. File names and series numbering are unchanged.

Verification

Through the README's "Using a patched Servo" recipe — servo 77fccacc,
stylo 67faaab3, and rust-content-security-policy, with the full
ten-entry [patch.crates-io] block and features = ["patched-servo"]:

  • Plain git am (as step 2 documents, no --3way) applies 24/24 on both
    f4dde27 and 77fccacc, producing identical trees either way.
  • stylo 5/5 via git apply --3way, csp 1/1 via git am.
  • Complete warning set, before → after: 6914 → 6909. The five removed are
    exactly those above; nothing new appears. Nothing is left anywhere under
    components/layout/svg/ or components/script/dom/svg/.
  • The only semantic change to the applied tree, on either base, is those five
    removals.

Reviewer note

CI does not exercise any of this. ci.yml builds against stock libservo with
no [patch] overrides, and .patch files are not compiled — it will pass or
fail exactly as main does. The verification above is the only evidence.

🤖 Generated with Claude Code

…e files

Five warnings in the series' own code, every one of them present since the
patch that introduces it rather than fallout from the base moving off
f4dde27: the three files come out byte-identical whether the series is
applied to f4dde27 or 77fccacc, components/shared/layout is untouched
between those revisions, and kurbo is pinned to 0.13.1 on both.

  0016  svg_geometry carried a copy of the `use kurbo::Shape as _` and
        `use layout_api::{LayoutElement as _, LayoutNode as _}` block that
        bounds_of genuinely needs; the wrapper only calls Rect::width and
        Rect::height, which are inherent. enclosing_viewport_basis likewise
        imported LayoutElement without calling anything through it.

  0017  scene.rs kept Rgba in its super::paint import while this patch
        replaced `fill: Option<(Rgba, FillRule)>` with the Paint-based
        field. 0010 introduced the import legitimately; 0017 stranded it.

  0023  SVGStyleElement::get_stylesheet has never had a caller. Its
        HTMLStyleElement counterpart exists to feed get_cssom_stylesheet,
        which this patch deliberately does not implement -- "No CSSOM sheet
        accessor" in its own message, and the WebIDL it adds is a bare
        interface with no LinkStyle. Deleting it is what that message
        already claims.

0019-0022 change only because their context and blob ids shift behind those
edits.

Also regenerate all 24 to a single format. They had accumulated three
generations of git: real versus zeroed From lines, plain [PATCH] beside
stale [PATCH 10/17] and [PATCH 19/21] numbering in a series that is now 24
long, 10- and 11-character index abbreviations, and leftover 2.43.0
signature blocks in 0002 and 0005. Regenerated with

  git format-patch --zero-commit --no-signature --full-index --numbered

against f4dde27, the revision the series is authored against. Full index
lines are the substantive part: abbreviation width follows the generating
repository's object count, so the old files were not reproducible, and
`git apply --3way` needs the blob ids to fall back at all. Author, date and
message bodies are untouched; only Subject folding moves, because the
prefix widened.

Verified through the README's "Using a patched Servo" recipe. Plain
`git am` applies 24/24 on both f4dde27 and 77fccacc and produces identical
trees either way; against servo 77fccacc, stylo 67faaab3 and the csp patch,
the complete warning set drops from 6914 to 6909 -- exactly those five,
with nothing new, and nothing left anywhere under components/layout/svg or
components/script/dom/svg.

Note that CI does not exercise any of this: ci.yml builds against stock
libservo with no [patch] overrides, and .patch files are not compiled.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@jonathanKingston
jonathanKingston merged commit 95dada3 into main Aug 25, 2026
4 checks passed
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