Backout WrapInWrapList changes for now
authorMatt Woodrow <mwoodrow@mozilla.com>
Thu, 12 Oct 2017 16:03:46 +1300
changeset 685677 700f55342c02e0c267c705b42bafab45727090a0
parent 685676 1d917ba31e53ff28cbdc063c418615c749895ba1
child 685678 a4758024dc354d2608accaae5543d636824c1f29
push id86010
push userbmo:ethlin@mozilla.com
push dateWed, 25 Oct 2017 00:44:42 +0000
milestone58.0a1
Backout WrapInWrapList changes for now
layout/generic/nsFrame.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -3110,17 +3110,22 @@ WrapInWrapList(nsDisplayListBuilder* aBu
                nsIFrame* aFrame, nsDisplayList* aList,
                const ActiveScrolledRoot* aContainerASR)
 {
   nsDisplayItem* item = aList->GetBottom();
   if (!item) {
     return nullptr;
   }
 
-  if (!aFrame->IsTransformed()) {
+  nsIFrame *itemFrame = item->Frame();
+  if (item->GetType() == DisplayItemType::TYPE_PERSPECTIVE) {
+    itemFrame = static_cast<nsDisplayPerspective*>(item)->TransformFrame();
+  }
+
+  if (item->GetAbove() || itemFrame != aFrame) {
     return new (aBuilder) nsDisplayWrapList(aBuilder, aFrame, aList, aContainerASR);
   }
   aList->RemoveBottom();
   return item;
 }
 
 /**
  * Check if a frame should be visited for building display list.