summaryrefslogtreecommitdiffstats
path: root/layout/reftests/css-import
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--layout/reftests/css-import/1331291-1.html9
-rw-r--r--layout/reftests/css-import/1368782-1.html5
-rw-r--r--layout/reftests/css-import/1368782-2.html7
-rw-r--r--layout/reftests/css-import/1368782-3.html8
-rw-r--r--layout/reftests/css-import/1373559-ref.html3
-rw-r--r--layout/reftests/css-import/1373559.html10
-rw-r--r--layout/reftests/css-import/290018-1.html13
-rw-r--r--layout/reftests/css-import/290018-ref.html11
-rw-r--r--layout/reftests/css-import/436261-1.html15
-rw-r--r--layout/reftests/css-import/436261-2.html12
-rw-r--r--layout/reftests/css-import/436261-3.html21
-rw-r--r--layout/reftests/css-import/436261-ref.html6
-rw-r--r--layout/reftests/css-import/444723-1.html20
-rw-r--r--layout/reftests/css-import/444723-2.html20
-rw-r--r--layout/reftests/css-import/444723-ref.html12
-rw-r--r--layout/reftests/css-import/445415-1-ref.xhtml12
-rw-r--r--layout/reftests/css-import/445415-1a.xhtml19
-rw-r--r--layout/reftests/css-import/445415-1b.xhtml19
-rw-r--r--layout/reftests/css-import/445415-2-ref.xhtml12
-rw-r--r--layout/reftests/css-import/445415-2a.xhtml19
-rw-r--r--layout/reftests/css-import/445415-2b.xhtml19
-rw-r--r--layout/reftests/css-import/green.html4
-rw-r--r--layout/reftests/css-import/inner-sheet.css2
-rw-r--r--layout/reftests/css-import/other-outermost-sheet.css3
-rw-r--r--layout/reftests/css-import/outer-sheet.css2
-rw-r--r--layout/reftests/css-import/outermost-sheet.css3
-rw-r--r--layout/reftests/css-import/reftest.list15
-rw-r--r--layout/reftests/css-import/subdir/1x1-green-in-subdir.pngbin0 -> 135 bytes
-rw-r--r--layout/reftests/css-import/subdir/sheet.css0
29 files changed, 301 insertions, 0 deletions
diff --git a/layout/reftests/css-import/1331291-1.html b/layout/reftests/css-import/1331291-1.html
new file mode 100644
index 0000000000..0f7b1844db
--- /dev/null
+++ b/layout/reftests/css-import/1331291-1.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<style>
+@import url(subdir/sheet.css);
+</style>
+<script>
+document.styleSheets[0].cssRules[0].styleSheet
+ .insertRule("* { background: url(1x1-green-in-subdir.png) red; }", 0);
+</script>
diff --git a/layout/reftests/css-import/1368782-1.html b/layout/reftests/css-import/1368782-1.html
new file mode 100644
index 0000000000..62cd944afc
--- /dev/null
+++ b/layout/reftests/css-import/1368782-1.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<style>
+@import "data:text/css,*{background:red}";
+@import "data:text/css,*{background:green}";
+</style>
diff --git a/layout/reftests/css-import/1368782-2.html b/layout/reftests/css-import/1368782-2.html
new file mode 100644
index 0000000000..0d1601dbe9
--- /dev/null
+++ b/layout/reftests/css-import/1368782-2.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<style>
+@import "data:text/css,*{background:green}";
+</style>
+<script>
+document.styleSheets[0].insertRule("@import \"data:text/css,*{background:red}\";", 0);
+</script>
diff --git a/layout/reftests/css-import/1368782-3.html b/layout/reftests/css-import/1368782-3.html
new file mode 100644
index 0000000000..533102289e
--- /dev/null
+++ b/layout/reftests/css-import/1368782-3.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<style>
+@import "data:text/css,*{background:green}";
+@import "data:text/css,*{background:red}";
+</style>
+<script>
+document.styleSheets[0].deleteRule(1);
+</script>
diff --git a/layout/reftests/css-import/1373559-ref.html b/layout/reftests/css-import/1373559-ref.html
new file mode 100644
index 0000000000..bbe139e347
--- /dev/null
+++ b/layout/reftests/css-import/1373559-ref.html
@@ -0,0 +1,3 @@
+<!doctype html>
+<title>CSS test reference</title>
+Shouldn't be red.
diff --git a/layout/reftests/css-import/1373559.html b/layout/reftests/css-import/1373559.html
new file mode 100644
index 0000000000..2e95534c8e
--- /dev/null
+++ b/layout/reftests/css-import/1373559.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<title>CSS test for bug 1373559: Deleted @import rules no longer apply to the document.</title>
+<style></style>
+Shouldn't be red.
+<script>
+let sheet = document.styleSheets[0];
+sheet.insertRule("@import url(data:text/css,body{color:red})", 0);
+document.documentElement.offsetTop;
+sheet.deleteRule(0);
+</script>
diff --git a/layout/reftests/css-import/290018-1.html b/layout/reftests/css-import/290018-1.html
new file mode 100644
index 0000000000..e98535f1e0
--- /dev/null
+++ b/layout/reftests/css-import/290018-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<body>
+ <iframe></iframe>
+ <script>
+ var win = window.frames[0];
+ win.document.open();
+ win.document.write("<!DOCTYPE html><html><head></head><body></body></html>");
+ win.document.close();
+ win.document.body.innerHTML = "<link rel='stylesheet' type='text/css' href='outer-sheet.css' />";
+ win.document.body.innerHTML += "<p style='padding:2px'>test</p>";
+ </script>
+</body>
+
diff --git a/layout/reftests/css-import/290018-ref.html b/layout/reftests/css-import/290018-ref.html
new file mode 100644
index 0000000000..30e4f9b2e8
--- /dev/null
+++ b/layout/reftests/css-import/290018-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<body>
+ <iframe></iframe>
+ <script>
+ var win = window.frames[0];
+ win.document.open();
+ win.document.write("<!DOCTYPE html><html><head><link rel='stylesheet' type='text/css' href='outer-sheet.css' /></head><body><p style='padding:2px'>test</p></body></html>");
+ win.document.close();
+ </script>
+</body>
+
diff --git a/layout/reftests/css-import/436261-1.html b/layout/reftests/css-import/436261-1.html
new file mode 100644
index 0000000000..fa13935aeb
--- /dev/null
+++ b/layout/reftests/css-import/436261-1.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <script type="text/javascript">
+ var el = document.createElement("link");
+ el.type = "text/css";
+ el.rel = "stylesheet";
+ el.href = "outer-sheet.css";
+ var h = document.getElementsByTagName("HEAD")[0];
+ h.appendChild(el);
+ el.title = "theme"; // comment this line to make the test work!
+ </script>
+ <p>test</p>
+ </body>
+</html>
diff --git a/layout/reftests/css-import/436261-2.html b/layout/reftests/css-import/436261-2.html
new file mode 100644
index 0000000000..7f87b97929
--- /dev/null
+++ b/layout/reftests/css-import/436261-2.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" media="print"
+ href="outer-sheet.css">
+ <link type="text/css" rel="stylesheet" media="screen"
+ href="outer-sheet.css">
+ </head>
+ <body>
+ <p>test</p>
+ </body>
+</html>
diff --git a/layout/reftests/css-import/436261-3.html b/layout/reftests/css-import/436261-3.html
new file mode 100644
index 0000000000..dbdcf61bdb
--- /dev/null
+++ b/layout/reftests/css-import/436261-3.html
@@ -0,0 +1,21 @@
+<html>
+ <body>
+ <script type="text/javascript">
+ var el = document.createElement("link");
+ el.type = "text/css";
+ el.rel = "stylesheet";
+ el.media = "print"
+ el.href = "outer-sheet.css";
+ var h = document.getElementsByTagName("HEAD")[0];
+ h.appendChild(el);
+
+ el = document.createElement("link");
+ el.type = "text/css";
+ el.rel = "stylesheet";
+ el.href = "outer-sheet.css";
+ var h = document.getElementsByTagName("HEAD")[0];
+ h.appendChild(el);
+ </script>
+ <p>test</p>
+ </body>
+</html>
diff --git a/layout/reftests/css-import/436261-ref.html b/layout/reftests/css-import/436261-ref.html
new file mode 100644
index 0000000000..9db25a60fe
--- /dev/null
+++ b/layout/reftests/css-import/436261-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <p style="background-color: green; color: white">test</p>
+ </body>
+</html>
diff --git a/layout/reftests/css-import/444723-1.html b/layout/reftests/css-import/444723-1.html
new file mode 100644
index 0000000000..fe6ab1ed7f
--- /dev/null
+++ b/layout/reftests/css-import/444723-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+<head>
+<link rel="stylesheet" media="screen" type="text/css"
+ href="outermost-sheet.css" title="A"/>
+<link rel="alternate stylesheet" media="screen" type="text/css"
+ href="outer-sheet.css" title="B"/>
+
+</head>
+
+<body>
+ <ul>
+ <li class="outermost">purple</li>
+ <li class="outer">blue</li>
+ <li class="inner">yellow</li>
+ </ul>
+</body>
+</html>
diff --git a/layout/reftests/css-import/444723-2.html b/layout/reftests/css-import/444723-2.html
new file mode 100644
index 0000000000..3630b92be5
--- /dev/null
+++ b/layout/reftests/css-import/444723-2.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+<head>
+<link rel="alternate stylesheet" media="screen" type="text/css"
+ href="outer-sheet.css" title="B"/>
+<link rel="stylesheet" media="screen" type="text/css"
+ href="outermost-sheet.css" title="A"/>
+
+</head>
+
+<body>
+ <ul>
+ <li class="outermost">purple</li>
+ <li class="outer">blue</li>
+ <li class="inner">yellow</li>
+ </ul>
+</body>
+</html>
diff --git a/layout/reftests/css-import/444723-ref.html b/layout/reftests/css-import/444723-ref.html
new file mode 100644
index 0000000000..6337ae0442
--- /dev/null
+++ b/layout/reftests/css-import/444723-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+<body>
+ <ul>
+ <li style="color: purple">purple</li>
+ <li style="color: blue">blue</li>
+ <li style="color: yellow">yellow</li>
+ </ul>
+</body>
+</html>
diff --git a/layout/reftests/css-import/445415-1-ref.xhtml b/layout/reftests/css-import/445415-1-ref.xhtml
new file mode 100644
index 0000000000..b1f0b4a8a5
--- /dev/null
+++ b/layout/reftests/css-import/445415-1-ref.xhtml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<body>
+<div style="color: purple">purple</div>
+<div style="color: blue">blue</div>
+<div style="color: yellow">yellow</div>
+</body>
+
+</html>
diff --git a/layout/reftests/css-import/445415-1a.xhtml b/layout/reftests/css-import/445415-1a.xhtml
new file mode 100644
index 0000000000..61030afc4f
--- /dev/null
+++ b/layout/reftests/css-import/445415-1a.xhtml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <link rel="stylesheet" type="text/css" href="other-outermost-sheet.css"
+ media="print" />
+ <link rel="stylesheet" type="text/css" href="outermost-sheet.css"
+ media="screen" />
+</head>
+
+<body>
+<div class="outermost">purple</div>
+<div class="outer">blue</div>
+<div class="inner">yellow</div>
+</body>
+
+</html>
diff --git a/layout/reftests/css-import/445415-1b.xhtml b/layout/reftests/css-import/445415-1b.xhtml
new file mode 100644
index 0000000000..b12602f39d
--- /dev/null
+++ b/layout/reftests/css-import/445415-1b.xhtml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <link rel="stylesheet" type="text/css" href="outermost-sheet.css"
+ media="screen" />
+ <link rel="stylesheet" type="text/css" href="other-outermost-sheet.css"
+ media="print" />
+</head>
+
+<body>
+<div class="outermost">purple</div>
+<div class="outer">blue</div>
+<div class="inner">yellow</div>
+</body>
+
+</html>
diff --git a/layout/reftests/css-import/445415-2-ref.xhtml b/layout/reftests/css-import/445415-2-ref.xhtml
new file mode 100644
index 0000000000..c20bf415e0
--- /dev/null
+++ b/layout/reftests/css-import/445415-2-ref.xhtml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-paged">
+
+<body>
+<div style="color: cyan">cyan</div>
+<div style="color: blue">blue</div>
+<div style="color: yellow">yellow</div>
+</body>
+
+</html>
diff --git a/layout/reftests/css-import/445415-2a.xhtml b/layout/reftests/css-import/445415-2a.xhtml
new file mode 100644
index 0000000000..f474ed626d
--- /dev/null
+++ b/layout/reftests/css-import/445415-2a.xhtml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-paged">
+
+<head>
+ <link rel="stylesheet" type="text/css" href="other-outermost-sheet.css"
+ media="print" />
+ <link rel="stylesheet" type="text/css" href="outermost-sheet.css"
+ media="screen" />
+</head>
+
+<body>
+<div class="outermost">cyan</div>
+<div class="outer">blue</div>
+<div class="inner">yellow</div>
+</body>
+
+</html>
diff --git a/layout/reftests/css-import/445415-2b.xhtml b/layout/reftests/css-import/445415-2b.xhtml
new file mode 100644
index 0000000000..f68604bec1
--- /dev/null
+++ b/layout/reftests/css-import/445415-2b.xhtml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-paged">
+
+<head>
+ <link rel="stylesheet" type="text/css" href="outermost-sheet.css"
+ media="screen" />
+ <link rel="stylesheet" type="text/css" href="other-outermost-sheet.css"
+ media="print" />
+</head>
+
+<body>
+<div class="outermost">cyan</div>
+<div class="outer">blue</div>
+<div class="inner">yellow</div>
+</body>
+
+</html>
diff --git a/layout/reftests/css-import/green.html b/layout/reftests/css-import/green.html
new file mode 100644
index 0000000000..e3fe1305a8
--- /dev/null
+++ b/layout/reftests/css-import/green.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<style>
+@import "data:text/css,*{background:green}";
+</style>
diff --git a/layout/reftests/css-import/inner-sheet.css b/layout/reftests/css-import/inner-sheet.css
new file mode 100644
index 0000000000..f84d0bc216
--- /dev/null
+++ b/layout/reftests/css-import/inner-sheet.css
@@ -0,0 +1,2 @@
+p { background-color: green; color: white }
+.inner { color: yellow; } \ No newline at end of file
diff --git a/layout/reftests/css-import/other-outermost-sheet.css b/layout/reftests/css-import/other-outermost-sheet.css
new file mode 100644
index 0000000000..8c77677abc
--- /dev/null
+++ b/layout/reftests/css-import/other-outermost-sheet.css
@@ -0,0 +1,3 @@
+@import url("outer-sheet.css");
+
+.outermost { color: cyan; }
diff --git a/layout/reftests/css-import/outer-sheet.css b/layout/reftests/css-import/outer-sheet.css
new file mode 100644
index 0000000000..db940dac76
--- /dev/null
+++ b/layout/reftests/css-import/outer-sheet.css
@@ -0,0 +1,2 @@
+@import url("inner-sheet.css");
+.outer { color: blue; }
diff --git a/layout/reftests/css-import/outermost-sheet.css b/layout/reftests/css-import/outermost-sheet.css
new file mode 100644
index 0000000000..b8b4bba4fb
--- /dev/null
+++ b/layout/reftests/css-import/outermost-sheet.css
@@ -0,0 +1,3 @@
+@import url("outer-sheet.css");
+
+.outermost { color: purple; }
diff --git a/layout/reftests/css-import/reftest.list b/layout/reftests/css-import/reftest.list
new file mode 100644
index 0000000000..5f1a59b394
--- /dev/null
+++ b/layout/reftests/css-import/reftest.list
@@ -0,0 +1,15 @@
+== 290018-1.html 290018-ref.html
+== 436261-1.html 436261-ref.html
+== 436261-2.html 436261-ref.html
+== 436261-3.html 436261-ref.html
+== 444723-1.html 444723-ref.html
+== 444723-2.html 444723-ref.html
+== 445415-1a.xhtml 445415-1-ref.xhtml
+== 445415-1b.xhtml 445415-1-ref.xhtml
+== 445415-2a.xhtml 445415-2-ref.xhtml
+== 445415-2b.xhtml 445415-2-ref.xhtml
+== 1331291-1.html green.html
+== 1368782-1.html green.html
+== 1368782-2.html green.html
+== 1368782-3.html green.html
+== 1373559.html 1373559-ref.html
diff --git a/layout/reftests/css-import/subdir/1x1-green-in-subdir.png b/layout/reftests/css-import/subdir/1x1-green-in-subdir.png
new file mode 100644
index 0000000000..b98ca0ba0a
--- /dev/null
+++ b/layout/reftests/css-import/subdir/1x1-green-in-subdir.png
Binary files differ
diff --git a/layout/reftests/css-import/subdir/sheet.css b/layout/reftests/css-import/subdir/sheet.css
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/layout/reftests/css-import/subdir/sheet.css