Repository navigation
stylo: Implement random() function, enabled by default - #49830
Conversation
|
🔨 Triggering try run (#43066746592) for Linux (WPT) |
|
Test results for linux-wpt from try job (#43066746592): Flaky unexpected result (17)
Stable unexpected results that are known to be intermittent (9)
Stable unexpected results (6)
|
|
|
|
OK, there is a problem here, it's always <!DOCTYPE html>
<div style="background-color: black; height: 100px; opacity: random(--foo, 0, 1)"></div>
<script>console.log(getComputedStyle(document.querySelector("div")).opacity);</script>Maybe we need to randomize the seed or something. |
a541630 to
7bd0318
Compare
layout.css.random.enabled pref by defaultrandom() function, enabled by default
|
🔨 Triggering try run (#43519746389) for Linux (WPT) |
7bd0318 to
4bdf48b
Compare
|
4bdf48b to
8e1bddd
Compare
|
Test results for linux-wpt from try job (#43519746389): Flaky unexpected result (20)
Stable unexpected results that are known to be intermittent (12)
Stable unexpected results (1)
|
|
|
8e1bddd to
3389096
Compare
Signed-off-by: Oriol Brufau <[email protected]>
3389096 to
b04cdc3
Compare
|
Someone thinks this change could be added to the monthly blog post! To help with this, we need someone to answer the following questions: 😄
If this change is part of a broader feature/project please make sure the PR description contains a Please add Thanks for helping us prepare the monthly blog post! ❤️ |
|
@servo-highfive monthly update answer
|
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: servo#500 Signed-off-by: Oriol Brufau <[email protected]>
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.htmlfails like in Firefox.