Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gecko Bug 1445682] Make Shadow DOM account for stylesheet applicableness correctly. #10103

Merged
merged 1 commit into from Mar 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 21 additions & 0 deletions css/css-scoping/shadow-disabled-sheet-001.html
@@ -0,0 +1,21 @@
<!doctype html>
<title>CSS Scoping Module Level 1 - Disabled stylesheet dynamically</title>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
<link rel="match" href="reference/green-box.html"/>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<div id="host"></div>
<script>
let root = host.attachShadow({ mode: 'open' });
root.innerHTML = `
<style>
div { background: green; width: 100px; height: 100px; }
</style>
<style>
div { background: red; }
</style>
<div></div>
`;
document.body.offsetTop;
root.styleSheets[1].disabled = true;
</script>
2 changes: 1 addition & 1 deletion css/css-scoping/shadow-fallback-dynamic-001.html
@@ -1,6 +1,6 @@
<!doctype html>
<title>CSS Scoping Module Level 1 - Dynamic fallback content</title>
<link rel="author" href="mailto:emilio@crisal.io">
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
<link rel="match" href="reference/green-box.html"/>
<p>Test passes if you see a single 100px by 100px green box below.</p>
Expand Down
2 changes: 1 addition & 1 deletion css/css-scoping/shadow-fallback-dynamic-002.html
@@ -1,6 +1,6 @@
<!doctype html>
<title>CSS Scoping Module Level 1 - Dynamic fallback content</title>
<link rel="author" href="mailto:emilio@crisal.io">
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
<link rel="match" href="reference/green-box.html"/>
<p>Test passes if you see a single 100px by 100px green box below.</p>
Expand Down
2 changes: 1 addition & 1 deletion css/css-scoping/shadow-fallback-dynamic-003.html
@@ -1,6 +1,6 @@
<!doctype html>
<title>CSS Scoping Module Level 1 - Dynamic fallback content</title>
<link rel="author" href="mailto:emilio@crisal.io">
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
<link rel="match" href="reference/green-box.html"/>
<p>Test passes if you see a single 100px by 100px green box below.</p>
Expand Down
2 changes: 1 addition & 1 deletion css/css-scoping/shadow-fallback-dynamic-004.html
@@ -1,6 +1,6 @@
<!doctype html>
<title>CSS Scoping Module Level 1 - Dynamic fallback content</title>
<link rel="author" href="mailto:emilio@crisal.io">
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
<link rel="match" href="reference/green-box.html"/>
<p>Test passes if you see a single 100px by 100px green box below.</p>
Expand Down
2 changes: 1 addition & 1 deletion css/css-scoping/shadow-fallback-dynamic-005.html
@@ -1,6 +1,6 @@
<!doctype html>
<title>CSS Scoping Module Level 1 - Dynamic fallback content</title>
<link rel="author" href="mailto:emilio@crisal.io">
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
<link rel="match" href="reference/green-box.html"/>
<p>Test passes if you see a single 100px by 100px green box below.</p>
Expand Down
18 changes: 18 additions & 0 deletions css/css-scoping/shadow-root-insert-into-document.html
@@ -0,0 +1,18 @@
<!doctype html>
<title>CSS Scoping Module Level 1 - Dynamic insertion of shadow host</title>
<link rel="author" href="mailto:emilio@crisal.io">
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
<link rel="match" href="reference/green-box.html"/>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<script>
let host = document.createElement('div');
let root = host.attachShadow({ mode: 'open' });
root.innerHTML = `
<style>
div { background: green; width: 100px; height: 100px; }
</style>
<div></div>
`;
document.body.offsetTop;
document.body.appendChild(host);
</script>