1 <!-- Based on fast/repaint/mix-blend-mode-separate-stacking-context.html -->
13 <script src=
"resources/paint-invalidation-test.js" type=
"text/javascript"></script>
14 <!-- Repaint test to ensure that setting a blend mode dynamically triggers this operation
15 only with the contents of the nearest ancestor stacking context. -->
16 <body onload=
"runPaintInvalidationTest()">
17 <div style=
"background: green; position: relative; z-index: -1;">
18 <div id=
"first" style=
"mix-blend-mode: normal; background-color: blue;"></div>
20 <div style=
"background: green; position: relative; z-index: -1;">
21 <div id=
"second" style=
"mix-blend-mode: hue; background-color: blue;"></div>
23 <div style=
"background: green; position: relative; z-index: -1;">
24 <div id=
"third" style=
"mix-blend-mode: hue; background-color: blue;"></div>
26 <div id=
"fourth" style=
"background: green;">
27 <div style=
"mix-blend-mode: hue; background-color: blue;"></div>
31 window
.expectedPaintInvalidationObjects
= [
32 "LayoutBlockFlow (floating) DIV id='second'",
33 "LayoutBlockFlow (relative positioned) (floating) DIV",
34 "LayoutBlockFlow (floating) DIV id='first'",
35 "LayoutBlockFlow (relative positioned) (floating) DIV",
36 "LayoutBlockFlow (floating) DIV id='second'",
37 "LayoutBlockFlow (floating) DIV id='third'",
38 "LayoutBlockFlow (relative positioned) (floating) DIV id='fourth'",
39 "LayoutBlockFlow (floating) DIV",
41 function paintInvalidationTest() {
42 document
.getElementById('first').style
.mixBlendMode
= "multiply";
43 document
.getElementById('second').style
.mixBlendMode
= "normal";
44 document
.getElementById('third').style
.mixBlendMode
= "multiply";
45 document
.getElementById('fourth').style
.position
= "relative";
46 document
.getElementById('fourth').style
.zIndex
= -1;