Bug 1375930: Test that rem units for the root font-size aren't resolved against the root font size. r=heycam
authorEmilio Cobos Álvarez <emilio@crisal.io>
Sat, 24 Jun 2017 09:44:53 +0200
changeset 600280 60e8b4b6898435802974f8f6bfbcf4760480d885
parent 600279 77af189b5c493e3a4359613604592485627d16cd
child 600281 4e8b918dc410e19396932f732f38974646ad5f1c
push id65706
push userbmo:emilio+bugs@crisal.io
push dateSun, 25 Jun 2017 07:53:10 +0000
reviewersheycam
bugs1375930
milestone56.0a1
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
layout/reftests/w3c-css/submitted/values3/reftest.list
layout/reftests/w3c-css/submitted/values3/rem-root-font-size-restyle-1-ref.html
layout/reftests/w3c-css/submitted/values3/rem-root-font-size-restyle-1.html
--- 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>