Bug 1364280. Properly restyle on dir attr changes. r=emilio draft
authorBoris Zbarsky <bzbarsky@mit.edu>
Mon, 15 May 2017 12:35:14 -0400
changeset 577922 8ba288c0fd9466ae0bb33a6e8dfb89f6220fac4c
parent 577103 924109d2abf60dab80eeef4179812f75a801e18b
child 628628 52b4448018c12df0bb55ab5fd646f1faa5a9188b
push id58828
push userbzbarsky@mozilla.com
push dateMon, 15 May 2017 16:35:43 +0000
reviewersemilio
bugs1364280
milestone55.0a1
Bug 1364280. Properly restyle on dir attr changes. r=emilio MozReview-Commit-ID: 3ZWWiD9MNKJ
layout/reftests/bidi/dirAuto/reftest.list
layout/reftests/bidi/reftest.list
layout/reftests/bugs/1364280-1-ref.html
layout/reftests/bugs/1364280-1.html
layout/reftests/bugs/1364280-2-ref.html
layout/reftests/bugs/1364280-2a.html
layout/reftests/bugs/1364280-2b.html
layout/reftests/bugs/1364280-2c.html
layout/reftests/bugs/reftest.list
layout/reftests/w3c-css/submitted/selectors4/reftest.list
--- a/layout/reftests/bidi/dirAuto/reftest.list
+++ b/layout/reftests/bidi/dirAuto/reftest.list
@@ -1,15 +1,15 @@
 == bdi-auto-dir-default.html bdi-auto-dir-default-ref.html
-fails-if(stylo) == dir_auto-set-contained-dir-L.html dir_auto-contained-dir-L-ref.html
-fails-if(stylo) == dir_auto-set-contained-dir-R.html dir_auto-contained-dir-R-ref.html
-fails-if(stylo) == dir_auto-set-contained-invalid-dir-L.html dir_auto-contained-dir-L-ref.html
-fails-if(stylo) == dir_auto-set-contained-invalid-dir-R.html dir_auto-contained-dir-R-ref.html
-fails-if(stylo) == dir_auto-unset-contained-dir-L.html dir_auto-unset-contained-dir-L-ref.html
-fails-if(stylo) == dir_auto-unset-contained-dir-R.html dir_auto-unset-contained-dir-R-ref.html
+== dir_auto-set-contained-dir-L.html dir_auto-contained-dir-L-ref.html
+== dir_auto-set-contained-dir-R.html dir_auto-contained-dir-R-ref.html
+== dir_auto-set-contained-invalid-dir-L.html dir_auto-contained-dir-L-ref.html
+== dir_auto-set-contained-invalid-dir-R.html dir_auto-contained-dir-R-ref.html
+== dir_auto-unset-contained-dir-L.html dir_auto-unset-contained-dir-L-ref.html
+== dir_auto-unset-contained-dir-R.html dir_auto-unset-contained-dir-R-ref.html
 == dynamicDirAuto-setLTR-Auto1.html dynamicDirAuto-refLTR-LTR.html
 == dynamicDirAuto-setLTR-Auto2.html dynamicDirAuto-refLTR-LTR.html
 == dynamicDirAuto-setLTR-Auto3.html dynamicDirAuto-refLTR-LTR.html
 == dynamicDirAuto-setLTR-Auto4.html dynamicDirAuto-refLTR-LTR.html
 == dynamicDirAuto-setLTR-Auto5.html dynamicDirAuto-refLTR-LTR.html
 == dynamicDirAuto-setLTR-Auto6.html dynamicDirAuto-refLTR-LTR.html
 == dynamicDirAuto-setLTR-LTR1.html dynamicDirAuto-refLTR-LTR.html
 == dynamicDirAuto-setLTR-LTR2.html dynamicDirAuto-refLTR-LTR.html
