Bug 1375930: Test that rem units for the root font-size aren't resolved against the root font size. r?heycam
Of course there wasn't any test for this.
MozReview-Commit-ID: EBMxiC2Ipvb
--- a/layout/reftests/w3c-css/submitted/values3/reftest.list
+++ b/layout/reftests/w3c-css/submitted/values3/reftest.list
@@ -24,8 +24,9 @@
== calc-text-indent-1.html calc-text-indent-1-ref.html
== calc-text-indent-intrinsic-1.html calc-text-indent-intrinsic-1-ref.html
fuzzy-if(skiaContent,1,11) fuzzy-if(webrender,1,30) == calc-transform-origin-1.html calc-transform-origin-1-ref.html
== calc-vertical-align-1.html calc-vertical-align-1-ref.html
== calc-width-block-1.html calc-width-block-1-ref.html
== calc-width-block-intrinsic-1.html calc-width-block-intrinsic-1-ref.html
== calc-width-table-auto-1.html calc-width-table-auto-1-ref.html
== calc-width-table-fixed-1.html calc-width-table-fixed-1-ref.html
+== rem-root-font-size-restyle-1.html rem-root-font-size-restyle-1-ref.html
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/values3/rem-root-font-size-restyle-1-ref.html
@@ -0,0 +1,15 @@
+<!doctype html>
+<title>CSS Test reference</title>
+<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
+<style>
+:root {
+ font-size: 2em;
+}
+
+div {
+ width: 10rem;
+ height: 10rem;
+ background: green;
+}
+</style>
+<div></div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/values3/rem-root-font-size-restyle-1.html
@@ -0,0 +1,22 @@
+<!doctype html>
+<title>CSS Test: Test for rem units on the root element</title>
+<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
+<link rel="help" href="https://drafts.csswg.org/css-values/#rem">
+<link rel="match" href="rem-root-font-size-restyle-1-ref.html">
+<style>
+:root {
+ font-size: 2rem;
+}
+
+div {
+ width: 10rem;
+ height: 10rem;
+ background: green;
+}
+</style>
+<div></div>
+<script>
+ document.documentElement.offsetTop;
+ // Force a style recalc.
+ document.documentElement.style.color = "green";
+</script>