Bug 1518069 - Do not use transform separators for nsDisplayWrapList containing just nsDisplayTransform r=mattwoodrow
authorMiko Mynttinen <mikokm@gmail.com>
Mon, 21 Jan 2019 21:50:11 +0000
changeset 454738 ad20edb20e58f913e922dff27005fe088903e5e9
parent 454737 39d0c50a2209e0f0c982b1d121765c9dc950e161
child 454739 f722c4dbd4ccc19911de8ad05423363e0b5b2da7
push id35411
push usercsabou@mozilla.com
push dateTue, 22 Jan 2019 03:53:40 +0000
treeherdermozilla-central@ada22b635f8d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1518069
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1518069 - Do not use transform separators for nsDisplayWrapList containing just nsDisplayTransform r=mattwoodrow Differential Revision: https://phabricator.services.mozilla.com/D16841
layout/generic/nsFrame.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -2540,16 +2540,23 @@ static bool FrameParticipatesIn3DContext
 
   MOZ_ASSERT(frame == ancestor);
   return true;
 }
 
 static bool ItemParticipatesIn3DContext(nsIFrame* aAncestor,
                                         nsDisplayItem* aItem) {
   auto type = aItem->GetType();
+
+  if (type == DisplayItemType::TYPE_WRAP_LIST &&
+      aItem->GetChildren()->Count() == 1) {
+    // If the wraplist has only one child item, use the type of that item.
+    type = aItem->GetChildren()->GetBottom()->GetType();
+  }
+
   if (type != DisplayItemType::TYPE_TRANSFORM &&
       type != DisplayItemType::TYPE_PERSPECTIVE) {
     return false;
   }
   nsIFrame* transformFrame = aItem->Frame();
   if (aAncestor->GetContent() == transformFrame->GetContent()) {
     return true;
   }