servo-patches: drop dead code the series introduces, and normalise the files - #3
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the five compiler warnings the
servo-patches/series produces in itsown code, and regenerates the whole series to one consistent format.
The warnings
integration.rs:312unused importkurbo::Shape as _integration.rs:313unused importsLayoutElement as _,LayoutNode as _integration.rs:406unused importLayoutElementscene.rs:16unused importRgbasvgstyleelement.rs:164methodget_stylesheetis never usedAll five are pre-existing in the series as authored, not fallout from the
base moving off
f4dde27:f4dde27and to77fccaccyields byte-identicalintegration.rs,scene.rsandsvgstyleelement.rs.f4dde27..77fccaccdelta touches inline text shaping,script_module,globalscope,node, webcrypto, android/mach/CI anddependency bumps.
components/shared/layout— whereLayoutNodeandLayoutElementlive — is untouched, as iscomponents/script/dom/svg/.kurbois pinned at0.13.1on both.Per patch:
svg_geometrycarries a copy of the import blockbounds_ofgenuinely needs. The wrapper only calls
Rect::width/Rect::height, whichare inherent, so nothing resolves through those traits.
bounds_of's owncopy is left alone.
enclosing_viewport_basislikewise importedLayoutElementwithout calling anything through it.scene.rskeptRgbain itssuper::paintimport when thispatch replaced
fill: Option<(Rgba, FillRule)>with thePaint-basedfield. 0010 introduced the import legitimately; 0017 stranded it.
SVGStyleElement::get_stylesheethas never had a caller. ItsHTMLStyleElementcounterpart exists to feedget_cssom_stylesheet, whichthis 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
Fromlines, 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.0signature blocks in 0002 and 0005.Regenerated with
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 --3wayneeds the blob ids to fall back at all. Author, dateand message bodies are untouched; only
Subjectfolding moves, because theprefix widened. File names and series numbering are unchanged.
Verification
Through the README's "Using a patched Servo" recipe — servo
77fccacc,stylo
67faaab3, andrust-content-security-policy, with the fullten-entry
[patch.crates-io]block andfeatures = ["patched-servo"]:git am(as step 2 documents, no--3way) applies 24/24 on bothf4dde27and77fccacc, producing identical trees either way.5/5viagit apply --3way, csp1/1viagit am.exactly those above; nothing new appears. Nothing is left anywhere under
components/layout/svg/orcomponents/script/dom/svg/.removals.
Reviewer note
CI does not exercise any of this.
ci.ymlbuilds against stock libservo withno
[patch]overrides, and.patchfiles are not compiled — it will pass orfail exactly as
maindoes. The verification above is the only evidence.🤖 Generated with Claude Code