@@ -78,42 +78,42 @@ fails-if(stylo) == dir_auto-unset-contai
 == dynamicDirAuto-setRTL-InvalidDir3.html dynamicDirAuto-refRTL-NoDir.html
 == dynamicDirAuto-setRTL-InvalidDir4.html dynamicDirAuto-refRTL-NoDir.html
 == dynamicDirAuto-setRTL-InvalidDir5.html dynamicDirAuto-refRTL-NoDir.html
 == dynamicDirAuto-setRTL-InvalidDir6.html dynamicDirAuto-refRTL-NoDir.html
 == dynamicDirAuto-setRTL-InvalidDir7.html dynamicDirAuto-refRTL-NoDir.html
 == dynamicDirAuto-setRTL-InvalidDir8.html dynamicDirAuto-refRTL-NoDir.html
 == dynamicDirAuto-addLTR-Auto.html dynamicDirAuto-refLTR-LTR.html
 == dynamicDirAuto-addRTL-Auto.html dynamicDirAuto-refRTL-RTL.html
-fails-if(stylo) == dynamicDirAuto-ChangeText-LTR1.html dynamicDirAuto-refLTR-LTR.html
+== dynamicDirAuto-ChangeText-LTR1.html dynamicDirAuto-refLTR-LTR.html
 == dynamicDirAuto-ChangeText-LTR2.html dynamicDirAuto-refLTR-LTR.html
 == dynamicDirAuto-ChangeText-LTR3.html dynamicDirAuto-refLTR-LTR.html
 == dynamicDirAuto-ChangeText-LTR4.html dynamicDirAuto-refLTR-LTR.html
 == dynamicDirAuto-ChangeText-LTR5.html dynamicDirAuto-refLTR-LTR.html
 == dynamicDirAuto-ChangeText-LTR6.html dynamicDirAuto-refLTR-LTR.html
-fails-if(stylo) == dynamicDirAuto-ChangeText-LTR7.html dynamicDirAuto-refLTR-LTR.html
+== dynamicDirAuto-ChangeText-LTR7.html dynamicDirAuto-refLTR-LTR.html
 == dynamicDirAuto-ChangeText-LTR8.html dynamicDirAuto-refLTR-LTR.html
-fails-if(stylo) == dynamicDirAuto-ChangeText-LTR9.html dynamicDirAuto-refLTR-LTR.html
+== dynamicDirAuto-ChangeText-LTR9.html dynamicDirAuto-refLTR-LTR.html
 == dynamicDirAuto-ChangeText-LTR10.html dynamicDirAuto-refLTR-LTR.html
-fails-if(stylo) == dynamicDirAuto-ChangeText-RTL1.html dynamicDirAuto-refRTL-RTL.html
-fails-if(stylo) == dynamicDirAuto-ChangeText-RTL2.html dynamicDirAuto-refRTL-RTL.html
-fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azureSkia,30,1) fails-if(stylo) == dynamicDirAuto-ChangeText-RTL3.html dynamicDirAuto-refRTL-RTL.html
-fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azureSkia,30,1) fails-if(stylo) == dynamicDirAuto-ChangeText-RTL4.html dynamicDirAuto-refRTL-RTL.html
-fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azureSkia,30,1) fails-if(stylo) == dynamicDirAuto-ChangeText-RTL5.html dynamicDirAuto-refRTL-RTL.html
-fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azureSkia,30,1) fails-if(stylo) == dynamicDirAuto-ChangeText-RTL6.html dynamicDirAuto-refRTL-RTL.html
-fails-if(stylo) == dynamicDirAuto-ChangeText-RTL7.html dynamicDirAuto-refRTL-RTL.html
-fails-if(stylo) == dynamicDirAuto-ChangeText-RTL8.html dynamicDirAuto-refRTL-RTL.html
-fails-if(stylo) == dynamicDirAuto-ChangeText-RTL9.html dynamicDirAuto-refRTL-RTL.html
-fails-if(stylo) == dynamicDirAuto-ChangeText-RTL10.html dynamicDirAuto-refRTL-RTL.html
+== dynamicDirAuto-ChangeText-RTL1.html dynamicDirAuto-refRTL-RTL.html
+== dynamicDirAuto-ChangeText-RTL2.html dynamicDirAuto-refRTL-RTL.html
+fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azureSkia,30,1) == dynamicDirAuto-ChangeText-RTL3.html dynamicDirAuto-refRTL-RTL.html
+fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azureSkia,30,1) == dynamicDirAuto-ChangeText-RTL4.html dynamicDirAuto-refRTL-RTL.html
+fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azureSkia,30,1) == dynamicDirAuto-ChangeText-RTL5.html dynamicDirAuto-refRTL-RTL.html
+fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azureSkia,30,1) == dynamicDirAuto-ChangeText-RTL6.html dynamicDirAuto-refRTL-RTL.html
+== dynamicDirAuto-ChangeText-RTL7.html dynamicDirAuto-refRTL-RTL.html
+== dynamicDirAuto-ChangeText-RTL8.html dynamicDirAuto-refRTL-RTL.html
+== dynamicDirAuto-ChangeText-RTL9.html dynamicDirAuto-refRTL-RTL.html
+== dynamicDirAuto-ChangeText-RTL10.html dynamicDirAuto-refRTL-RTL.html
 == dynamicDirAuto-DeleteText-LTR1.html dynamicDirAuto-refLTR-LTR.html
