Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Interact with the originating document for stylesheet loads, rather t…
…han the element's current document.
- Loading branch information
Showing
6 changed files
with
56 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
body { | ||
background-color: green; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<!doctype html> | ||
<title>Blank document</title> |
8 changes: 8 additions & 0 deletions
8
tests/wpt/mozilla/tests/mozilla/stylesheet-adopt-panic-ref.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<iframe src="blank.html"></iframe> | ||
<style> | ||
body { | ||
background-color: green; | ||
} | ||
</style> |
13 changes: 13 additions & 0 deletions
13
tests/wpt/mozilla/tests/mozilla/stylesheet-adopt-panic.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<title>Verify that adopting a stylesheet with an import applies its styles and doesn't panic</title> | ||
<link rel="match" href="stylesheet-adopt-panic-ref.html"> | ||
<iframe src="blank.html" onload="foo()"></iframe> | ||
<script> | ||
function foo() { | ||
var i = document.querySelector('iframe'); | ||
i.contentDocument.documentElement.innerHTML = "<style>@import 'adopt-panic.css';</style>"; | ||
var e = i.contentDocument.querySelector('style'); | ||
document.body.appendChild(e); | ||
} | ||
</script> |