summaryrefslogtreecommitdiffstats
path: root/layout/reftests/css-enabled
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /layout/reftests/css-enabled
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'layout/reftests/css-enabled')
-rw-r--r--layout/reftests/css-enabled/button/button-fieldset-1.html11
-rw-r--r--layout/reftests/css-enabled/button/button-fieldset-2.html11
-rw-r--r--layout/reftests/css-enabled/button/button-fieldset-3.html20
-rw-r--r--layout/reftests/css-enabled/button/button-fieldset-4.html19
-rw-r--r--layout/reftests/css-enabled/button/button-fieldset-legend-1.html11
-rw-r--r--layout/reftests/css-enabled/button/button-fieldset-legend-2.html13
-rw-r--r--layout/reftests/css-enabled/button/button-fieldset-legend-3.html13
-rw-r--r--layout/reftests/css-enabled/button/button-fieldset-legend-4.html13
-rw-r--r--layout/reftests/css-enabled/button/button-fieldset-legend-5.html15
-rw-r--r--layout/reftests/css-enabled/button/button-fieldset-legend-ref-1.html11
-rw-r--r--layout/reftests/css-enabled/button/button-fieldset-legend-ref-2.html13
-rw-r--r--layout/reftests/css-enabled/button/button-fieldset-legend-ref-3.html13
-rw-r--r--layout/reftests/css-enabled/button/button-fieldset-legend-ref-4.html13
-rw-r--r--layout/reftests/css-enabled/button/button-fieldset-legend-ref-5.html15
-rw-r--r--layout/reftests/css-enabled/button/button-fieldset-ref.html11
-rw-r--r--layout/reftests/css-enabled/button/reftest-stylo.list14
-rw-r--r--layout/reftests/css-enabled/button/reftest.list9
-rw-r--r--layout/reftests/css-enabled/button/style.css19
-rw-r--r--layout/reftests/css-enabled/fieldset/fieldset-disabled.html7
-rw-r--r--layout/reftests/css-enabled/fieldset/fieldset-enabled.html7
-rw-r--r--layout/reftests/css-enabled/fieldset/fieldset-fieldset-1.html11
-rw-r--r--layout/reftests/css-enabled/fieldset/fieldset-fieldset-2.html11
-rw-r--r--layout/reftests/css-enabled/fieldset/fieldset-fieldset-3.html20
-rw-r--r--layout/reftests/css-enabled/fieldset/fieldset-fieldset-4.html19
-rw-r--r--layout/reftests/css-enabled/fieldset/fieldset-fieldset-ref.html11
-rw-r--r--layout/reftests/css-enabled/fieldset/fieldset-legend-1.html11
-rw-r--r--layout/reftests/css-enabled/fieldset/fieldset-legend-2.html13
-rw-r--r--layout/reftests/css-enabled/fieldset/fieldset-legend-3.html13
-rw-r--r--layout/reftests/css-enabled/fieldset/fieldset-legend-4.html13
-rw-r--r--layout/reftests/css-enabled/fieldset/fieldset-legend-5.html15
-rw-r--r--layout/reftests/css-enabled/fieldset/fieldset-legend-ref-1.html11
-rw-r--r--layout/reftests/css-enabled/fieldset/fieldset-legend-ref-2.html13
-rw-r--r--layout/reftests/css-enabled/fieldset/fieldset-legend-ref-3.html13
-rw-r--r--layout/reftests/css-enabled/fieldset/fieldset-legend-ref-4.html13
-rw-r--r--layout/reftests/css-enabled/fieldset/fieldset-legend-ref-5.html15
-rw-r--r--layout/reftests/css-enabled/fieldset/fieldset-ref.html7
-rw-r--r--layout/reftests/css-enabled/fieldset/reftest-stylo.list12
-rw-r--r--layout/reftests/css-enabled/fieldset/reftest.list11
-rw-r--r--layout/reftests/css-enabled/fieldset/style.css16
-rw-r--r--layout/reftests/css-enabled/input/input-fieldset-1.html11
-rw-r--r--layout/reftests/css-enabled/input/input-fieldset-2.html11
-rw-r--r--layout/reftests/css-enabled/input/input-fieldset-3.html20
-rw-r--r--layout/reftests/css-enabled/input/input-fieldset-4.html19
-rw-r--r--layout/reftests/css-enabled/input/input-fieldset-legend-1.html11
-rw-r--r--layout/reftests/css-enabled/input/input-fieldset-legend-2.html13
-rw-r--r--layout/reftests/css-enabled/input/input-fieldset-legend-3.html13
-rw-r--r--layout/reftests/css-enabled/input/input-fieldset-legend-4.html13
-rw-r--r--layout/reftests/css-enabled/input/input-fieldset-legend-5.html15
-rw-r--r--layout/reftests/css-enabled/input/input-fieldset-legend-ref-1.html11
-rw-r--r--layout/reftests/css-enabled/input/input-fieldset-legend-ref-2.html13
-rw-r--r--layout/reftests/css-enabled/input/input-fieldset-legend-ref-3.html13
-rw-r--r--layout/reftests/css-enabled/input/input-fieldset-legend-ref-4.html13
-rw-r--r--layout/reftests/css-enabled/input/input-fieldset-legend-ref-5.html15
-rw-r--r--layout/reftests/css-enabled/input/input-fieldset-ref.html11
-rw-r--r--layout/reftests/css-enabled/input/reftest-stylo.list10
-rw-r--r--layout/reftests/css-enabled/input/reftest.list9
-rw-r--r--layout/reftests/css-enabled/input/style.css19
-rw-r--r--layout/reftests/css-enabled/label/label-ref.html7
-rw-r--r--layout/reftests/css-enabled/label/label.html7
-rw-r--r--layout/reftests/css-enabled/label/reftest-stylo.list2
-rw-r--r--layout/reftests/css-enabled/label/reftest.list1
-rw-r--r--layout/reftests/css-enabled/label/style.css12
-rw-r--r--layout/reftests/css-enabled/object/object-ref.html7
-rw-r--r--layout/reftests/css-enabled/object/object.html7
-rw-r--r--layout/reftests/css-enabled/object/reftest-stylo.list2
-rw-r--r--layout/reftests/css-enabled/object/reftest.list1
-rw-r--r--layout/reftests/css-enabled/object/style.css12
-rw-r--r--layout/reftests/css-enabled/optgroup/optgroup-fieldset-1.html9
-rw-r--r--layout/reftests/css-enabled/optgroup/optgroup-fieldset-ref.html9
-rw-r--r--layout/reftests/css-enabled/optgroup/reftest-stylo.list2
-rw-r--r--layout/reftests/css-enabled/optgroup/reftest.list1
-rw-r--r--layout/reftests/css-enabled/optgroup/style.css19
-rw-r--r--layout/reftests/css-enabled/option/option-fieldset-1.html9
-rw-r--r--layout/reftests/css-enabled/option/option-fieldset-ref.html9
-rw-r--r--layout/reftests/css-enabled/option/reftest-stylo.list2
-rw-r--r--layout/reftests/css-enabled/option/reftest.list1
-rw-r--r--layout/reftests/css-enabled/option/style.css19
-rw-r--r--layout/reftests/css-enabled/output/output-ref.html7
-rw-r--r--layout/reftests/css-enabled/output/output.html7
-rw-r--r--layout/reftests/css-enabled/output/reftest-stylo.list2
-rw-r--r--layout/reftests/css-enabled/output/reftest.list1
-rw-r--r--layout/reftests/css-enabled/output/style.css12
-rw-r--r--layout/reftests/css-enabled/reftest-stylo.list11
-rw-r--r--layout/reftests/css-enabled/reftest.list10
-rw-r--r--layout/reftests/css-enabled/select/reftest-stylo.list14
-rw-r--r--layout/reftests/css-enabled/select/reftest.list9
-rw-r--r--layout/reftests/css-enabled/select/select-fieldset-1.html11
-rw-r--r--layout/reftests/css-enabled/select/select-fieldset-2.html11
-rw-r--r--layout/reftests/css-enabled/select/select-fieldset-3.html20
-rw-r--r--layout/reftests/css-enabled/select/select-fieldset-4.html19
-rw-r--r--layout/reftests/css-enabled/select/select-fieldset-legend-1.html11
-rw-r--r--layout/reftests/css-enabled/select/select-fieldset-legend-2.html13
-rw-r--r--layout/reftests/css-enabled/select/select-fieldset-legend-3.html13
-rw-r--r--layout/reftests/css-enabled/select/select-fieldset-legend-4.html13
-rw-r--r--layout/reftests/css-enabled/select/select-fieldset-legend-5.html15
-rw-r--r--layout/reftests/css-enabled/select/select-fieldset-legend-ref-1.html11
-rw-r--r--layout/reftests/css-enabled/select/select-fieldset-legend-ref-2.html13
-rw-r--r--layout/reftests/css-enabled/select/select-fieldset-legend-ref-3.html13
-rw-r--r--layout/reftests/css-enabled/select/select-fieldset-legend-ref-4.html13
-rw-r--r--layout/reftests/css-enabled/select/select-fieldset-legend-ref-5.html15
-rw-r--r--layout/reftests/css-enabled/select/select-fieldset-ref-disabled.html11
-rw-r--r--layout/reftests/css-enabled/select/select-fieldset-ref.html11
-rw-r--r--layout/reftests/css-enabled/select/style.css23
-rw-r--r--layout/reftests/css-enabled/textarea/reftest-stylo.list10
-rw-r--r--layout/reftests/css-enabled/textarea/reftest.list9
-rw-r--r--layout/reftests/css-enabled/textarea/style.css19
-rw-r--r--layout/reftests/css-enabled/textarea/textarea-fieldset-1.html11
-rw-r--r--layout/reftests/css-enabled/textarea/textarea-fieldset-2.html11
-rw-r--r--layout/reftests/css-enabled/textarea/textarea-fieldset-3.html20
-rw-r--r--layout/reftests/css-enabled/textarea/textarea-fieldset-4.html19
-rw-r--r--layout/reftests/css-enabled/textarea/textarea-fieldset-legend-1.html11
-rw-r--r--layout/reftests/css-enabled/textarea/textarea-fieldset-legend-2.html13
-rw-r--r--layout/reftests/css-enabled/textarea/textarea-fieldset-legend-3.html13
-rw-r--r--layout/reftests/css-enabled/textarea/textarea-fieldset-legend-4.html13
-rw-r--r--layout/reftests/css-enabled/textarea/textarea-fieldset-legend-5.html15
-rw-r--r--layout/reftests/css-enabled/textarea/textarea-fieldset-legend-ref-1.html11
-rw-r--r--layout/reftests/css-enabled/textarea/textarea-fieldset-legend-ref-2.html13
-rw-r--r--layout/reftests/css-enabled/textarea/textarea-fieldset-legend-ref-3.html13
-rw-r--r--layout/reftests/css-enabled/textarea/textarea-fieldset-legend-ref-4.html13
-rw-r--r--layout/reftests/css-enabled/textarea/textarea-fieldset-legend-ref-5.html15
-rw-r--r--layout/reftests/css-enabled/textarea/textarea-fieldset-ref.html11
121 files changed, 1433 insertions, 0 deletions
diff --git a/layout/reftests/css-enabled/button/button-fieldset-1.html b/layout/reftests/css-enabled/button/button-fieldset-1.html
new file mode 100644
index 000000000..56c6c2812
--- /dev/null
+++ b/layout/reftests/css-enabled/button/button-fieldset-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="enabled">
+ <fieldset class="enabled">
+ <button class="enabled"></button>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/button/button-fieldset-2.html b/layout/reftests/css-enabled/button/button-fieldset-2.html
new file mode 100644
index 000000000..e8fff1673
--- /dev/null
+++ b/layout/reftests/css-enabled/button/button-fieldset-2.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset disabled class="disabled">
+ <fieldset class="disabled">
+ <button class="disabled"></button>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/button/button-fieldset-3.html b/layout/reftests/css-enabled/button/button-fieldset-3.html
new file mode 100644
index 000000000..002881d84
--- /dev/null
+++ b/layout/reftests/css-enabled/button/button-fieldset-3.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <script>
+ function onloadHandler()
+ {
+ var fieldsets = document.getElementsByTagName('fieldset');
+ fieldsets[1].disabled = true;
+ fieldsets[0].disabled = false;
+ document.documentElement.className='';
+ }
+ </script>
+ <body onload="onloadHandler();">
+ <fieldset disabled class="enabled">
+ <fieldset class="disabled">
+ <button class="disabled"></button>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/button/button-fieldset-4.html b/layout/reftests/css-enabled/button/button-fieldset-4.html
new file mode 100644
index 000000000..ed82a0479
--- /dev/null
+++ b/layout/reftests/css-enabled/button/button-fieldset-4.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <script>
+ function onloadHandler()
+ {
+ var fieldsets = document.getElementsByTagName('fieldset');
+ fieldsets[0].disabled = false;
+ document.documentElement.className='';
+ }
+ </script>
+ <body onload="onloadHandler();">
+ <fieldset disabled class="enabled">
+ <fieldset class="enabled">
+ <button class="enabled"></button>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/button/button-fieldset-legend-1.html b/layout/reftests/css-enabled/button/button-fieldset-legend-1.html
new file mode 100644
index 000000000..3e9e510ec
--- /dev/null
+++ b/layout/reftests/css-enabled/button/button-fieldset-legend-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="disabled" disabled>
+ <legend id='i'>
+ <button class="enabled"></button>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/button/button-fieldset-legend-2.html b/layout/reftests/css-enabled/button/button-fieldset-legend-2.html
new file mode 100644
index 000000000..b7fe250fa
--- /dev/null
+++ b/layout/reftests/css-enabled/button/button-fieldset-legend-2.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="disabled" disabled>
+ <legend>
+ </legend>
+ <legend>
+ <button class="disabled"></button>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/button/button-fieldset-legend-3.html b/layout/reftests/css-enabled/button/button-fieldset-legend-3.html
new file mode 100644
index 000000000..f9127b8d5
--- /dev/null
+++ b/layout/reftests/css-enabled/button/button-fieldset-legend-3.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="disabled" disabled>
+ <fieldset class="disabled">
+ <legend>
+ <button class="disabled"></button>
+ </legend>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/button/button-fieldset-legend-4.html b/layout/reftests/css-enabled/button/button-fieldset-legend-4.html
new file mode 100644
index 000000000..1e8840ded
--- /dev/null
+++ b/layout/reftests/css-enabled/button/button-fieldset-legend-4.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="disabled" disabled>
+ <legend>
+ <fieldset class="enabled">
+ <button class="enabled"></button>
+ </fieldset>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/button/button-fieldset-legend-5.html b/layout/reftests/css-enabled/button/button-fieldset-legend-5.html
new file mode 100644
index 000000000..29b7a40d6
--- /dev/null
+++ b/layout/reftests/css-enabled/button/button-fieldset-legend-5.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="disabled" disabled>
+ <legend>
+ <fieldset class="disabled" disabled>
+ <legend>
+ <button class="enabled"></button>
+ </legend>
+ </fieldset>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/button/button-fieldset-legend-ref-1.html b/layout/reftests/css-enabled/button/button-fieldset-legend-ref-1.html
new file mode 100644
index 000000000..69c8ff5f2
--- /dev/null
+++ b/layout/reftests/css-enabled/button/button-fieldset-legend-ref-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <legend>
+ <button class="ref"></button>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/button/button-fieldset-legend-ref-2.html b/layout/reftests/css-enabled/button/button-fieldset-legend-ref-2.html
new file mode 100644
index 000000000..62dec99da
--- /dev/null
+++ b/layout/reftests/css-enabled/button/button-fieldset-legend-ref-2.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <legend>
+ </legend>
+ <legend>
+ <button class="ref"></button>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/button/button-fieldset-legend-ref-3.html b/layout/reftests/css-enabled/button/button-fieldset-legend-ref-3.html
new file mode 100644
index 000000000..8807601e0
--- /dev/null
+++ b/layout/reftests/css-enabled/button/button-fieldset-legend-ref-3.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <fieldset class="ref">
+ <legend>
+ <button class="ref"></button>
+ </legend>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/button/button-fieldset-legend-ref-4.html b/layout/reftests/css-enabled/button/button-fieldset-legend-ref-4.html
new file mode 100644
index 000000000..df92d4480
--- /dev/null
+++ b/layout/reftests/css-enabled/button/button-fieldset-legend-ref-4.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <legend>
+ <fieldset class="ref">
+ <button class="ref"></button>
+ </fieldset>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/button/button-fieldset-legend-ref-5.html b/layout/reftests/css-enabled/button/button-fieldset-legend-ref-5.html
new file mode 100644
index 000000000..7520a19bf
--- /dev/null
+++ b/layout/reftests/css-enabled/button/button-fieldset-legend-ref-5.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <legend>
+ <fieldset class="ref">
+ <legend>
+ <button class="ref"></button>
+ </legend>
+ </fieldset>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/button/button-fieldset-ref.html b/layout/reftests/css-enabled/button/button-fieldset-ref.html
new file mode 100644
index 000000000..7941c7dde
--- /dev/null
+++ b/layout/reftests/css-enabled/button/button-fieldset-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <fieldset class="ref">
+ <button class="ref"></button>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/button/reftest-stylo.list b/layout/reftests/css-enabled/button/reftest-stylo.list
new file mode 100644
index 000000000..1ff75682f
--- /dev/null
+++ b/layout/reftests/css-enabled/button/reftest-stylo.list
@@ -0,0 +1,14 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+fuzzy-if(skiaContent,1,3) == button-fieldset-1.html button-fieldset-1.html
+fails-if(B2G||Mulet) == button-fieldset-2.html button-fieldset-2.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+fails-if(B2G||Mulet) fuzzy-if(skiaContent,1,7) == button-fieldset-3.html button-fieldset-3.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+fails fuzzy-if(skiaContent,1,7) == button-fieldset-4.html button-fieldset-4.html
+== button-fieldset-legend-1.html button-fieldset-legend-1.html
+fails-if(B2G||Mulet) fuzzy-if(skiaContent,2,4) == button-fieldset-legend-2.html button-fieldset-legend-2.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+fails-if(B2G||Mulet) fuzzy-if(skiaContent,1,3) == button-fieldset-legend-3.html button-fieldset-legend-3.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+fuzzy-if(skiaContent,2,9) == button-fieldset-legend-4.html button-fieldset-legend-4.html
+fuzzy-if(skiaContent,2,5) == button-fieldset-legend-5.html button-fieldset-legend-5.html
diff --git a/layout/reftests/css-enabled/button/reftest.list b/layout/reftests/css-enabled/button/reftest.list
new file mode 100644
index 000000000..4be7b48e6
--- /dev/null
+++ b/layout/reftests/css-enabled/button/reftest.list
@@ -0,0 +1,9 @@
+fuzzy-if(skiaContent,1,3) == button-fieldset-1.html button-fieldset-ref.html
+== button-fieldset-2.html button-fieldset-ref.html
+fuzzy-if(skiaContent,1,7) == button-fieldset-3.html button-fieldset-ref.html
+fuzzy-if(skiaContent,1,7) == button-fieldset-4.html button-fieldset-ref.html
+== button-fieldset-legend-1.html button-fieldset-legend-ref-1.html
+fuzzy-if(skiaContent,2,4) == button-fieldset-legend-2.html button-fieldset-legend-ref-2.html
+fuzzy-if(skiaContent,1,3) == button-fieldset-legend-3.html button-fieldset-legend-ref-3.html
+fuzzy-if(skiaContent,2,9) == button-fieldset-legend-4.html button-fieldset-legend-ref-4.html
+fuzzy-if(skiaContent,2,5) == button-fieldset-legend-5.html button-fieldset-legend-ref-5.html
diff --git a/layout/reftests/css-enabled/button/style.css b/layout/reftests/css-enabled/button/style.css
new file mode 100644
index 000000000..3846239d0
--- /dev/null
+++ b/layout/reftests/css-enabled/button/style.css
@@ -0,0 +1,19 @@
+.ref {
+ background-color: green;
+}
+
+.enabled {
+ background-color: red;
+}
+
+:enabled.enabled {
+ background-color: green;
+}
+
+.disabled {
+ background-color: green;
+}
+
+:enabled.disabled {
+ background-color: red;
+}
diff --git a/layout/reftests/css-enabled/fieldset/fieldset-disabled.html b/layout/reftests/css-enabled/fieldset/fieldset-disabled.html
new file mode 100644
index 000000000..6cd4fbfea
--- /dev/null
+++ b/layout/reftests/css-enabled/fieldset/fieldset-disabled.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="disabled" disabled></fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/fieldset/fieldset-enabled.html b/layout/reftests/css-enabled/fieldset/fieldset-enabled.html
new file mode 100644
index 000000000..32915278e
--- /dev/null
+++ b/layout/reftests/css-enabled/fieldset/fieldset-enabled.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="enabled"></fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/fieldset/fieldset-fieldset-1.html b/layout/reftests/css-enabled/fieldset/fieldset-fieldset-1.html
new file mode 100644
index 000000000..9b1ae9f11
--- /dev/null
+++ b/layout/reftests/css-enabled/fieldset/fieldset-fieldset-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="enabled">
+ <fieldset class="enabled">
+ <fieldset class="enabled"></fieldset>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/fieldset/fieldset-fieldset-2.html b/layout/reftests/css-enabled/fieldset/fieldset-fieldset-2.html
new file mode 100644
index 000000000..01176a31e
--- /dev/null
+++ b/layout/reftests/css-enabled/fieldset/fieldset-fieldset-2.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset disabled class="disabled">
+ <fieldset class="disabled">
+ <fieldset class="disabled"></fieldset>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/fieldset/fieldset-fieldset-3.html b/layout/reftests/css-enabled/fieldset/fieldset-fieldset-3.html
new file mode 100644
index 000000000..4c0933546
--- /dev/null
+++ b/layout/reftests/css-enabled/fieldset/fieldset-fieldset-3.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <script>
+ function onloadHandler()
+ {
+ var fieldsets = document.getElementsByTagName('fieldset');
+ fieldsets[1].disabled = true;
+ fieldsets[0].disabled = false;
+ document.documentElement.className='';
+ }
+ </script>
+ <body onload="onloadHandler();">
+ <fieldset disabled class="enabled">
+ <fieldset class="disabled">
+ <fieldset class="disabled"></fieldset>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/fieldset/fieldset-fieldset-4.html b/layout/reftests/css-enabled/fieldset/fieldset-fieldset-4.html
new file mode 100644
index 000000000..e65581296
--- /dev/null
+++ b/layout/reftests/css-enabled/fieldset/fieldset-fieldset-4.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <script>
+ function onloadHandler()
+ {
+ var fieldsets = document.getElementsByTagName('fieldset');
+ fieldsets[0].disabled = false;
+ document.documentElement.className='';
+ }
+ </script>
+ <body onload="onloadHandler();">
+ <fieldset disabled class="enabled">
+ <fieldset class="enabled">
+ <fieldset class="enabled"></fieldset>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/fieldset/fieldset-fieldset-ref.html b/layout/reftests/css-enabled/fieldset/fieldset-fieldset-ref.html
new file mode 100644
index 000000000..ade7fc477
--- /dev/null
+++ b/layout/reftests/css-enabled/fieldset/fieldset-fieldset-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <fieldset class="ref">
+ <fieldset class="ref"></fieldset>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/fieldset/fieldset-legend-1.html b/layout/reftests/css-enabled/fieldset/fieldset-legend-1.html
new file mode 100644
index 000000000..04781eb60
--- /dev/null
+++ b/layout/reftests/css-enabled/fieldset/fieldset-legend-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="disabled" disabled>
+ <legend id='i'>
+ <fieldset class="enabled"></fieldset>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/fieldset/fieldset-legend-2.html b/layout/reftests/css-enabled/fieldset/fieldset-legend-2.html
new file mode 100644
index 000000000..e201ee166
--- /dev/null
+++ b/layout/reftests/css-enabled/fieldset/fieldset-legend-2.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="disabled" disabled>
+ <legend>
+ </legend>
+ <legend>
+ <fieldset class="disabled"></fieldset>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/fieldset/fieldset-legend-3.html b/layout/reftests/css-enabled/fieldset/fieldset-legend-3.html
new file mode 100644
index 000000000..d9ca78dc3
--- /dev/null
+++ b/layout/reftests/css-enabled/fieldset/fieldset-legend-3.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="disabled" disabled>
+ <fieldset class="disabled">
+ <legend>
+ <fieldset class="disabled"></fieldset>
+ </legend>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/fieldset/fieldset-legend-4.html b/layout/reftests/css-enabled/fieldset/fieldset-legend-4.html
new file mode 100644
index 000000000..67c728ef1
--- /dev/null
+++ b/layout/reftests/css-enabled/fieldset/fieldset-legend-4.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="disabled" disabled>
+ <legend>
+ <fieldset class="enabled">
+ <fieldset class="enabled"></fieldset>
+ </fieldset>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/fieldset/fieldset-legend-5.html b/layout/reftests/css-enabled/fieldset/fieldset-legend-5.html
new file mode 100644
index 000000000..c3f82ae2a
--- /dev/null
+++ b/layout/reftests/css-enabled/fieldset/fieldset-legend-5.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="disabled" disabled>
+ <legend>
+ <fieldset class="disabled" disabled>
+ <legend>
+ <fieldset class="enabled"></fieldset>
+ </legend>
+ </fieldset>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/fieldset/fieldset-legend-ref-1.html b/layout/reftests/css-enabled/fieldset/fieldset-legend-ref-1.html
new file mode 100644
index 000000000..83f1925ad
--- /dev/null
+++ b/layout/reftests/css-enabled/fieldset/fieldset-legend-ref-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <legend>
+ <fieldset class="ref"></fieldset>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/fieldset/fieldset-legend-ref-2.html b/layout/reftests/css-enabled/fieldset/fieldset-legend-ref-2.html
new file mode 100644
index 000000000..33fe2455c
--- /dev/null
+++ b/layout/reftests/css-enabled/fieldset/fieldset-legend-ref-2.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <legend>
+ </legend>
+ <legend>
+ <fieldset class="ref"></fieldset>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/fieldset/fieldset-legend-ref-3.html b/layout/reftests/css-enabled/fieldset/fieldset-legend-ref-3.html
new file mode 100644
index 000000000..7aaff27f1
--- /dev/null
+++ b/layout/reftests/css-enabled/fieldset/fieldset-legend-ref-3.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <fieldset class="ref">
+ <legend>
+ <fieldset class="ref"></fieldset>
+ </legend>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/fieldset/fieldset-legend-ref-4.html b/layout/reftests/css-enabled/fieldset/fieldset-legend-ref-4.html
new file mode 100644
index 000000000..9f1a267a6
--- /dev/null
+++ b/layout/reftests/css-enabled/fieldset/fieldset-legend-ref-4.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <legend>
+ <fieldset class="ref">
+ <fieldset class="ref"></fieldset>
+ </fieldset>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/fieldset/fieldset-legend-ref-5.html b/layout/reftests/css-enabled/fieldset/fieldset-legend-ref-5.html
new file mode 100644
index 000000000..00df3f834
--- /dev/null
+++ b/layout/reftests/css-enabled/fieldset/fieldset-legend-ref-5.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <legend>
+ <fieldset class="ref">
+ <legend>
+ <fieldset class="ref"></fieldset>
+ </legend>
+ </fieldset>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/fieldset/fieldset-ref.html b/layout/reftests/css-enabled/fieldset/fieldset-ref.html
new file mode 100644
index 000000000..7f66bc698
--- /dev/null
+++ b/layout/reftests/css-enabled/fieldset/fieldset-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class='ref'></fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/fieldset/reftest-stylo.list b/layout/reftests/css-enabled/fieldset/reftest-stylo.list
new file mode 100644
index 000000000..6e4ec501f
--- /dev/null
+++ b/layout/reftests/css-enabled/fieldset/reftest-stylo.list
@@ -0,0 +1,12 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+== fieldset-enabled.html fieldset-enabled.html
+== fieldset-disabled.html fieldset-disabled.html
+== fieldset-fieldset-1.html fieldset-fieldset-1.html
+== fieldset-fieldset-2.html fieldset-fieldset-2.html
+fuzzy-if(skiaContent,1,11) == fieldset-fieldset-3.html fieldset-fieldset-3.html
+fails fuzzy-if(skiaContent,1,11) == fieldset-fieldset-4.html fieldset-fieldset-4.html
+== fieldset-legend-1.html fieldset-legend-1.html
+fuzzy-if(skiaContent,1,2) == fieldset-legend-2.html fieldset-legend-2.html
+fuzzy-if(skiaContent,2,5) == fieldset-legend-3.html fieldset-legend-3.html
+fuzzy-if(skiaContent,2,9) == fieldset-legend-4.html fieldset-legend-4.html
+fuzzy-if(skiaContent,2,5) == fieldset-legend-5.html fieldset-legend-5.html
diff --git a/layout/reftests/css-enabled/fieldset/reftest.list b/layout/reftests/css-enabled/fieldset/reftest.list
new file mode 100644
index 000000000..9bddf4584
--- /dev/null
+++ b/layout/reftests/css-enabled/fieldset/reftest.list
@@ -0,0 +1,11 @@
+== fieldset-enabled.html fieldset-ref.html
+== fieldset-disabled.html fieldset-ref.html
+== fieldset-fieldset-1.html fieldset-fieldset-ref.html
+== fieldset-fieldset-2.html fieldset-fieldset-ref.html
+fuzzy-if(skiaContent,1,11) == fieldset-fieldset-3.html fieldset-fieldset-ref.html
+fuzzy-if(skiaContent,1,11) == fieldset-fieldset-4.html fieldset-fieldset-ref.html
+== fieldset-legend-1.html fieldset-legend-ref-1.html
+fuzzy-if(skiaContent,1,2) == fieldset-legend-2.html fieldset-legend-ref-2.html
+fuzzy-if(skiaContent,2,5) == fieldset-legend-3.html fieldset-legend-ref-3.html
+fuzzy-if(skiaContent,2,9) == fieldset-legend-4.html fieldset-legend-ref-4.html
+fuzzy-if(skiaContent,2,5) == fieldset-legend-5.html fieldset-legend-ref-5.html
diff --git a/layout/reftests/css-enabled/fieldset/style.css b/layout/reftests/css-enabled/fieldset/style.css
new file mode 100644
index 000000000..7b804aa6f
--- /dev/null
+++ b/layout/reftests/css-enabled/fieldset/style.css
@@ -0,0 +1,16 @@
+fieldset.enabled {
+ background-color: red;
+}
+
+fieldset:enabled.enabled,
+fieldset.ref {
+ background-color: green;
+}
+
+fieldset.disabled {
+ background-color: green;
+}
+
+fieldset:enabled.disabled {
+ background-color: red;
+}
diff --git a/layout/reftests/css-enabled/input/input-fieldset-1.html b/layout/reftests/css-enabled/input/input-fieldset-1.html
new file mode 100644
index 000000000..b50f3b0f1
--- /dev/null
+++ b/layout/reftests/css-enabled/input/input-fieldset-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="enabled">
+ <fieldset class="enabled">
+ <input class="enabled">
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/input/input-fieldset-2.html b/layout/reftests/css-enabled/input/input-fieldset-2.html
new file mode 100644
index 000000000..acfbbca5f
--- /dev/null
+++ b/layout/reftests/css-enabled/input/input-fieldset-2.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset disabled class="disabled">
+ <fieldset class="disabled">
+ <input class="disabled">
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/input/input-fieldset-3.html b/layout/reftests/css-enabled/input/input-fieldset-3.html
new file mode 100644
index 000000000..de095cee6
--- /dev/null
+++ b/layout/reftests/css-enabled/input/input-fieldset-3.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <script>
+ function onloadHandler()
+ {
+ var fieldsets = document.getElementsByTagName('fieldset');
+ fieldsets[1].disabled = true;
+ fieldsets[0].disabled = false;
+ document.documentElement.className='';
+ }
+ </script>
+ <body onload="onloadHandler();">
+ <fieldset disabled class="enabled">
+ <fieldset class="disabled">
+ <input class="disabled">
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/input/input-fieldset-4.html b/layout/reftests/css-enabled/input/input-fieldset-4.html
new file mode 100644
index 000000000..fa0fe1ac7
--- /dev/null
+++ b/layout/reftests/css-enabled/input/input-fieldset-4.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <script>
+ function onloadHandler()
+ {
+ var fieldsets = document.getElementsByTagName('fieldset');
+ fieldsets[0].disabled = false;
+ document.documentElement.className='';
+ }
+ </script>
+ <body onload="onloadHandler();">
+ <fieldset disabled class="enabled">
+ <fieldset class="enabled">
+ <input class="enabled">
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/input/input-fieldset-legend-1.html b/layout/reftests/css-enabled/input/input-fieldset-legend-1.html
new file mode 100644
index 000000000..d56517ac7
--- /dev/null
+++ b/layout/reftests/css-enabled/input/input-fieldset-legend-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="disabled" disabled>
+ <legend id='i'>
+ <input class="enabled">
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/input/input-fieldset-legend-2.html b/layout/reftests/css-enabled/input/input-fieldset-legend-2.html
new file mode 100644
index 000000000..d564e1404
--- /dev/null
+++ b/layout/reftests/css-enabled/input/input-fieldset-legend-2.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="disabled" disabled>
+ <legend>
+ </legend>
+ <legend>
+ <input class="disabled">
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/input/input-fieldset-legend-3.html b/layout/reftests/css-enabled/input/input-fieldset-legend-3.html
new file mode 100644
index 000000000..89c41119f
--- /dev/null
+++ b/layout/reftests/css-enabled/input/input-fieldset-legend-3.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="disabled" disabled>
+ <fieldset class="disabled">
+ <legend>
+ <input class="disabled">
+ </legend>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/input/input-fieldset-legend-4.html b/layout/reftests/css-enabled/input/input-fieldset-legend-4.html
new file mode 100644
index 000000000..33eec83fe
--- /dev/null
+++ b/layout/reftests/css-enabled/input/input-fieldset-legend-4.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="disabled" disabled>
+ <legend>
+ <fieldset class="enabled">
+ <input class="enabled">
+ </fieldset>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/input/input-fieldset-legend-5.html b/layout/reftests/css-enabled/input/input-fieldset-legend-5.html
new file mode 100644
index 000000000..4226c9672
--- /dev/null
+++ b/layout/reftests/css-enabled/input/input-fieldset-legend-5.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="disabled" disabled>
+ <legend>
+ <fieldset class="disabled" disabled>
+ <legend>
+ <input class="enabled">
+ </legend>
+ </fieldset>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/input/input-fieldset-legend-ref-1.html b/layout/reftests/css-enabled/input/input-fieldset-legend-ref-1.html
new file mode 100644
index 000000000..5511e567b
--- /dev/null
+++ b/layout/reftests/css-enabled/input/input-fieldset-legend-ref-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <legend>
+ <input class="ref">
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/input/input-fieldset-legend-ref-2.html b/layout/reftests/css-enabled/input/input-fieldset-legend-ref-2.html
new file mode 100644
index 000000000..4d0658b64
--- /dev/null
+++ b/layout/reftests/css-enabled/input/input-fieldset-legend-ref-2.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <legend>
+ </legend>
+ <legend>
+ <input class="ref">
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/input/input-fieldset-legend-ref-3.html b/layout/reftests/css-enabled/input/input-fieldset-legend-ref-3.html
new file mode 100644
index 000000000..15fb4d9ce
--- /dev/null
+++ b/layout/reftests/css-enabled/input/input-fieldset-legend-ref-3.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <fieldset class="ref">
+ <legend>
+ <input class="ref">
+ </legend>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/input/input-fieldset-legend-ref-4.html b/layout/reftests/css-enabled/input/input-fieldset-legend-ref-4.html
new file mode 100644
index 000000000..3fdd2b4dd
--- /dev/null
+++ b/layout/reftests/css-enabled/input/input-fieldset-legend-ref-4.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <legend>
+ <fieldset class="ref">
+ <input class="ref">
+ </fieldset>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/input/input-fieldset-legend-ref-5.html b/layout/reftests/css-enabled/input/input-fieldset-legend-ref-5.html
new file mode 100644
index 000000000..fc2c01f00
--- /dev/null
+++ b/layout/reftests/css-enabled/input/input-fieldset-legend-ref-5.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <legend>
+ <fieldset class="ref">
+ <legend>
+ <input class="ref">
+ </legend>
+ </fieldset>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/input/input-fieldset-ref.html b/layout/reftests/css-enabled/input/input-fieldset-ref.html
new file mode 100644
index 000000000..0108ffc32
--- /dev/null
+++ b/layout/reftests/css-enabled/input/input-fieldset-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <fieldset class="ref">
+ <input class="ref">
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/input/reftest-stylo.list b/layout/reftests/css-enabled/input/reftest-stylo.list
new file mode 100644
index 000000000..724e9cd7a
--- /dev/null
+++ b/layout/reftests/css-enabled/input/reftest-stylo.list
@@ -0,0 +1,10 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+== input-fieldset-1.html input-fieldset-1.html
+== input-fieldset-2.html input-fieldset-2.html
+fuzzy-if(skiaContent,1,7) == input-fieldset-3.html input-fieldset-3.html
+fails fuzzy-if(skiaContent,1,7) == input-fieldset-4.html input-fieldset-4.html
+== input-fieldset-legend-1.html input-fieldset-legend-1.html
+fuzzy-if(skiaContent,2,4) == input-fieldset-legend-2.html input-fieldset-legend-2.html
+fuzzy-if(skiaContent,2,5) == input-fieldset-legend-3.html input-fieldset-legend-3.html
+fuzzy-if(skiaContent,2,9) == input-fieldset-legend-4.html input-fieldset-legend-4.html
+fuzzy-if(skiaContent,2,5) == input-fieldset-legend-5.html input-fieldset-legend-5.html
diff --git a/layout/reftests/css-enabled/input/reftest.list b/layout/reftests/css-enabled/input/reftest.list
new file mode 100644
index 000000000..ed5110743
--- /dev/null
+++ b/layout/reftests/css-enabled/input/reftest.list
@@ -0,0 +1,9 @@
+== input-fieldset-1.html input-fieldset-ref.html
+== input-fieldset-2.html input-fieldset-ref.html
+fuzzy-if(skiaContent,1,7) == input-fieldset-3.html input-fieldset-ref.html
+fuzzy-if(skiaContent,1,7) == input-fieldset-4.html input-fieldset-ref.html
+== input-fieldset-legend-1.html input-fieldset-legend-ref-1.html
+fuzzy-if(skiaContent,2,4) == input-fieldset-legend-2.html input-fieldset-legend-ref-2.html
+fuzzy-if(skiaContent,2,5) == input-fieldset-legend-3.html input-fieldset-legend-ref-3.html
+fuzzy-if(skiaContent,2,9) == input-fieldset-legend-4.html input-fieldset-legend-ref-4.html
+fuzzy-if(skiaContent,2,5) == input-fieldset-legend-5.html input-fieldset-legend-ref-5.html
diff --git a/layout/reftests/css-enabled/input/style.css b/layout/reftests/css-enabled/input/style.css
new file mode 100644
index 000000000..3846239d0
--- /dev/null
+++ b/layout/reftests/css-enabled/input/style.css
@@ -0,0 +1,19 @@
+.ref {
+ background-color: green;
+}
+
+.enabled {
+ background-color: red;
+}
+
+:enabled.enabled {
+ background-color: green;
+}
+
+.disabled {
+ background-color: green;
+}
+
+:enabled.disabled {
+ background-color: red;
+}
diff --git a/layout/reftests/css-enabled/label/label-ref.html b/layout/reftests/css-enabled/label/label-ref.html
new file mode 100644
index 000000000..0fb84bc0a
--- /dev/null
+++ b/layout/reftests/css-enabled/label/label-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <label class="ref">foo</label>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/label/label.html b/layout/reftests/css-enabled/label/label.html
new file mode 100644
index 000000000..7c41405fd
--- /dev/null
+++ b/layout/reftests/css-enabled/label/label.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <label>foo</label>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/label/reftest-stylo.list b/layout/reftests/css-enabled/label/reftest-stylo.list
new file mode 100644
index 000000000..d6630943f
--- /dev/null
+++ b/layout/reftests/css-enabled/label/reftest-stylo.list
@@ -0,0 +1,2 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+== label.html label.html
diff --git a/layout/reftests/css-enabled/label/reftest.list b/layout/reftests/css-enabled/label/reftest.list
new file mode 100644
index 000000000..31f85dd94
--- /dev/null
+++ b/layout/reftests/css-enabled/label/reftest.list
@@ -0,0 +1 @@
+== label.html label-ref.html
diff --git a/layout/reftests/css-enabled/label/style.css b/layout/reftests/css-enabled/label/style.css
new file mode 100644
index 000000000..7f9529ec9
--- /dev/null
+++ b/layout/reftests/css-enabled/label/style.css
@@ -0,0 +1,12 @@
+label {
+ background-color: green;
+}
+
+label:enabled {
+ background-color: red;
+}
+
+/* ref should always be green! */
+.ref:enabled {
+ background-color: green;
+}
diff --git a/layout/reftests/css-enabled/object/object-ref.html b/layout/reftests/css-enabled/object/object-ref.html
new file mode 100644
index 000000000..10a4da84a
--- /dev/null
+++ b/layout/reftests/css-enabled/object/object-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <object class="ref">foo</object>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/object/object.html b/layout/reftests/css-enabled/object/object.html
new file mode 100644
index 000000000..799e0eb98
--- /dev/null
+++ b/layout/reftests/css-enabled/object/object.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <object>foo</object>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/object/reftest-stylo.list b/layout/reftests/css-enabled/object/reftest-stylo.list
new file mode 100644
index 000000000..95bf97bca
--- /dev/null
+++ b/layout/reftests/css-enabled/object/reftest-stylo.list
@@ -0,0 +1,2 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+== object.html object.html
diff --git a/layout/reftests/css-enabled/object/reftest.list b/layout/reftests/css-enabled/object/reftest.list
new file mode 100644
index 000000000..471500b97
--- /dev/null
+++ b/layout/reftests/css-enabled/object/reftest.list
@@ -0,0 +1 @@
+== object.html object-ref.html
diff --git a/layout/reftests/css-enabled/object/style.css b/layout/reftests/css-enabled/object/style.css
new file mode 100644
index 000000000..fb18c7a96
--- /dev/null
+++ b/layout/reftests/css-enabled/object/style.css
@@ -0,0 +1,12 @@
+object {
+ background-color: green;
+}
+
+object:enabled {
+ background-color: red;
+}
+
+/* ref should always be green! */
+.ref:enabled {
+ background-color: green;
+}
diff --git a/layout/reftests/css-enabled/optgroup/optgroup-fieldset-1.html b/layout/reftests/css-enabled/optgroup/optgroup-fieldset-1.html
new file mode 100644
index 000000000..0b7ee5a76
--- /dev/null
+++ b/layout/reftests/css-enabled/optgroup/optgroup-fieldset-1.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset disabled class="disabled">
+ <optgroup class="enabled">foo</optgroup>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/optgroup/optgroup-fieldset-ref.html b/layout/reftests/css-enabled/optgroup/optgroup-fieldset-ref.html
new file mode 100644
index 000000000..c8fde1c2b
--- /dev/null
+++ b/layout/reftests/css-enabled/optgroup/optgroup-fieldset-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <optgroup class="ref">foo</optgroup>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/optgroup/reftest-stylo.list b/layout/reftests/css-enabled/optgroup/reftest-stylo.list
new file mode 100644
index 000000000..49d455343
--- /dev/null
+++ b/layout/reftests/css-enabled/optgroup/reftest-stylo.list
@@ -0,0 +1,2 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+fuzzy-if(skiaContent,1,2) == optgroup-fieldset-1.html optgroup-fieldset-1.html
diff --git a/layout/reftests/css-enabled/optgroup/reftest.list b/layout/reftests/css-enabled/optgroup/reftest.list
new file mode 100644
index 000000000..75c53da48
--- /dev/null
+++ b/layout/reftests/css-enabled/optgroup/reftest.list
@@ -0,0 +1 @@
+fuzzy-if(skiaContent,1,2) == optgroup-fieldset-1.html optgroup-fieldset-ref.html
diff --git a/layout/reftests/css-enabled/optgroup/style.css b/layout/reftests/css-enabled/optgroup/style.css
new file mode 100644
index 000000000..3846239d0
--- /dev/null
+++ b/layout/reftests/css-enabled/optgroup/style.css
@@ -0,0 +1,19 @@
+.ref {
+ background-color: green;
+}
+
+.enabled {
+ background-color: red;
+}
+
+:enabled.enabled {
+ background-color: green;
+}
+
+.disabled {
+ background-color: green;
+}
+
+:enabled.disabled {
+ background-color: red;
+}
diff --git a/layout/reftests/css-enabled/option/option-fieldset-1.html b/layout/reftests/css-enabled/option/option-fieldset-1.html
new file mode 100644
index 000000000..c2d9b7a34
--- /dev/null
+++ b/layout/reftests/css-enabled/option/option-fieldset-1.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset disabled class="disabled">
+ <option class="enabled">foo</option>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/option/option-fieldset-ref.html b/layout/reftests/css-enabled/option/option-fieldset-ref.html
new file mode 100644
index 000000000..7d103ce8c
--- /dev/null
+++ b/layout/reftests/css-enabled/option/option-fieldset-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <option class="ref">foo</option>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/option/reftest-stylo.list b/layout/reftests/css-enabled/option/reftest-stylo.list
new file mode 100644
index 000000000..113e2240e
--- /dev/null
+++ b/layout/reftests/css-enabled/option/reftest-stylo.list
@@ -0,0 +1,2 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+== option-fieldset-1.html option-fieldset-1.html
diff --git a/layout/reftests/css-enabled/option/reftest.list b/layout/reftests/css-enabled/option/reftest.list
new file mode 100644
index 000000000..4a782d2f4
--- /dev/null
+++ b/layout/reftests/css-enabled/option/reftest.list
@@ -0,0 +1 @@
+== option-fieldset-1.html option-fieldset-ref.html
diff --git a/layout/reftests/css-enabled/option/style.css b/layout/reftests/css-enabled/option/style.css
new file mode 100644
index 000000000..3846239d0
--- /dev/null
+++ b/layout/reftests/css-enabled/option/style.css
@@ -0,0 +1,19 @@
+.ref {
+ background-color: green;
+}
+
+.enabled {
+ background-color: red;
+}
+
+:enabled.enabled {
+ background-color: green;
+}
+
+.disabled {
+ background-color: green;
+}
+
+:enabled.disabled {
+ background-color: red;
+}
diff --git a/layout/reftests/css-enabled/output/output-ref.html b/layout/reftests/css-enabled/output/output-ref.html
new file mode 100644
index 000000000..cc4687f54
--- /dev/null
+++ b/layout/reftests/css-enabled/output/output-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <output class="ref">foo</output>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/output/output.html b/layout/reftests/css-enabled/output/output.html
new file mode 100644
index 000000000..c264159d4
--- /dev/null
+++ b/layout/reftests/css-enabled/output/output.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <output>foo</output>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/output/reftest-stylo.list b/layout/reftests/css-enabled/output/reftest-stylo.list
new file mode 100644
index 000000000..68e7140dd
--- /dev/null
+++ b/layout/reftests/css-enabled/output/reftest-stylo.list
@@ -0,0 +1,2 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+== output.html output.html
diff --git a/layout/reftests/css-enabled/output/reftest.list b/layout/reftests/css-enabled/output/reftest.list
new file mode 100644
index 000000000..0f02f9cf9
--- /dev/null
+++ b/layout/reftests/css-enabled/output/reftest.list
@@ -0,0 +1 @@
+== output.html output-ref.html
diff --git a/layout/reftests/css-enabled/output/style.css b/layout/reftests/css-enabled/output/style.css
new file mode 100644
index 000000000..ae740e20d
--- /dev/null
+++ b/layout/reftests/css-enabled/output/style.css
@@ -0,0 +1,12 @@
+output {
+ background-color: green;
+}
+
+output:enabled {
+ background-color: red;
+}
+
+/* ref should always be green! */
+.ref:enabled {
+ background-color: green;
+}
diff --git a/layout/reftests/css-enabled/reftest-stylo.list b/layout/reftests/css-enabled/reftest-stylo.list
new file mode 100644
index 000000000..09a1adf4e
--- /dev/null
+++ b/layout/reftests/css-enabled/reftest-stylo.list
@@ -0,0 +1,11 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+include fieldset/reftest-stylo.list
+include input/reftest-stylo.list
+include button/reftest-stylo.list
+include textarea/reftest-stylo.list
+include select/reftest-stylo.list
+include option/reftest-stylo.list
+include optgroup/reftest-stylo.list
+include object/reftest-stylo.list
+include label/reftest-stylo.list
+include output/reftest-stylo.list
diff --git a/layout/reftests/css-enabled/reftest.list b/layout/reftests/css-enabled/reftest.list
new file mode 100644
index 000000000..649617cfc
--- /dev/null
+++ b/layout/reftests/css-enabled/reftest.list
@@ -0,0 +1,10 @@
+include fieldset/reftest.list
+include input/reftest.list
+include button/reftest.list
+include textarea/reftest.list
+include select/reftest.list
+include option/reftest.list
+include optgroup/reftest.list
+include object/reftest.list
+include label/reftest.list
+include output/reftest.list
diff --git a/layout/reftests/css-enabled/select/reftest-stylo.list b/layout/reftests/css-enabled/select/reftest-stylo.list
new file mode 100644
index 000000000..67824bf0a
--- /dev/null
+++ b/layout/reftests/css-enabled/select/reftest-stylo.list
@@ -0,0 +1,14 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+== select-fieldset-1.html select-fieldset-1.html
+fails-if(B2G||Mulet) fuzzy-if(skiaContent,1,9) == select-fieldset-2.html select-fieldset-2.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+fails-if(B2G||Mulet) == select-fieldset-3.html select-fieldset-3.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+fails fuzzy-if(skiaContent,1,9) == select-fieldset-4.html select-fieldset-4.html
+== select-fieldset-legend-1.html select-fieldset-legend-1.html
+fails-if(B2G||Mulet) fuzzy-if(skiaContent,2,4) == select-fieldset-legend-2.html select-fieldset-legend-2.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+fails-if(B2G||Mulet) fuzzy-if(skiaContent,2,5) == select-fieldset-legend-3.html select-fieldset-legend-3.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+fuzzy-if(skiaContent,2,9) == select-fieldset-legend-4.html select-fieldset-legend-4.html
+fuzzy-if(skiaContent,2,5) == select-fieldset-legend-5.html select-fieldset-legend-5.html
diff --git a/layout/reftests/css-enabled/select/reftest.list b/layout/reftests/css-enabled/select/reftest.list
new file mode 100644
index 000000000..7b8abfe01
--- /dev/null
+++ b/layout/reftests/css-enabled/select/reftest.list
@@ -0,0 +1,9 @@
+== select-fieldset-1.html select-fieldset-ref.html
+fuzzy-if(skiaContent,1,9) == select-fieldset-2.html select-fieldset-ref-disabled.html
+== select-fieldset-3.html select-fieldset-ref-disabled.html
+fuzzy-if(skiaContent,1,9) == select-fieldset-4.html select-fieldset-ref.html
+== select-fieldset-legend-1.html select-fieldset-legend-ref-1.html
+fuzzy-if(skiaContent,2,4) == select-fieldset-legend-2.html select-fieldset-legend-ref-2.html
+fuzzy-if(skiaContent,2,5) == select-fieldset-legend-3.html select-fieldset-legend-ref-3.html
+fuzzy-if(skiaContent,2,9) == select-fieldset-legend-4.html select-fieldset-legend-ref-4.html
+fuzzy-if(skiaContent,2,5) == select-fieldset-legend-5.html select-fieldset-legend-ref-5.html
diff --git a/layout/reftests/css-enabled/select/select-fieldset-1.html b/layout/reftests/css-enabled/select/select-fieldset-1.html
new file mode 100644
index 000000000..84874986f
--- /dev/null
+++ b/layout/reftests/css-enabled/select/select-fieldset-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="enabled">
+ <fieldset class="enabled">
+ <select class="enabled"></select>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/select/select-fieldset-2.html b/layout/reftests/css-enabled/select/select-fieldset-2.html
new file mode 100644
index 000000000..4e34c7fef
--- /dev/null
+++ b/layout/reftests/css-enabled/select/select-fieldset-2.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset disabled class="disabled">
+ <fieldset class="disabled">
+ <select class="disabled"></select>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/select/select-fieldset-3.html b/layout/reftests/css-enabled/select/select-fieldset-3.html
new file mode 100644
index 000000000..c30347271
--- /dev/null
+++ b/layout/reftests/css-enabled/select/select-fieldset-3.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <script>
+ function onloadHandler()
+ {
+ var fieldsets = document.getElementsByTagName('fieldset');
+ fieldsets[1].disabled = true;
+ fieldsets[0].disabled = false;
+ document.documentElement.className='';
+ }
+ </script>
+ <body onload="onloadHandler();">
+ <fieldset disabled class="enabled">
+ <fieldset class="disabled">
+ <select class="disabled"></select>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/select/select-fieldset-4.html b/layout/reftests/css-enabled/select/select-fieldset-4.html
new file mode 100644
index 000000000..b168a2193
--- /dev/null
+++ b/layout/reftests/css-enabled/select/select-fieldset-4.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <script>
+ function onloadHandler()
+ {
+ var fieldsets = document.getElementsByTagName('fieldset');
+ fieldsets[0].disabled = false;
+ document.documentElement.className='';
+ }
+ </script>
+ <body onload="onloadHandler();">
+ <fieldset disabled class="enabled">
+ <fieldset class="enabled">
+ <select class="enabled"></select>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/select/select-fieldset-legend-1.html b/layout/reftests/css-enabled/select/select-fieldset-legend-1.html
new file mode 100644
index 000000000..944303b88
--- /dev/null
+++ b/layout/reftests/css-enabled/select/select-fieldset-legend-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="disabled" disabled>
+ <legend id='i'>
+ <select class="enabled"></select>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/select/select-fieldset-legend-2.html b/layout/reftests/css-enabled/select/select-fieldset-legend-2.html
new file mode 100644
index 000000000..7a3507be2
--- /dev/null
+++ b/layout/reftests/css-enabled/select/select-fieldset-legend-2.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="disabled" disabled>
+ <legend>
+ </legend>
+ <legend>
+ <select class="disabled"></select>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/select/select-fieldset-legend-3.html b/layout/reftests/css-enabled/select/select-fieldset-legend-3.html
new file mode 100644
index 000000000..29a98a88a
--- /dev/null
+++ b/layout/reftests/css-enabled/select/select-fieldset-legend-3.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="disabled" disabled>
+ <fieldset class="disabled">
+ <legend>
+ <select class="disabled"></select>
+ </legend>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/select/select-fieldset-legend-4.html b/layout/reftests/css-enabled/select/select-fieldset-legend-4.html
new file mode 100644
index 000000000..4cbc3ca85
--- /dev/null
+++ b/layout/reftests/css-enabled/select/select-fieldset-legend-4.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="disabled" disabled>
+ <legend>
+ <fieldset class="enabled">
+ <select class="enabled"></select>
+ </fieldset>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/select/select-fieldset-legend-5.html b/layout/reftests/css-enabled/select/select-fieldset-legend-5.html
new file mode 100644
index 000000000..0218b9548
--- /dev/null
+++ b/layout/reftests/css-enabled/select/select-fieldset-legend-5.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="disabled" disabled>
+ <legend>
+ <fieldset class="disabled" disabled>
+ <legend>
+ <select class="enabled"></select>
+ </legend>
+ </fieldset>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/select/select-fieldset-legend-ref-1.html b/layout/reftests/css-enabled/select/select-fieldset-legend-ref-1.html
new file mode 100644
index 000000000..57c42ddc2
--- /dev/null
+++ b/layout/reftests/css-enabled/select/select-fieldset-legend-ref-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <legend>
+ <select class="ref"></select>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/select/select-fieldset-legend-ref-2.html b/layout/reftests/css-enabled/select/select-fieldset-legend-ref-2.html
new file mode 100644
index 000000000..d21ba476e
--- /dev/null
+++ b/layout/reftests/css-enabled/select/select-fieldset-legend-ref-2.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <legend>
+ </legend>
+ <legend>
+ <select disabled class="ref"></select>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/select/select-fieldset-legend-ref-3.html b/layout/reftests/css-enabled/select/select-fieldset-legend-ref-3.html
new file mode 100644
index 000000000..d4b147fa1
--- /dev/null
+++ b/layout/reftests/css-enabled/select/select-fieldset-legend-ref-3.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <fieldset class="ref">
+ <legend>
+ <select disabled class="ref"></select>
+ </legend>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/select/select-fieldset-legend-ref-4.html b/layout/reftests/css-enabled/select/select-fieldset-legend-ref-4.html
new file mode 100644
index 000000000..55df97e20
--- /dev/null
+++ b/layout/reftests/css-enabled/select/select-fieldset-legend-ref-4.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <legend>
+ <fieldset class="ref">
+ <select class="ref"></select>
+ </fieldset>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/select/select-fieldset-legend-ref-5.html b/layout/reftests/css-enabled/select/select-fieldset-legend-ref-5.html
new file mode 100644
index 000000000..1c3275c90
--- /dev/null
+++ b/layout/reftests/css-enabled/select/select-fieldset-legend-ref-5.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <legend>
+ <fieldset class="ref">
+ <legend>
+ <select class="ref"></select>
+ </legend>
+ </fieldset>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/select/select-fieldset-ref-disabled.html b/layout/reftests/css-enabled/select/select-fieldset-ref-disabled.html
new file mode 100644
index 000000000..273223696
--- /dev/null
+++ b/layout/reftests/css-enabled/select/select-fieldset-ref-disabled.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <fieldset class="ref">
+ <select disabled class="ref"></select>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/select/select-fieldset-ref.html b/layout/reftests/css-enabled/select/select-fieldset-ref.html
new file mode 100644
index 000000000..e85e16f6b
--- /dev/null
+++ b/layout/reftests/css-enabled/select/select-fieldset-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <fieldset class="ref">
+ <select class="ref"></select>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/select/style.css b/layout/reftests/css-enabled/select/style.css
new file mode 100644
index 000000000..b79686e37
--- /dev/null
+++ b/layout/reftests/css-enabled/select/style.css
@@ -0,0 +1,23 @@
+select {
+ -moz-appearance: none;
+}
+
+.ref {
+ background-color: green;
+}
+
+.enabled {
+ background-color: red;
+}
+
+:enabled.enabled {
+ background-color: green;
+}
+
+.disabled {
+ background-color: green;
+}
+
+:enabled.disabled {
+ background-color: red;
+}
diff --git a/layout/reftests/css-enabled/textarea/reftest-stylo.list b/layout/reftests/css-enabled/textarea/reftest-stylo.list
new file mode 100644
index 000000000..9a65675f5
--- /dev/null
+++ b/layout/reftests/css-enabled/textarea/reftest-stylo.list
@@ -0,0 +1,10 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+fuzzy-if(skiaContent,1,5) == textarea-fieldset-1.html textarea-fieldset-1.html
+fuzzy-if(skiaContent,1,5) == textarea-fieldset-2.html textarea-fieldset-2.html
+== textarea-fieldset-3.html textarea-fieldset-3.html
+== textarea-fieldset-4.html textarea-fieldset-4.html
+fuzzy-if(skiaContent,1,5) == textarea-fieldset-legend-1.html textarea-fieldset-legend-1.html
+fuzzy-if(skiaContent,1,5) == textarea-fieldset-legend-2.html textarea-fieldset-legend-2.html
+fuzzy-if(skiaContent,1,5) == textarea-fieldset-legend-3.html textarea-fieldset-legend-3.html
+fuzzy-if(skiaContent,1,5) == textarea-fieldset-legend-4.html textarea-fieldset-legend-4.html
+fuzzy-if(skiaContent,1,10) == textarea-fieldset-legend-5.html textarea-fieldset-legend-5.html
diff --git a/layout/reftests/css-enabled/textarea/reftest.list b/layout/reftests/css-enabled/textarea/reftest.list
new file mode 100644
index 000000000..a085ea43e
--- /dev/null
+++ b/layout/reftests/css-enabled/textarea/reftest.list
@@ -0,0 +1,9 @@
+fuzzy-if(skiaContent,1,5) == textarea-fieldset-1.html textarea-fieldset-ref.html
+fuzzy-if(skiaContent,1,5) == textarea-fieldset-2.html textarea-fieldset-ref.html
+== textarea-fieldset-3.html textarea-fieldset-ref.html
+== textarea-fieldset-4.html textarea-fieldset-ref.html
+fuzzy-if(skiaContent,1,5) == textarea-fieldset-legend-1.html textarea-fieldset-legend-ref-1.html
+fuzzy-if(skiaContent,1,5) == textarea-fieldset-legend-2.html textarea-fieldset-legend-ref-2.html
+fuzzy-if(skiaContent,1,5) == textarea-fieldset-legend-3.html textarea-fieldset-legend-ref-3.html
+fuzzy-if(skiaContent,1,5) == textarea-fieldset-legend-4.html textarea-fieldset-legend-ref-4.html
+fuzzy-if(skiaContent,1,10) == textarea-fieldset-legend-5.html textarea-fieldset-legend-ref-5.html
diff --git a/layout/reftests/css-enabled/textarea/style.css b/layout/reftests/css-enabled/textarea/style.css
new file mode 100644
index 000000000..3846239d0
--- /dev/null
+++ b/layout/reftests/css-enabled/textarea/style.css
@@ -0,0 +1,19 @@
+.ref {
+ background-color: green;
+}
+
+.enabled {
+ background-color: red;
+}
+
+:enabled.enabled {
+ background-color: green;
+}
+
+.disabled {
+ background-color: green;
+}
+
+:enabled.disabled {
+ background-color: red;
+}
diff --git a/layout/reftests/css-enabled/textarea/textarea-fieldset-1.html b/layout/reftests/css-enabled/textarea/textarea-fieldset-1.html
new file mode 100644
index 000000000..6c040b67e
--- /dev/null
+++ b/layout/reftests/css-enabled/textarea/textarea-fieldset-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="enabled">
+ <fieldset class="enabled">
+ <textarea class="enabled"></textarea>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/textarea/textarea-fieldset-2.html b/layout/reftests/css-enabled/textarea/textarea-fieldset-2.html
new file mode 100644
index 000000000..6c22f2c17
--- /dev/null
+++ b/layout/reftests/css-enabled/textarea/textarea-fieldset-2.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset disabled class="disabled">
+ <fieldset class="disabled">
+ <textarea class="disabled"></textarea>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/textarea/textarea-fieldset-3.html b/layout/reftests/css-enabled/textarea/textarea-fieldset-3.html
new file mode 100644
index 000000000..82172c45f
--- /dev/null
+++ b/layout/reftests/css-enabled/textarea/textarea-fieldset-3.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <script>
+ function onloadHandler()
+ {
+ var fieldsets = document.getElementsByTagName('fieldset');
+ fieldsets[1].disabled = true;
+ fieldsets[0].disabled = false;
+ document.documentElement.className='';
+ }
+ </script>
+ <body onload="onloadHandler();">
+ <fieldset disabled class="enabled">
+ <fieldset class="disabled">
+ <textarea class="disabled"></textarea>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/textarea/textarea-fieldset-4.html b/layout/reftests/css-enabled/textarea/textarea-fieldset-4.html
new file mode 100644
index 000000000..a4ba7a100
--- /dev/null
+++ b/layout/reftests/css-enabled/textarea/textarea-fieldset-4.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <script>
+ function onloadHandler()
+ {
+ var fieldsets = document.getElementsByTagName('fieldset');
+ fieldsets[0].disabled = false;
+ document.documentElement.className='';
+ }
+ </script>
+ <body onload="onloadHandler();">
+ <fieldset disabled class="enabled">
+ <fieldset class="enabled">
+ <textarea class="enabled"></textarea>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-1.html b/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-1.html
new file mode 100644
index 000000000..5ab543a86
--- /dev/null
+++ b/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="disabled" disabled>
+ <legend id='i'>
+ <textarea class="enabled"></textarea>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-2.html b/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-2.html
new file mode 100644
index 000000000..3385d534b
--- /dev/null
+++ b/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-2.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="disabled" disabled>
+ <legend>
+ </legend>
+ <legend>
+ <textarea class="disabled"></textarea>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-3.html b/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-3.html
new file mode 100644
index 000000000..d3c94ee5d
--- /dev/null
+++ b/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-3.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="disabled" disabled>
+ <fieldset class="disabled">
+ <legend>
+ <textarea class="disabled"></textarea>
+ </legend>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-4.html b/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-4.html
new file mode 100644
index 000000000..8d04971bd
--- /dev/null
+++ b/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-4.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="disabled" disabled>
+ <legend>
+ <fieldset class="enabled">
+ <textarea class="enabled"></textarea>
+ </fieldset>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-5.html b/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-5.html
new file mode 100644
index 000000000..856023ad9
--- /dev/null
+++ b/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-5.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="disabled" disabled>
+ <legend>
+ <fieldset class="disabled" disabled>
+ <legend>
+ <textarea class="enabled"></textarea>
+ </legend>
+ </fieldset>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-ref-1.html b/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-ref-1.html
new file mode 100644
index 000000000..d3824560d
--- /dev/null
+++ b/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-ref-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <legend>
+ <textarea class="ref"></textarea>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-ref-2.html b/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-ref-2.html
new file mode 100644
index 000000000..f508a5d30
--- /dev/null
+++ b/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-ref-2.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <legend>
+ </legend>
+ <legend>
+ <textarea class="ref"></textarea>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-ref-3.html b/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-ref-3.html
new file mode 100644
index 000000000..799c2b876
--- /dev/null
+++ b/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-ref-3.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <fieldset class="ref">
+ <legend>
+ <textarea class="ref"></textarea>
+ </legend>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-ref-4.html b/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-ref-4.html
new file mode 100644
index 000000000..83ee46e60
--- /dev/null
+++ b/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-ref-4.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <legend>
+ <fieldset class="ref">
+ <textarea class="ref"></textarea>
+ </fieldset>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-ref-5.html b/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-ref-5.html
new file mode 100644
index 000000000..dd63a89a2
--- /dev/null
+++ b/layout/reftests/css-enabled/textarea/textarea-fieldset-legend-ref-5.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <legend>
+ <fieldset class="ref">
+ <legend>
+ <textarea class="ref"></textarea>
+ </legend>
+ </fieldset>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-enabled/textarea/textarea-fieldset-ref.html b/layout/reftests/css-enabled/textarea/textarea-fieldset-ref.html
new file mode 100644
index 000000000..1cc1d344d
--- /dev/null
+++ b/layout/reftests/css-enabled/textarea/textarea-fieldset-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset class="ref">
+ <fieldset class="ref">
+ <textarea class="ref"></textarea>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>