-fails-if(stylo) == dynamicDirAuto-DeleteText-LTR2.html dynamicDirAuto-refLTR-LTR.html
+== dynamicDirAuto-DeleteText-LTR2.html dynamicDirAuto-refLTR-LTR.html
 == dynamicDirAuto-DeleteText-LTR3.html dynamicDirAuto-refLTR-LTR.html
-fails-if(stylo) == dynamicDirAuto-DeleteText-RTL1.html dynamicDirAuto-refRTL-RTL.html
+== dynamicDirAuto-DeleteText-RTL1.html dynamicDirAuto-refRTL-RTL.html
 == dynamicDirAuto-DeleteText-RTL2.html dynamicDirAuto-refRTL-RTL.html
 == dynamicDirAuto-DeleteText-RTL3.html dynamicDirAuto-refRTL-RTL.html
 == 839886-1.html 839886-1-ref.html
 == 859093-1.html 859093-1-ref.html
 == 889742-1.html 889742-1-ref.html
-fails-if(stylo) == 1103348-1.html 1103348-1-ref.html
-fails-if(stylo) == 1169267-delete-add-1a.html 1169267-delete-add-1-ref.html
-fails-if(stylo) == 1169267-delete-add-1b.html 1169267-delete-add-1-ref.html
-fails-if(stylo) == 1169267-delete-add-2a.html 1169267-delete-add-2-ref.html
-fails-if(stylo) == 1169267-delete-add-2b.html 1169267-delete-add-2-ref.html
+== 1103348-1.html 1103348-1-ref.html
+== 1169267-delete-add-1a.html 1169267-delete-add-1-ref.html
+== 1169267-delete-add-1b.html 1169267-delete-add-1-ref.html
+== 1169267-delete-add-2a.html 1169267-delete-add-2-ref.html
+== 1169267-delete-add-2b.html 1169267-delete-add-2-ref.html
--- a/layout/reftests/bidi/reftest.list
+++ b/layout/reftests/bidi/reftest.list
@@ -94,21 +94,21 @@ fails-if(stylo) == 413928-2.html 413928-
 == 489887-1.html 489887-1-ref.html
 == 492231-1.html 492231-1-ref.html
 == 496006-1.html 496006-1-ref.html
 == 503269-1.html 503269-1-ref.html
 == 503957-1.html 503957-1-ref.html
 == 525740-1.html 525740-1-ref.html
 == 536963-1.html 536963-1-ref.html
 == 562169-1.html 562169-1-ref.html
-fails-if(stylo) == 562169-1a.html 562169-1-ref.html
+== 562169-1a.html 562169-1-ref.html
 == 562169-2.html 562169-2-ref.html
-fails-if(stylo) == 562169-2a.html 562169-2-ref.html
+== 562169-2a.html 562169-2-ref.html
 == 562169-3.html 562169-3-ref.html
