Skip to content

[do not merge] Enable all SVG CSS properties - #396

Draft
nicoburns wants to merge 29 commits into
servo:mainfrom
nicoburns:svg
Draft

nicoburns wants to merge 29 commits into
servo:mainfrom
nicoburns:svg

Conversation

@nicoburns

Copy link
Copy Markdown
Collaborator

This is the first commit from #383 that enables all SVG CSS properties in Stylo builds on Servo. Popping it here as a draft so that I can use it as a git dependency while developing an SVG implementation in Blitz.

I'm anticipating it being a while before that work is ready to land in Blitz, so we can work out how best to land this later.

@nicoburns nicoburns changed the title Enable all SVG CSS properties [do not merge] Enable all SVG CSS properties Jun 16, 2026
delan and others added 12 commits July 2, 2026 01:39
Any ancestors of this commit are from upstream mozilla-central, with
some filtering and renaming. Our patches and sync tooling start here.

The sync tooling has all been squashed into this commit, based on:
https://github.com/servo/stylo/commits/64731e10dc8ef87ef52aa2fb9f988c3b2530f3a7
This is a rebase of 5685b27

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
nicoburns and others added 7 commits July 8, 2026 08:39
)

A couple more keyword/bitflag properties that I'm implementing in Blitz,
and would like to enable behind the `layout.unimplemented` pref.

Signed-off-by: Nico Burns <nico@nicoburns.com>
…#406)

Servo PR: servo/servo#46118

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Corresponding servo PR is at servo/servo#45492

Signed-off-by: Psychpsyo (Cameron) <60073468+Psychpsyo@users.noreply.github.com>
Removes `engine = "gecko"` from 11 SVG-specific CSS properties to be
enabled for servo:

- **Fill (3):** `fill`, `fill-opacity`, `fill-rule`
- **Stroke (8):** `stroke`, `stroke-width`, `stroke-linecap`,
`stroke-linejoin`, `stroke-dasharray`, `stroke-dashoffset`,
`stroke-miterlimit`, `stroke-opacity`

Also updates the `ComputedValues` size test (224 → 232) for the new
fields.

Servo [PR](servo/servo#45405)

---------

Signed-off-by: Mohamed Mostafa mu-mostafa98@gmail.com
Co-authored-by: Mohamed Mostafa <mu-mostafa98@gmail.com>
This is a partial revert of servo#340. Waiting for an available macOS runner
frequently takes very long, which makes it annoying when trying to land
multiple patches, since they need to also be coordinated with the
companion patches in Servo.

So I think it's better to not wait for the macOS job after all. We will
still wait for the Linux and Windows ones.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Already landed upstream:
https://phabricator.services.mozilla.com/D311004
(71a8a43)

Importing it here early to prevent other PRs from adding new
Servo-specific derives due to copy-pasting.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Removes `engine = "gecko"` from 8 SVG-geometric properties to be enabled
for servo:

- `x`
- `y`
- `cx`
- `cy`
- `rx`
- `ry`
- `r`
- `d`

Servo [PR](servo/servo#46558)

Signed-off-by: Mohamed Mostafa <mu.mostafa98@gmail.com>
simonwuelker and others added 4 commits July 16, 2026 18:37
servo#377)

Servo PR: servo/servo#45308

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Oddly enough the longhand itself was already enabled. Its not yet
supported in servo though.

Servo PR: servo/servo#46618

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
…` if delay changes (servo#422)

If the delay in an animation changes, we still might need to update the
`Paused` state if the animation is moving from `Playing` to `Paused`.

Servo PR: servo/servo#46689

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
… Blitz (servo#426)

Enables `text-decoration-thickness`, `text-decoration-inset`,
`text-underline-offset`, and `text-underline-position` for Servo builds
of Stylo, behind the `layout.unimplemented` feature flag.

The shorthand `text-decoration` is updated to account for
`text-decoration-thickness` being enabled (this aligns Servo's
implementation with Gecko's for this property).

Servo PR:

- servo/servo#46592

---------

Signed-off-by: Nico Burns <nico@nicoburns.com>
Loirooriol and others added 3 commits August 4, 2026 08:40
Fixes: servo#433

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Every fragment in the fragment tree stores:

```rust
pub struct PseudoElementChain {
    pub primary: Option<PseudoElement>,
    pub secondary: Option<PseudoElement>,
}
```

… so this change reduces memory use slightly

Signed-off-by: Simon Sapin <simon@igalia.com>
Signed-off-by: Simon Sapin <simon@igalia.com>
TimvdLippe and others added 3 commits August 7, 2026 16:30
With these changes, both the `color-scheme` CSS property is supported,
as well as the required logic to act upon it.

Supersedes and closes servo#411

Servo PR: servo/servo#47042

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
All members of these structs already derive/implement Clone, so this is
trivial. Required for cloning an HTMLLinkElement's source set when
constructing LinkProcessingOptions.

Signed-off-by: lumiscosity <averyrudelphe@gmail.com>
- Remove engine = gecko gating and servo_pref gating from SVG
properties and shorthands.
- Update size_of_test.

Signed-off-by: Mohamed Mostafa mu-mostafa98@gmail.com
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.

10 participants