Backed out changeset ca238297899e (bug 1248913)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Thu, 24 Mar 2016 12:08:21 +0100
changeset 323597 140d9d3845a1e8893966fda7f66fd223e4dda7f1
parent 323596 6a8de4f3f95a0ead2df869effa82f85e78915b73
child 323598 87dec00f3dcc0880f358ba4b1f124c2cc486d8fd
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1248913
milestone47.0a2
backs outca238297899e7a5bd9053cc6b3c210c6945f9743
Backed out changeset ca238297899e (bug 1248913)
layout/base/nsDisplayItemTypesList.h
layout/base/nsDisplayList.cpp
layout/base/nsDisplayList.h
layout/generic/nsFrame.cpp
--- a/layout/base/nsDisplayItemTypesList.h
+++ b/layout/base/nsDisplayItemTypesList.h
@@ -1,15 +1,14 @@
 // IWYU pragma: private, include "nsDisplayList.h"
 DECLARE_DISPLAY_ITEM_TYPE(ALT_FEEDBACK)
 DECLARE_DISPLAY_ITEM_TYPE(BACKGROUND)
 DECLARE_DISPLAY_ITEM_TYPE(THEMED_BACKGROUND)
 DECLARE_DISPLAY_ITEM_TYPE_FLAGS(BACKGROUND_COLOR,TYPE_RENDERS_NO_IMAGES)
 DECLARE_DISPLAY_ITEM_TYPE(BLEND_CONTAINER)
-DECLARE_DISPLAY_ITEM_TYPE(BLEND_MODE)
 DECLARE_DISPLAY_ITEM_TYPE(BORDER)
 DECLARE_DISPLAY_ITEM_TYPE(BOX_SHADOW_OUTER)
 DECLARE_DISPLAY_ITEM_TYPE(BOX_SHADOW_INNER)
 DECLARE_DISPLAY_ITEM_TYPE(BULLET)
 DECLARE_DISPLAY_ITEM_TYPE(BUTTON_BORDER_BACKGROUND)
 DECLARE_DISPLAY_ITEM_TYPE(BUTTON_BOX_SHADOW_OUTER)
 DECLARE_DISPLAY_ITEM_TYPE(BUTTON_FOREGROUND)
 DECLARE_DISPLAY_ITEM_TYPE(CANVAS)
