stylo: use simplified restyle damage macros (#38465)

Servo PR for https://github.com/servo/stylo/pull/222

Fixes: #38506
Testing: adding new tests

---------

Signed-off-by: Nico Burns <nico@nicoburns.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Nico Burns 2025-08-07 11:41:22 +01:00 committed by GitHub
parent 616b86fb6d
commit 52ba8facc2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 112 additions and 12 deletions

View file

@ -125283,6 +125283,19 @@
{}
]
],
"mix-blend-mode-stacking-context-002.html": [
"29d205cfcb19ffc64e3e64d9b5dbf4df1b495e8f",
[
null,
[
[
"/css/reference/ref-filled-green-200px-square.html",
"=="
]
],
{}
]
],
"mix-blend-mode-stacking-context-creates-isolation.html": [
"79edf0f0908731949e8005f699f09ed1b3ceed69",
[
@ -218074,6 +218087,19 @@
{}
]
],
"clip-path-stacking-context-001.html": [
"65948ea5bfd028db117497248dae538f77927bb4",
[
null,
[
[
"/css/reference/ref-filled-green-200px-square.html",
"=="
]
],
{}
]
],
"clip-path-strokeBox-1a.html": [
"37cec39ff808bc51e837ecc9d03725a22c20a989",
[

View file

@ -0,0 +1,37 @@
<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>CSS Compositing: mix-blend-mode changing dynamically</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.fxtf.org/compositing-1/#mix-blend-mode">
<link rel="help" href="https://github.com/servo/servo/issues/38506">
<meta name="assert" content="Dynamic changes of mix-blend-mode can start or stop establishing a stacking context.">
<link rel="match" href="../../reference/ref-filled-green-200px-square.html">
<style>
.target {
width: 200px;
height: 100px;
position: relative;
}
.target > div {
position: absolute;
inset: 0;
z-index: -1;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="a" class="target" style="mix-blend-mode: normal; background: red">
<div style="background: green"></div>
</div>
<div id="b" class="target" style="mix-blend-mode: multiply; background: green">
<div style="background: red"></div>
</div>
<script src="/common/reftest-wait.js"></script>
<script>
requestAnimationFrame(() => requestAnimationFrame(() => {
document.getElementById("a").style.mixBlendMode = "multiply";
document.getElementById("b").style.mixBlendMode = "normal";
takeScreenshot();
}));
</script>
</html>

View file

@ -0,0 +1,37 @@
<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>CSS Masking: clip-path changing dynamically</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.fxtf.org/css-masking/#the-clip-path">
<link rel="help" href="https://github.com/servo/servo/issues/38506">
<meta name="assert" content="Dynamic changes of clip-path can start or stop establishing a stacking context.">
<link rel="match" href="../../reference/ref-filled-green-200px-square.html">
<style>
.target {
width: 200px;
height: 100px;
position: relative;
}
.target > div {
position: absolute;
inset: 0;
z-index: -1;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="a" class="target" style="clip-path: none; background: red">
<div style="background: green"></div>
</div>
<div id="b" class="target" style="clip-path: inset(0); background: green">
<div style="background: red"></div>
</div>
<script src="/common/reftest-wait.js"></script>
<script>
requestAnimationFrame(() => requestAnimationFrame(() => {
document.getElementById("a").style.clipPath = "inset(0)";
document.getElementById("b").style.clipPath = "none";
takeScreenshot();
}));
</script>
</html>