Backed out changeset f179621a517b (bug 1147538) for osx reftest failures a=backout
authorWes Kocher <wkocher@mozilla.com>
Thu, 13 Apr 2017 23:59:49 -0700
changeset 353058 34c60d0619c063f1d31d3ad5d7032e4129f11f98
parent 353057 ac609288dd9417f0d75a455f297593792c5730ea
child 353059 a8c41e0256ec42b847683a124190c23fbf04f811
push id89197
push userkwierso@gmail.com
push dateFri, 14 Apr 2017 06:59:56 +0000
treeherdermozilla-inbound@34c60d0619c0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1147538
milestone55.0a1
backs outf179621a517b820829ca82c23b783a51ceace6f5
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
Backed out changeset f179621a517b (bug 1147538) for osx reftest failures a=backout
layout/painting/FrameLayerBuilder.cpp
layout/painting/nsDisplayList.cpp
layout/painting/nsDisplayList.h
--- a/layout/painting/FrameLayerBuilder.cpp
+++ b/layout/painting/FrameLayerBuilder.cpp
@@ -3203,16 +3203,18 @@ void ContainerState::FinishPaintedLayerD
     data->mLayer = paintedLayer;
 
     NS_ASSERTION(FindIndexOfLayerIn(mNewChildLayers, paintedLayer) < 0,
                  "Layer already in list???");
     mNewChildLayers[data->mNewChildLayersIndex].mLayer = paintedLayer.forget();
   }
 
   for (auto& item : data->mAssignedDisplayItems) {
+    MOZ_ASSERT(item.mItem->GetType() != nsDisplayItem::TYPE_LAYER_EVENT_REGIONS);
+
     InvalidateForLayerChange(item.mItem, data->mLayer);
     mLayerBuilder->AddPaintedDisplayItem(data, item.mItem, item.mClip,
                                          *this, item.mLayerState,
                                          data->mAnimatedGeometryRootOffset);
   }
 
   NewLayerEntry* newLayerEntry = &mNewChildLayers[data->mNewChildLayersIndex];
 
@@ -4460,47 +4462,46 @@ ContainerState::ProcessDisplayItems(nsDi
         mPaintedLayerDataTree.FindPaintedLayerFor(animatedGeometryRoot, itemASR, layerClipChain,
                                                   itemVisibleRect,
                                                   item->Frame()->In3DContextAndBackfaceIsHidden(),
                                                   [&]() {
           return NewPaintedLayerData(item, animatedGeometryRoot, itemASR, layerClipChain, scrollMetadataASR,
                                      topLeft);
         });
 
-      nsIntRegion opaquePixels;
       if (itemType == nsDisplayItem::TYPE_LAYER_EVENT_REGIONS) {
         nsDisplayLayerEventRegions* eventRegions =
             static_cast<nsDisplayLayerEventRegions*>(item);
         paintedLayerData->AccumulateEventRegions(this, eventRegions);
       } else {
         // check to see if the new item has rounded rect clips in common with
         // other items in the layer
         if (mManager->IsWidgetLayerManager()) {
           paintedLayerData->UpdateCommonClipCount(itemClip);
         }
-        opaquePixels = ComputeOpaqueRect(item,
+        nsIntRegion opaquePixels = ComputeOpaqueRect(item,
             animatedGeometryRoot, itemClip, aList,
             &paintedLayerData->mHideAllLayersBelow,
             &paintedLayerData->mOpaqueForAnimatedGeometryRootParent);
         MOZ_ASSERT(nsIntRegion(itemDrawRect).Contains(opaquePixels));
         opaquePixels.AndWith(itemVisibleRect);
-      }
-
-      paintedLayerData->Accumulate(this, item, opaquePixels,
-          itemVisibleRect, itemClip, layerState);
-      if (!paintedLayerData->mLayer) {
-        // Try to recycle the old layer of this display item.
-        RefPtr<PaintedLayer> layer =
-          AttemptToRecyclePaintedLayer(animatedGeometryRoot, item, topLeft);
-        if (layer) {
-          paintedLayerData->mLayer = layer;
-
-          NS_ASSERTION(FindIndexOfLayerIn(mNewChildLayers, layer) < 0,
-                       "Layer already in list???");
-          mNewChildLayers[paintedLayerData->mNewChildLayersIndex].mLayer = layer.forget();
+        paintedLayerData->Accumulate(this, item, opaquePixels,
+            itemVisibleRect, itemClip, layerState);
+
+        if (!paintedLayerData->mLayer) {
+          // Try to recycle the old layer of this display item.
+          RefPtr<PaintedLayer> layer =
+            AttemptToRecyclePaintedLayer(animatedGeometryRoot, item, topLeft);
+          if (layer) {
+            paintedLayerData->mLayer = layer;
+
+            NS_ASSERTION(FindIndexOfLayerIn(mNewChildLayers, layer) < 0,
+                         "Layer already in list???");
+            mNewChildLayers[paintedLayerData->mNewChildLayersIndex].mLayer = layer.forget();
+          }
         }
       }
     }
 
     if (itemSameCoordinateSystemChildren &&
         itemSameCoordinateSystemChildren->NeedsTransparentSurface()) {
       aList->SetNeedsTransparentSurface();
     }
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -4439,22 +4439,16 @@ nsDisplayLayerEventRegions::WriteDebugIn
   if (!mHorizontalPanRegion.IsEmpty()) {
     AppendToString(aStream, mHorizontalPanRegion, " (horizPanRegion ", ")");
   }
   if (!mVerticalPanRegion.IsEmpty()) {
     AppendToString(aStream, mVerticalPanRegion, " (vertPanRegion ", ")");
   }
 }
 
-mozilla::Maybe<nscolor>
-nsDisplayLayerEventRegions::IsUniform(nsDisplayListBuilder* aBuilder)
-{
-  return Some(NS_RGBA(0,0,0,0));
-}
-
 nsDisplayCaret::nsDisplayCaret(nsDisplayListBuilder* aBuilder,
                                nsIFrame* aCaretFrame)
   : nsDisplayItem(aBuilder, aCaretFrame)
   , mCaret(aBuilder->GetCaret())
   , mBounds(aBuilder->GetCaretRect() + ToReferenceFrame())
 {
   MOZ_COUNT_CTOR(nsDisplayCaret);
 }
--- a/layout/painting/nsDisplayList.h
+++ b/layout/painting/nsDisplayList.h
@@ -3563,17 +3563,16 @@ public:
                             const DisplayItemClipChain* aClip) override
   {
     NS_ASSERTION(CanApplyOpacity(), "ApplyOpacity should be allowed");
   }
   virtual bool CanApplyOpacity() const override
   {
     return true;
   }
-  virtual mozilla::Maybe<nscolor> IsUniform(nsDisplayListBuilder* aBuilder) override;
 
   NS_DISPLAY_DECL_NAME("LayerEventRegions", TYPE_LAYER_EVENT_REGIONS)
 
   // Indicate that aFrame's border-box contributes to the event regions for
   // this layer. aFrame must have the same reference frame as mFrame.
   void AddFrame(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame);
 
   // Indicate that an inactive scrollframe's scrollport should be added to the