@@ -28,16 +27,17 @@ DECLARE_DISPLAY_ITEM_TYPE(LAYER_EVENT_RE
 DECLARE_DISPLAY_ITEM_TYPE(FIELDSET_BORDER_BACKGROUND)
 DECLARE_DISPLAY_ITEM_TYPE(FIXED_POSITION)
 DECLARE_DISPLAY_ITEM_TYPE(STICKY_POSITION)
 DECLARE_DISPLAY_ITEM_TYPE(FRAMESET_BORDER)
 DECLARE_DISPLAY_ITEM_TYPE(FRAMESET_BLANK)
 DECLARE_DISPLAY_ITEM_TYPE(HEADER_FOOTER)
 DECLARE_DISPLAY_ITEM_TYPE(IMAGE)
 DECLARE_DISPLAY_ITEM_TYPE(LIST_FOCUS)
+DECLARE_DISPLAY_ITEM_TYPE(MIX_BLEND_MODE)
 DECLARE_DISPLAY_ITEM_TYPE(OPACITY)
 DECLARE_DISPLAY_ITEM_TYPE(OPTION_EVENT_GRABBER)
 DECLARE_DISPLAY_ITEM_TYPE(OUTLINE)
 DECLARE_DISPLAY_ITEM_TYPE(OWN_LAYER)
 DECLARE_DISPLAY_ITEM_TYPE(PAGE_CONTENT)
 DECLARE_DISPLAY_ITEM_TYPE(PAGE_SEQUENCE)
 DECLARE_DISPLAY_ITEM_TYPE(PLUGIN)
 DECLARE_DISPLAY_ITEM_TYPE(PLUGIN_READBACK)
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -4302,50 +4302,50 @@ bool nsDisplayOpacity::TryMerge(nsDispla
 }
 
 void
 nsDisplayOpacity::WriteDebugInfo(std::stringstream& aStream)
 {
   aStream << " (opacity " << mOpacity << ")";
 }
 
-nsDisplayBlendMode::nsDisplayBlendMode(nsDisplayListBuilder* aBuilder,
+nsDisplayMixBlendMode::nsDisplayMixBlendMode(nsDisplayListBuilder* aBuilder,
                                              nsIFrame* aFrame, nsDisplayList* aList,
                                              uint8_t aBlendMode,
                                              const DisplayItemScrollClip* aScrollClip)
   : nsDisplayWrapList(aBuilder, aFrame, aList, aScrollClip)
   , mBlendMode(aBlendMode)
 {
-  MOZ_COUNT_CTOR(nsDisplayBlendMode);
+  MOZ_COUNT_CTOR(nsDisplayMixBlendMode);
 }
 
 #ifdef NS_BUILD_REFCNT_LOGGING
-nsDisplayBlendMode::~nsDisplayBlendMode() {
-  MOZ_COUNT_DTOR(nsDisplayBlendMode);
+nsDisplayMixBlendMode::~nsDisplayMixBlendMode() {
+  MOZ_COUNT_DTOR(nsDisplayMixBlendMode);
 }
 #endif
 
-nsRegion nsDisplayBlendMode::GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
+nsRegion nsDisplayMixBlendMode::GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
                                                 bool* aSnap) {
   *aSnap = false;
   // We are never considered opaque
   return nsRegion();
 }
 
 LayerState
-nsDisplayBlendMode::GetLayerState(nsDisplayListBuilder* aBuilder,
+nsDisplayMixBlendMode::GetLayerState(nsDisplayListBuilder* aBuilder,
                                      LayerManager* aManager,
                                      const ContainerLayerParameters& aParameters)
 {
   return LAYER_ACTIVE;
 }
 
-// nsDisplayBlendMode uses layers for rendering
+// nsDisplayMixBlendMode uses layers for rendering
 already_AddRefed<Layer>
-nsDisplayBlendMode::BuildLayer(nsDisplayListBuilder* aBuilder,
+nsDisplayMixBlendMode::BuildLayer(nsDisplayListBuilder* aBuilder,
                                   LayerManager* aManager,
                                   const ContainerLayerParameters& aContainerParameters) {
   ContainerLayerParameters newContainerParameters = aContainerParameters;
   newContainerParameters.mDisableSubpixelAntialiasingInDescendants = true;
 
   RefPtr<Layer> container = aManager->GetLayerBuilder()->
   BuildContainerLayerFor(aBuilder, aManager, mFrame, this, &mList,
                          newContainerParameters, nullptr);
@@ -4353,42 +4353,42 @@ nsDisplayBlendMode::BuildLayer(nsDisplay
     return nullptr;
   }
 
   container->SetMixBlendMode(nsCSSRendering::GetGFXBlendMode(mBlendMode));
 
   return container.forget();
 }
 
-bool nsDisplayBlendMode::ComputeVisibility(nsDisplayListBuilder* aBuilder,
+bool nsDisplayMixBlendMode::ComputeVisibility(nsDisplayListBuilder* aBuilder,
                                               nsRegion* aVisibleRegion) {
   // Our children are need their backdrop so we should not allow them to subtract
   // area from aVisibleRegion. We do need to find out what is visible under
   // our children in the temporary compositing buffer, because if our children
   // paint our entire bounds opaquely then we don't need an alpha channel in
   // the temporary compositing buffer.
   nsRect bounds = GetClippedBounds(aBuilder);
   nsRegion visibleUnderChildren;
   visibleUnderChildren.And(*aVisibleRegion, bounds);
   return nsDisplayWrapList::ComputeVisibility(aBuilder, &visibleUnderChildren);
 }
 
-bool nsDisplayBlendMode::TryMerge(nsDisplayItem* aItem) {
-  if (aItem->GetType() != TYPE_BLEND_MODE)
+bool nsDisplayMixBlendMode::TryMerge(nsDisplayItem* aItem) {
+  if (aItem->GetType() != TYPE_MIX_BLEND_MODE)
     return false;
   // items for the same content element should be merged into a single
   // compositing group
   // aItem->GetUnderlyingFrame() returns non-null because it's nsDisplayOpacity
   if (aItem->Frame()->GetContent() != mFrame->GetContent())
     return false;
   if (aItem->GetClip() != GetClip())
     return false;
   if (aItem->ScrollClip() != ScrollClip())
     return false;
-  MergeFromTrackingMergedFrames(static_cast<nsDisplayBlendMode*>(aItem));
+  MergeFromTrackingMergedFrames(static_cast<nsDisplayMixBlendMode*>(aItem));
   return true;
 }
 
 nsDisplayBlendContainer::nsDisplayBlendContainer(nsDisplayListBuilder* aBuilder,
                                                  nsIFrame* aFrame, nsDisplayList* aList,
                                                  const DisplayItemScrollClip* aScrollClip)
     : nsDisplayWrapList(aBuilder, aFrame, aList, aScrollClip)
     , mIndex(0)
--- a/layout/base/nsDisplayList.h
+++ b/layout/base/nsDisplayList.h
@@ -3377,23 +3377,23 @@ public:
 
   bool CanUseAsyncAnimations(nsDisplayListBuilder* aBuilder) override;
 
 private:
   float mOpacity;
   bool mForEventsOnly;
 };
 
-class nsDisplayBlendMode : public nsDisplayWrapList {
+class nsDisplayMixBlendMode : public nsDisplayWrapList {
 public:
-  nsDisplayBlendMode(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
+  nsDisplayMixBlendMode(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
                         nsDisplayList* aList, uint8_t aBlendMode,
                         const DisplayItemScrollClip* aScrollClip);
 #ifdef NS_BUILD_REFCNT_LOGGING
-  virtual ~nsDisplayBlendMode();
+  virtual ~nsDisplayMixBlendMode();
 #endif
 
   nsRegion GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
                            bool* aSnap) override;
 
   virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
                                              LayerManager* aManager,
                                              const ContainerLayerParameters& aContainerParameters) override;
@@ -3407,17 +3407,17 @@ public:
                                    LayerManager* aManager,
                                    const ContainerLayerParameters& aParameters) override;
   virtual bool ComputeVisibility(nsDisplayListBuilder* aBuilder,
                                  nsRegion* aVisibleRegion) override;
   virtual bool TryMerge(nsDisplayItem* aItem) override;
   virtual bool ShouldFlattenAway(nsDisplayListBuilder* aBuilder) override {
     return false;
   }
-  NS_DISPLAY_DECL_NAME("BlendMode", TYPE_BLEND_MODE)
+  NS_DISPLAY_DECL_NAME("MixBlendMode", TYPE_MIX_BLEND_MODE)
 
 private:
   uint8_t mBlendMode;
 };
 
 class nsDisplayBlendContainer : public nsDisplayWrapList {
 public:
     // Use this constructor for blend containers that can have active child layers.
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -2143,17 +2143,17 @@ nsIFrame::BuildDisplayListForStackingCon
 
   // Get the scroll clip to use for the container items that we create here.
   // If we cleared the clip, and we create multiple container items, then the
   // items we create before we restore the clip will have a different scroll
   // clip from the items we create after we restore the clip.
   const DisplayItemScrollClip* containerItemScrollClip =
     aBuilder->ClipState().CurrentAncestorScrollClipForStackingContextContents();
 
-  /* If adding both a nsDisplayBlendContainer and a nsDisplayBlendMode to the
+  /* If adding both a nsDisplayBlendContainer and a nsDisplayMixBlendMode to the
    * same list, the nsDisplayBlendContainer should be added first. This only
    * happens when the element creating this stacking context has mix-blend-mode
    * and also contains a child which has mix-blend-mode.
    * The nsDisplayBlendContainer must be added to the list first, so it does not
    * isolate the containing element blending as well.
    */
 
   if (aBuilder->ContainsBlendMode()) {
@@ -2308,19 +2308,19 @@ nsIFrame::BuildDisplayListForStackingCon
    * that opacity can be applied before blending as the blend color is
    * not affected by foreground opacity (only background alpha).
    */
 
   if (useBlendMode && !resultList.IsEmpty()) {
     DisplayListClipState::AutoSaveRestore mixBlendClipState(aBuilder);
     mixBlendClipState.Clear();
     resultList.AppendNewToTop(
-        new (aBuilder) nsDisplayBlendMode(aBuilder, this, &resultList,
-                                          disp->mMixBlendMode,
-                                          containerItemScrollClip));
+        new (aBuilder) nsDisplayMixBlendMode(aBuilder, this, &resultList,
+                                             disp->mMixBlendMode,
+                                             containerItemScrollClip));
   }
 
   CreateOwnLayerIfNeeded(aBuilder, &resultList);
 
   aList->AppendToTop(&resultList);
 }
 
 static nsDisplayItem*