Bug 1384435 - Don't clear animation only dirty bit during style recalc (unless the element is in a display:none subtree). r?birtles draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Tue, 08 Aug 2017 10:15:01 +0900
changeset 642299 b407419d3c209c75ed22cbf56584757d0a55fbe1
parent 642204 65507616792c990b1230888612dd7ffc13ed32b4
child 724952 4acd63d2721d86df90a7e627cadf46ee17ec07ec
push id72700
push userhikezoe@mozilla.com
push dateTue, 08 Aug 2017 01:15:32 +0000
reviewersbirtles
bugs1384435, 1356141, 1367975
milestone57.0a1
Bug 1384435 - Don't clear animation only dirty bit during style recalc (unless the element is in a display:none subtree). r?birtles After bug 1356141, the setup of animation-only dirty bit should have matched to normal dirty bit's one (Though they don't match in post traversal due to throttled animation flush). An unset_animation_only_dirty_descendants call removed in this patch cleared dirty bits which are needed for post traversal if there is a second animation-only traversal and if there is no need to restyle for the second animation-only traversal. The reftest in this patch fails without either this fix or the fix for bug 1367975. See [Gecko bug 1384435 comment 12](https://bugzilla.mozilla.org/show_bug.cgi?id=1384435#c12) for more detail what's going on at that time. MozReview-Commit-ID: Dw24Vgoabmd
layout/reftests/css-transitions/reftest.list
layout/reftests/css-transitions/style-change-during-transition-ref.html
layout/reftests/css-transitions/style-change-during-transition.html
--- a/layout/reftests/css-transitions/reftest.list
+++ b/layout/reftests/css-transitions/reftest.list
@@ -2,8 +2,9 @@
 == transitions-inline-already-wrapped-2.html transitions-inline-ref.html
 == transitions-inline-rewrap-1.html transitions-inline-ref.html
 == transitions-inline-rewrap-2.html transitions-inline-ref.html
 == stacking-context-opacity-lose-to-animation.html stacking-context-transition-ref.html
 == stacking-context-transform-lose-to-animation.html stacking-context-transition-ref.html
 == stacking-context-opacity-wins-over-important-style.html stacking-context-transition-ref.html
 == stacking-context-transform-wins-over-important-style.html stacking-context-transition-ref.html
 == transition-and-animation-with-different-durations.html transition-and-animation-with-different-durations-ref.html
+== style-change-during-transition.html style-change-during-transition-ref.html
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-transitions/style-change-during-transition-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<div>
+  <div>
+    <div>
+      <strong>Text</strong>
+    </div>
+  </div>
+</div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-transitions/style-change-during-transition.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<style>
+.container {
+  visibility: visible;
+  transition: visibility .2s;
+}
+
+.hidden {
+  visibility: hidden;
+}
+</style>
+<div id="tooltip" class="container hidden">
+  <div>
+    <div>
+      <strong>Text</strong>
+    </div>
+  </div>
+</div>
+<script>
+window.addEventListener("load", () => {
+  requestIdleCallback(() => {
+    tooltip.classList.remove("hidden");
+    requestAnimationFrame(() => {
+      requestAnimationFrame(() => {
+        tooltip.style.zIndex = 2;
+        document.documentElement.classList.remove("reftest-wait");
+      });
+    });
+  });
+});
+</script>