-fails-if(stylo) == 562169-3a.html 562169-3-ref.html
+== 562169-3a.html 562169-3-ref.html
 == 562169-4.html 562169-4-ref.html
 == 588739-1.html 588739-ref.html
 == 588739-2.html 588739-ref.html
 == 588739-3.html 588739-ref.html
 == 612843-1.html 612843-1-ref.html
 == 613149-1a.html 613149-1-ref.html
 == 613149-1b.html 613149-1-ref.html
 fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azureSkia,36,2) == 613149-2a.html 613149-2-ref.html
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1364280-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<style>
+  div { color: green; }
+</style>
+<body dir="ltr">
+  <div>
+    This should be green.
+  </div>
+</body>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1364280-1.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<style>
+  div { color: red; }
+  div:dir(ltr) { color: green }
+</style>
+<body dir="rtl"
+      onload="window.oldColor = getComputedStyle(document.querySelector('div')).color;
+              document.body.dir = 'ltr'">
+  <div>
+    This should be green.
+  </div>
+</body>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1364280-2-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<style>
+  span { color: green }
+</style>
+<body dir="rtl">
+  <div dir=""></div>
+  <span>This should be green</span>
+</body>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1364280-2a.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<style>
+  span { color: red; }
+  div:dir(rtl) + span { color: green; }
+</style>
+<body dir="rtl" onload="window.oldColor = getComputedStyle(document.querySelector('span')).color; document.querySelector('[dir=auto]').setAttribute('dir', '')">
+  <div dir="auto"></div>
+  <span>This should be green</span>
+</body>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1364280-2b.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<style>
+  span { color: green; }
+  div:not(:dir(rtl)) + span { color: red; }
+</style>
+<body dir="rtl" onload="window.oldColor = getComputedStyle(document.querySelector('span')).color; document.querySelector('[dir=auto]').setAttribute('dir', '')">
+  <div dir="auto"></div>
+  <span>This should be green</span>
+</body>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1364280-2c.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<style>
+  span { color: green; }
+  div[dir="auto"]:dir(ltr) + span { color: red; }
+</style>
+<body dir="rtl" onload="window.oldColor = getComputedStyle(document.querySelector('span')).color; document.querySelector('[dir=auto]').setAttribute('dir', '')">
+  <div dir="auto"></div>
+  <span>This should be green</span>
+</body>
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -1992,9 +1992,13 @@ fails-if(stylo) == 1322512-1.html 132251
 == 1330051.svg 1330051-ref.svg
 == 1348481-1.html 1348481-ref.html
 == 1348481-2.html 1348481-ref.html
 fails-if(stylo) == 1348481-3.html 1348481-ref.html
 == 1352464-1.html 1352464-1-ref.html
 == 1358375-1.html 1358375-ref.html
 == 1358375-2.html 1358375-ref.html
 == 1358375-3.html 1358375-ref.html
+== 1364280-1.html 1364280-1-ref.html
+== 1364280-2a.html 1364280-2-ref.html
+== 1364280-2b.html 1364280-2-ref.html
+== 1364280-2c.html 1364280-2-ref.html
 == 1364335.html 1364335-ref.html
--- a/layout/reftests/w3c-css/submitted/selectors4/reftest.list
+++ b/layout/reftests/w3c-css/submitted/selectors4/reftest.list
@@ -1,11 +1,11 @@
 needs-focus == focus-within-1.html focus-within-1-ref.html
 needs-focus == focus-within-2.html focus-within-2-ref.html
 needs-focus == focus-within-3.html focus-within-3-ref.html
 == dir-style-01a.html dir-style-01-ref.html
-fails-if(stylo) == dir-style-01b.html dir-style-01-ref.html
+== dir-style-01b.html dir-style-01-ref.html
 == dir-style-02a.html dir-style-02-ref.html
-fails-if(stylo) == dir-style-02b.html dir-style-02-ref.html
+== dir-style-02b.html dir-style-02-ref.html
 == dir-style-03a.html dir-style-03-ref.html
-fails-if(stylo) == dir-style-03b.html dir-style-03-ref.html
+== dir-style-03b.html dir-style-03-ref.html
 == dir-style-04.html dir-style-04-ref.html
 == child-index-no-parent-01.html child-index-no-parent-01-ref.html