Bug 1474402 - Disable TryUpdateTransformOnly when we have RDL enabled since it can cause sorting issues. r?mstange draft
authorMatt Woodrow <mwoodrow@mozilla.com>
Tue, 10 Jul 2018 08:48:58 +1200
changeset 815733 a241099a3bf60db312e8a04d3ca248b6cf581cc8
parent 815526 0dea01725c3235e9c14363df0f29c5343a8c3b7e
push id115633
push usermwoodrow@mozilla.com
push dateMon, 09 Jul 2018 20:49:21 +0000
reviewersmstange
bugs1474402
milestone63.0a1
Bug 1474402 - Disable TryUpdateTransformOnly when we have RDL enabled since it can cause sorting issues. r?mstange MozReview-Commit-ID: GguBTl2zZXO
layout/generic/nsFrame.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -7148,16 +7148,26 @@ DoesLayerOrAncestorsHaveOutOfDateFrameMe
     }
   }
   return false;
 }
 
 bool
 nsIFrame::TryUpdateTransformOnly(Layer** aLayerResult)
 {
+  // If we move a transformed layer when we have a merged display
+  // list, then it can end up intersecting other items for which
+  // we don't have a defined ordering.
+  // We could allow this if the display list is in the canonical
+  // ordering (correctly sorted for all intersections), but we
+  // don't have a way to check that yet.
+  if (nsLayoutUtils::AreRetainedDisplayListsEnabled()) {
+    return false;
+  }
+
   Layer* layer = FrameLayerBuilder::GetDedicatedLayer(
     this, DisplayItemType::TYPE_TRANSFORM);
   if (!layer || !layer->HasUserData(LayerIsPrerenderedDataKey())) {
     // If this layer isn't prerendered or we clip composites to our OS
     // window, then we can't correctly optimize to an empty
     // transaction in general.
     return false;
   }