Skip to content

Implement random() function, enabled by default - #520

Merged
Loirooriol merged 1 commit into
servo:mainfrom
Loirooriol:enable-random
Nov 14, 2026
Merged

Loirooriol merged 1 commit into
servo:mainfrom
Loirooriol:enable-random

Conversation

@Loirooriol

@Loirooriol Loirooriol commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Enable the layout.css.random.enabled pref by default, and add the required logic so that it works correctly.

Firefox is shipping it: https://bugzil.la/2072252

Servo PR: servo/servo#49830

Fixes: #500

@Loirooriol Loirooriol changed the title Enable layout.css.random.enabled pref by default Implement random() function, enabled by default Nov 13, 2026
Enable the `layout.css.random.enabled` pref by default, and add the
required logic so that it works correctly.

Firefox is shipping it: https://bugzil.la/2072252

Signed-off-by: Oriol Brufau <[email protected]>
@Loirooriol
Loirooriol marked this pull request as ready for review November 14, 2026 08:53
@Loirooriol
Loirooriol added this pull request to the merge queue Nov 14, 2026
Merged via the queue into servo:main with commit f1e2aba Nov 14, 2026
6 checks passed
@Loirooriol
Loirooriol deleted the enable-random branch November 14, 2026 09:19
kvnloo pushed a commit to kvnloo/servo that referenced this pull request Nov 14, 2026
Bumps Stylo to servo/stylo#520

We will now have to provide Stylo a document-scoped 128-bit hashing key
for `random()` to work correctly.

Testing: Various tests improve.
`/css/css-values/random-in-media.tentative.html` fails like in Firefox.

Signed-off-by: Oriol Brufau <[email protected]>
aphrody-dev pushed a commit to aphrody-labs/browser that referenced this pull request Nov 16, 2026
Bumps Stylo to servo/stylo#520

We will now have to provide Stylo a document-scoped 128-bit hashing key
for `random()` to work correctly.

Testing: Various tests improve.
`/css/css-values/random-in-media.tentative.html` fails like in Firefox.

Signed-off-by: Oriol Brufau <[email protected]>
staging-devin-ai-integration Bot pushed a commit to DioxusLabs/blitz that referenced this pull request Nov 28, 2026
- Handle DisplayOutside::InternalRuby and the ruby/webkit-box DisplayInside
  variants, now compiled for Servo (servo/stylo#539)
- Map the modern AlignmentBaseline values, now compiled for Servo behind
  layout.css.baseline-metric.modern.enabled (servo/stylo#535)
- Pass a per-document random() hasher key to Device::new (servo/stylo#520)
- Fill the new prefers-contrast/-reduced-motion/-reduced-transparency
  MediaData fields with NoPreference (servo/stylo#528)
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.

Enable layout.css.random.enabled

2 participants