Skip to content

Allow LonghandsToSerialize to check for initial value regardless of pref - #534

Merged
Loirooriol merged 1 commit into
servo:mainfrom
Loirooriol:has_initial_specified_value
Nov 24, 2026
Merged

Loirooriol merged 1 commit into
servo:mainfrom
Loirooriol:has_initial_specified_value

Conversation

@Loirooriol

Copy link
Copy Markdown
Collaborator

This is a cherry-pick of b43c3e7 from upstream (https://phabricator.services.mozilla.com/D343762).

LonghandsToSerialize serialization typically needs to check if longhands are set to their initial values.

This was specially tedious when a longhand is gated by a pref in Servo, but not in Gecko. Because then the value will be wrapped in an Option only in Servo.

This patch adds some helper methods that take care of that, simplifying the code.

No behavior change.

This is a cherry-pick of b43c3e7
from upstream (https://phabricator.services.mozilla.com/D343762).

`LonghandsToSerialize` serialization typically needs to check if longhands
are set to their initial values.

This was specially tedious when a longhand is gated by a pref in Servo,
but not in Gecko. Because then the value will be wrapped in an `Option`
only in Servo.

This patch adds some helper methods that take care of that, simplifying
the code.

No behavior change.
@Loirooriol
Loirooriol added this pull request to the merge queue Nov 24, 2026
Merged via the queue into servo:main with commit 9f33725 Nov 24, 2026
6 checks passed
@Loirooriol
Loirooriol deleted the has_initial_specified_value branch November 24, 2026 21:43
Loirooriol added a commit to Loirooriol/stylo that referenced this pull request Nov 25, 2026
…alue()` (servo#536)

If a property is disabled, then treat it as having its initial value.

Fixes a mistake from servo#534

Servo PR: servo/servo#50203

Signed-off-by: Oriol Brufau <[email protected]>
Loirooriol added a commit to Loirooriol/servo that referenced this pull request Nov 25, 2026
…ss of pref (servo#50203)

Bumps Stylo to servo/stylo#534 +
servo/stylo#536 fix

Testing: None, no behavior change

Signed-off-by: Oriol Brufau <[email protected]>
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.

2 participants