mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Update web-platform-tests to revision b'797e75946c24d0625f04247b16d33c26d4ada273'
This commit is contained in:
parent
4339b3bab4
commit
44e249bebb
414 changed files with 12588 additions and 11565 deletions
|
@ -37,8 +37,7 @@
|
|||
</video>
|
||||
<br>
|
||||
|
||||
<!-- audio element with controls, and a few other misc replaced elements: -->
|
||||
<audio class="inline-contained" data-expected-width="0" data-expected-height="40" controls></audio>
|
||||
<!-- other misc replaced elements: -->
|
||||
<canvas class="inline-contained" data-expected-width="0" data-expected-height="150"></canvas>
|
||||
<svg class="inline-contained" data-expected-bounding-client-rect-width="0"
|
||||
data-expected-bounding-client-rect-height="150"></svg>
|
||||
|
@ -81,7 +80,6 @@
|
|||
<source src="/media/white.mp4" type="video/mp4">
|
||||
</video>
|
||||
|
||||
<audio class="inline-contained" data-expected-width="300" data-expected-height="0" controls></audio>
|
||||
<canvas class="inline-contained" data-expected-width="300" data-expected-height="0"></canvas>
|
||||
<svg class="inline-contained" data-expected-bounding-client-rect-width="300"
|
||||
data-expected-bounding-client-rect-height="0"></svg>
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
"#container width 400px after padding is applied. #second is removed from the rendering");
|
||||
|
||||
// Reduce width by 1px to test that a re-layout is not stateful.
|
||||
vertical.style.width = "399px";
|
||||
vertical.style.width = "499px";
|
||||
|
||||
test(() => assert_equals(padded.offsetHeight, 100),
|
||||
"#container height measured with 499px width. Both container children visible");
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
<!doctype html>
|
||||
<title>Evaluation of style queries</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-contain-3/#container-rule">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="support/cq-testcommon.js"></script>
|
||||
<style>
|
||||
#container {
|
||||
--applied: false;
|
||||
--foo: bar;
|
||||
}
|
||||
</style>
|
||||
<div id=container>
|
||||
<div id=inner></div>
|
||||
</div>
|
||||
<script>
|
||||
setup(() => assert_implements_container_queries());
|
||||
|
||||
function test_query(query, expected) {
|
||||
test((t) => {
|
||||
let style = document.createElement('style');
|
||||
t.add_cleanup(() => { style.remove(); });
|
||||
style.innerText = `@container ${query} { #inner { --applied:true; } }`;
|
||||
let cs = getComputedStyle(inner);
|
||||
assert_equals(cs.getPropertyValue('--applied'), 'false');
|
||||
document.head.append(style);
|
||||
assert_equals(cs.getPropertyValue('--applied'), expected.toString());
|
||||
}, query);
|
||||
};
|
||||
|
||||
// Note that the following assumes that elements are style containers by
|
||||
// default [1], and that:
|
||||
//
|
||||
// - style(--foo: bar) is a query that returns 'true', and
|
||||
// - style(--baz: qux) is a query that returns 'false'.
|
||||
//
|
||||
// [1] https://github.com/w3c/csswg-drafts/issues/7066
|
||||
|
||||
// Nesting in <style-query>:
|
||||
test_query('style((--foo: bar))', true);
|
||||
test_query('style((--baz: qux))', false);
|
||||
test_query('style((unknown))', false);
|
||||
test_query('unknown((--foo: bar))', false);
|
||||
|
||||
// "not" in <style-query>:
|
||||
test_query('style(not (--foo: bar))', false);
|
||||
test_query('style(not (--baz: qux))', true);
|
||||
test_query('style(not (unknown))', false);
|
||||
|
||||
// "and" in <style-query>:
|
||||
test_query('style((--foo: bar) and (--foo: bar))', true);
|
||||
test_query('style((--foo: bar) and (--foo: bar) and (--foo: bar))', true);
|
||||
test_query('style((--baz: qux) and (--baz: qux))', false);
|
||||
test_query('style((--baz: qux) and (--foo: bar) and (--foo: bar))', false);
|
||||
test_query('style((--foo: bar) and (--baz: qux) and (--foo: bar))', false);
|
||||
test_query('style((--foo: bar) and (--foo: bar) and (--baz: qux))', false);
|
||||
test_query('style((unknown) and (--foo: bar) and (--foo: bar))', false);
|
||||
test_query('style((--foo: bar) and (unknown) and (--foo: bar))', false);
|
||||
test_query('style((--foo: bar) and (--foo: bar) and (unknown))', false);
|
||||
|
||||
// "or" in <style-query>:
|
||||
test_query('style((--foo: bar) or (--foo: bar))', true);
|
||||
test_query('style((--foo: bar) or (--foo: bar) or (--foo: bar))', true);
|
||||
test_query('style((--baz: qux) or (--baz: qux))', false);
|
||||
test_query('style((--baz: qux) or (--foo: bar) or (--foo: bar))', true);
|
||||
test_query('style((--foo: bar) or (--baz: qux) or (--foo: bar))', true);
|
||||
test_query('style((--foo: bar) or (--foo: bar) or (--baz: qux))', true);
|
||||
test_query('style((unknown) or (--foo: bar) or (--foo: bar))', true);
|
||||
test_query('style((--foo: bar) or (unknown) or (--foo: bar))', true);
|
||||
test_query('style((--foo: bar) or (--foo: bar) or (unknown))', true);
|
||||
test_query('style((unknown) or (--baz: qux) or (--foo: bar))', true);
|
||||
|
||||
// Combinations, <style-query>:
|
||||
test_query('style(not ((--foo: bar) and (--foo: bar)))', false);
|
||||
test_query('style(not ((--foo: bar) and (--baz: qux)))', true);
|
||||
test_query('style((--foo: bar) and (not ((--baz: qux) or (--foo: bar))))', false);
|
||||
test_query('style((--baz: qux) or (not ((--baz: qux) and (--foo: bar))))', true);
|
||||
test_query('style((--baz: qux) or ((--baz: qux) and (--foo: bar)))', false);
|
||||
|
||||
</script>
|
|
@ -84,53 +84,4 @@
|
|||
test_query('((height) or (not ((height) and (width))))', true);
|
||||
test_query('((height) or ((height) and (width)))', false);
|
||||
|
||||
// Note that the following assumes that elements are style containers by
|
||||
// default [1], and that:
|
||||
//
|
||||
// - style(width: 1px) is a query that returns 'true', and
|
||||
// - style(height: 2px) is a query that returns 'false'.
|
||||
//
|
||||
// [1] https://github.com/w3c/csswg-drafts/issues/7066
|
||||
|
||||
// Nesting in <style-query>:
|
||||
test_query('style((width: 1px))', true);
|
||||
test_query('style((height: 2px))', false);
|
||||
test_query('style((unknown))', false);
|
||||
test_query('unknown((width: 1px))', false);
|
||||
|
||||
// "not" in <style-query>:
|
||||
test_query('style(not (width: 1px))', false);
|
||||
test_query('style(not (height: 2px))', true);
|
||||
test_query('style(not (unknown))', false);
|
||||
|
||||
// "and" in <style-query>:
|
||||
test_query('style((width: 1px) and (width: 1px))', true);
|
||||
test_query('style((width: 1px) and (width: 1px) and (width: 1px))', true);
|
||||
test_query('style((height: 2px) and (height: 2px))', false);
|
||||
test_query('style((height: 2px) and (width: 1px) and (width: 1px))', false);
|
||||
test_query('style((width: 1px) and (height: 2px) and (width: 1px))', false);
|
||||
test_query('style((width: 1px) and (width: 1px) and (height: 2px))', false);
|
||||
test_query('style((unknown) and (width: 1px) and (width: 1px))', false);
|
||||
test_query('style((width: 1px) and (unknown) and (width: 1px))', false);
|
||||
test_query('style((width: 1px) and (width: 1px) and (unknown))', false);
|
||||
|
||||
// "or" in <style-query>:
|
||||
test_query('style((width: 1px) or (width: 1px))', true);
|
||||
test_query('style((width: 1px) or (width: 1px) or (width: 1px))', true);
|
||||
test_query('style((height: 2px) or (height: 2px))', false);
|
||||
test_query('style((height: 2px) or (width: 1px) or (width: 1px))', true);
|
||||
test_query('style((width: 1px) or (height: 2px) or (width: 1px))', true);
|
||||
test_query('style((width: 1px) or (width: 1px) or (height: 2px))', true);
|
||||
test_query('style((unknown) or (width: 1px) or (width: 1px))', true);
|
||||
test_query('style((width: 1px) or (unknown) or (width: 1px))', true);
|
||||
test_query('style((width: 1px) or (width: 1px) or (unknown))', true);
|
||||
test_query('style((unknown) or (height: 2px) or (width: 1px))', true);
|
||||
|
||||
// Combinations, <style-query>:
|
||||
test_query('style(not ((width: 1px) and (width: 1px)))', false);
|
||||
test_query('style(not ((width: 1px) and (height: 2px)))', true);
|
||||
test_query('style((width: 1px) and (not ((height: 2px) or (width: 1px))))', false);
|
||||
test_query('style((height: 2px) or (not ((height: 2px) and (width: 1px))))', true);
|
||||
test_query('style((height: 2px) or ((height: 2px) and (width: 1px)))', false);
|
||||
|
||||
</script>
|
||||
|
|
|
@ -0,0 +1,271 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Container Queries Test: style query container for Shadow DOM</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-contain-3/#query-container">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/declarative-shadow-dom-polyfill.js"></script>
|
||||
<script src="support/cq-testcommon.js"></script>
|
||||
|
||||
<div id="inclusive-ancestor-across-root">
|
||||
<div style="--foo: bar">
|
||||
<template shadowrootmode="open">
|
||||
<style>
|
||||
@container style(--foo: bar) {
|
||||
#t1 { color: green; }
|
||||
}
|
||||
</style>
|
||||
<div id="t1"></div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="inclusive-ancestor-skip-slotting">
|
||||
<div style="--foo: bar">
|
||||
<template shadowrootmode="open">
|
||||
<div style="--foo: baz">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
<style>
|
||||
@container style(--foo: bar) {
|
||||
#t2 { color: green; }
|
||||
}
|
||||
</style>
|
||||
<div id="t2"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="inclusive-ancestor-slotted">
|
||||
<div style="--foo: baz">
|
||||
<template shadowrootmode="open">
|
||||
<style>
|
||||
@container style(--foo: bar) {
|
||||
::slotted(#t3) { color: green; }
|
||||
}
|
||||
</style>
|
||||
<slot style="--foo: bar"></slot>
|
||||
</template>
|
||||
<div id="t3"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="inclusive-ancestor-host" style="--foo: bar">
|
||||
<div id="t4">
|
||||
<template shadowrootmode="open">
|
||||
<style>
|
||||
@container style(--foo: bar) {
|
||||
:host(#t4) { color: green; }
|
||||
}
|
||||
</style>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="inclusive-ancestor-part">
|
||||
<div style="--foo: bar">
|
||||
<template shadowrootmode="open">
|
||||
<div style="--foo: baz">
|
||||
<span id="t5" part="part"></span>
|
||||
</div>
|
||||
</template>
|
||||
<style>
|
||||
@container style(--foo: bar) {
|
||||
#inclusive-ancestor-part > div::part(part) { color: green; }
|
||||
}
|
||||
</style>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="inclusive-ancestor-slotted-before">
|
||||
<div>
|
||||
<template shadowrootmode="open">
|
||||
<style>
|
||||
@container style(--foo: bar) {
|
||||
::slotted(#t6)::before {
|
||||
content: "X";
|
||||
color: green;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<slot style="--foo: bar"></slot>
|
||||
</template>
|
||||
<div id="t6" style="--foo: baz"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="inclusive-ancestor-host-before">
|
||||
<div id="t7" style="--foo: bar">
|
||||
<template shadowrootmode="open">
|
||||
<style>
|
||||
@container style(--foo: bar) {
|
||||
:host(#t7)::before {
|
||||
content: "X";
|
||||
color: green;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="inclusive-ancestor-part-before">
|
||||
<style>
|
||||
@container style(--foo: bar) {
|
||||
#inclusive-ancestor-part-before > div::part(part)::before {
|
||||
content: "X";
|
||||
color: green;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<div style="--foo: bar">
|
||||
<template shadowrootmode="open">
|
||||
<div style="--foo: baz">
|
||||
<span id="t8" part="part"></span>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="inclusive-ancestor-inner-part">
|
||||
<style>
|
||||
@container style(--foo: bar) {
|
||||
#inclusive-ancestor-inner-part > div::part(inner-part) { color: green; }
|
||||
}
|
||||
</style>
|
||||
<div style="--foo: bar">
|
||||
<template shadowrootmode="open">
|
||||
<div exportparts="inner-part" style="-foo: baz">
|
||||
<template shadowrootmode="open">
|
||||
<style>
|
||||
div {
|
||||
width: 200px;
|
||||
container-type: inline-size;
|
||||
}
|
||||
</style>
|
||||
<div style="--foo: baz">
|
||||
<span id="t9" part="inner-part"></span>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="inclusive-ancestor-slot-fallback">
|
||||
<div><template shadowrootmode="open">
|
||||
<style>
|
||||
@container style(--foo: bar) {
|
||||
#t10 { color: green; }
|
||||
}
|
||||
</style>
|
||||
<div>
|
||||
<slot style="--foo: bar"><span id="t10"></span></slot>
|
||||
</div>
|
||||
</template></div>
|
||||
</div>
|
||||
|
||||
<div id="no-container-for-part">
|
||||
<div>
|
||||
<template shadowrootmode="open">
|
||||
<style>
|
||||
#t11 { color: green; }
|
||||
</style>
|
||||
<div style="--foo: bar">
|
||||
<span id="t11" part="part"></span>
|
||||
</div>
|
||||
</template>
|
||||
<style>
|
||||
@container style(--foo: bar) {
|
||||
#no-container-for-part > div::part(part) { color: red; }
|
||||
}
|
||||
</style>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="inner-scope-host-part" style="--foo: bar">
|
||||
<div>
|
||||
<template shadowrootmode="open">
|
||||
<style>
|
||||
@container style(--foo: bar) {
|
||||
:host::part(part) { color: green; }
|
||||
}
|
||||
</style>
|
||||
<div style="--foo: baz">
|
||||
<span id="t12" part="part"></span>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
setup(() => {
|
||||
assert_implements_container_queries();
|
||||
polyfill_declarative_shadow_dom(document);
|
||||
});
|
||||
|
||||
const green = "rgb(0, 128, 0)";
|
||||
|
||||
test(() => {
|
||||
const t1 = document.querySelector("#inclusive-ancestor-across-root > div").shadowRoot.querySelector("#t1");
|
||||
assert_equals(getComputedStyle(t1).color, green);
|
||||
}, "Match container in outer tree");
|
||||
|
||||
test(() => {
|
||||
const t2 = document.querySelector("#t2");
|
||||
assert_equals(getComputedStyle(t2).color, green);
|
||||
}, "Match container in same tree, not walking flat tree ancestors");
|
||||
|
||||
test(() => {
|
||||
const t3 = document.querySelector("#t3");
|
||||
assert_equals(getComputedStyle(t3).color, green);
|
||||
}, "Match container in ::slotted selector's originating element tree");
|
||||
|
||||
test(() => {
|
||||
const t4 = document.querySelector("#t4");
|
||||
assert_equals(getComputedStyle(t4).color, green);
|
||||
}, "Match container in outer tree for :host");
|
||||
|
||||
test(() => {
|
||||
const t5 = document.querySelector("#inclusive-ancestor-part > div").shadowRoot.querySelector("#t5");
|
||||
assert_equals(getComputedStyle(t5).color, green);
|
||||
}, "Match container in ::part selector's originating element tree");
|
||||
|
||||
test(() => {
|
||||
const t6 = document.querySelector("#t6");
|
||||
assert_equals(getComputedStyle(t6, "::before").color, green);
|
||||
}, "Match container for ::before in ::slotted selector's originating element tree");
|
||||
|
||||
test(() => {
|
||||
const t7 = document.querySelector("#t7");
|
||||
assert_equals(getComputedStyle(t7, "::before").color, green);
|
||||
}, "Match container in outer tree for :host::before");
|
||||
|
||||
test(() => {
|
||||
const t8 = document.querySelector("#inclusive-ancestor-part-before > div").shadowRoot.querySelector("#t8");
|
||||
assert_equals(getComputedStyle(t8, "::before").color, green);
|
||||
}, "Match container for ::before in ::part selector's originating element tree");
|
||||
|
||||
test(() => {
|
||||
const outerhost = document.querySelector("#inclusive-ancestor-inner-part > div");
|
||||
const innerhost = outerhost.shadowRoot.querySelector("div");
|
||||
const t9 = innerhost.shadowRoot.querySelector("#t9");
|
||||
assert_equals(getComputedStyle(t9).color, green);
|
||||
}, "Match container for ::part selector's originating element tree for exportparts");
|
||||
|
||||
test(() => {
|
||||
const t10 = document.querySelector("#inclusive-ancestor-slot-fallback > div").shadowRoot.querySelector("#t10");
|
||||
assert_equals(getComputedStyle(t10).color, green);
|
||||
}, "Match container for slot light tree child fallback");
|
||||
|
||||
test(() => {
|
||||
const t11 = document.querySelector("#no-container-for-part > div").shadowRoot.querySelector("#t11");
|
||||
assert_equals(getComputedStyle(t11).color, green);
|
||||
}, "Should not match container inside shadow tree for ::part()");
|
||||
|
||||
test(() => {
|
||||
const t12 = document.querySelector("#inner-scope-host-part > div").shadowRoot.querySelector("#t12");
|
||||
assert_equals(getComputedStyle(t12).color, green);
|
||||
}, "A :host::part rule should match containers in the originating element tree");
|
||||
|
||||
</script>
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1439692">
|
||||
<style>
|
||||
body, fieldset { contain: strict; }
|
||||
</style>
|
||||
<script>
|
||||
function crash() {
|
||||
document.body.offsetTop;
|
||||
document.body.appendChild(document.createElement("fieldset"));
|
||||
}
|
||||
</script>
|
||||
<body onload="crash()">
|
|
@ -0,0 +1,35 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>CSS-contain test: style containment dynamic containment set invalidation</title>
|
||||
<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
|
||||
<link rel="match" href="reference/quote-scoping-invalidation-001-ref.html">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-style">
|
||||
|
||||
<style>
|
||||
#root {
|
||||
quotes: "A" "Z" "1" "9" "(" ")" "+" "-";
|
||||
}
|
||||
#root::before, #root span::before {
|
||||
content: open-quote;
|
||||
}
|
||||
#root::after {
|
||||
content: close-quote;
|
||||
}
|
||||
.contain-style {
|
||||
contain: style;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>Test passes if the text below is "A1(19" (not including the quotation marks).<p>
|
||||
<div id="root">
|
||||
<div id="scope">
|
||||
<span id="span1"></span>
|
||||
<span id="span2"></span>
|
||||
</div>
|
||||
<span></span>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.body.offsetTop;
|
||||
scope.style.contain = "style";
|
||||
</script>
|
|
@ -0,0 +1,37 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>CSS-contain test: style containment dynamic containment set unset invalidation</title>
|
||||
<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
|
||||
<link rel="match" href="reference/quote-scoping-invalidation-002-ref.html">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-style">
|
||||
|
||||
<style>
|
||||
#root {
|
||||
quotes: "A" "Z" "1" "9" "(" ")" "+" "-";
|
||||
}
|
||||
#root::before, #root span::before {
|
||||
content: open-quote;
|
||||
}
|
||||
#root::after {
|
||||
content: close-quote;
|
||||
}
|
||||
.contain-style {
|
||||
contain: style;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>Test passes if the text below is "A1(+-" (not including the quotation marks).<p>
|
||||
<div id="root">
|
||||
<div id="scope">
|
||||
<span id="span1"></span>
|
||||
<span id="span2"></span>
|
||||
</div>
|
||||
<span></span>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.body.offsetTop;
|
||||
scope.style.contain = "style";
|
||||
document.body.offsetTop;
|
||||
scope.style.contain = "";
|
||||
</script>
|
|
@ -0,0 +1,41 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>CSS-contain test: style containment dynamic containment set unset set invalidation</title>
|
||||
<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
|
||||
<link rel="match" href="reference/quote-scoping-invalidation-003-ref.html">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-style">
|
||||
|
||||
<style>
|
||||
#root {
|
||||
quotes: "A" "Z" "1" "9" "(" ")" "+" "-";
|
||||
}
|
||||
#root::before, #root span::before {
|
||||
content: open-quote;
|
||||
}
|
||||
#root::after {
|
||||
content: close-quote;
|
||||
}
|
||||
.contain-style {
|
||||
contain: style;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>Test passes if the text below is "A119" (not including the quotation marks).<p>
|
||||
<div id="root">
|
||||
<div id="scope">
|
||||
<span id="span1"></span>
|
||||
<span id="span2"></span>
|
||||
</div>
|
||||
<span></span>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.body.offsetTop;
|
||||
scope.style.contain = "style";
|
||||
document.body.offsetTop;
|
||||
scope.style.contain = "";
|
||||
document.body.offsetTop;
|
||||
scope.style.contain = "style";
|
||||
document.body.offsetTop;
|
||||
span1.remove();
|
||||
</script>
|
|
@ -0,0 +1,40 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>CSS-contain test: style containment invalidation with elements in different subtrees</title>
|
||||
<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
|
||||
<link rel="match" href="reference/quote-scoping-invalidation-004-ref.html">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-style">
|
||||
|
||||
<style>
|
||||
#root {
|
||||
quotes: "A" "Z" "1" "9" "(" ")" "+" "-";
|
||||
}
|
||||
#root::before, #root span::before {
|
||||
content: open-quote;
|
||||
}
|
||||
#root::after {
|
||||
content: close-quote;
|
||||
}
|
||||
.contain-style {
|
||||
contain: style;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>Test passes if the text below is "A111119" (not including the quotation marks).<p>
|
||||
<div id="root">
|
||||
<div class="contain-style">
|
||||
<span id="span1"></span>
|
||||
<span id="span2"></span>
|
||||
</div>
|
||||
<div class="contain-style">
|
||||
<span id="span3"></span>
|
||||
<span id="span4"></span>
|
||||
</div>
|
||||
<span></span>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.body.offsetTop;
|
||||
span1.className = "contain-style";
|
||||
span3.className = "contain-style";
|
||||
</script>
|
|
@ -0,0 +1,7 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>CSS-contain test reference: style containment dynamic containment set invalidation</title>
|
||||
<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
|
||||
|
||||
<p>Test passes if the text below is "A1(19" (not including the quotation marks).<p>
|
||||
<div>A<div>1 (</div>1 9</div>
|
|
@ -0,0 +1,7 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>CSS-contain test reference: style containment dynamic containment set unset invalidation</title>
|
||||
<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
|
||||
|
||||
<p>Test passes if the text below is "A1(+-" (not including the quotation marks).<p>
|
||||
<div>A<div>1 (</div>+ -</div>
|
|
@ -0,0 +1,7 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>CSS-contain test reference: style containment dynamic containment set unset set invalidation</title>
|
||||
<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
|
||||
|
||||
<p>Test passes if the text below is "A119" (not including the quotation marks).<p>
|
||||
<div>A<div>1</div>1 9</div>
|
|
@ -0,0 +1,7 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>CSS-contain test reference: style containment invalidation with elements in different subtrees</title>
|
||||
<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
|
||||
|
||||
<p>Test passes if the text below is "A111119" (not including the quotation marks).<p>
|
||||
<div>A<div>1 1</div><div>1 1</div>1 9</div>
|
Loading…
Add table
Add a link
Reference in a new issue