Bug 1287122 - Make sure we build nsDisplayOpacity if we need it, since useOpacity already takes svg effects into account. r=dbaron
authorMatt Woodrow <mwoodrow@mozilla.com>
Fri, 05 Aug 2016 10:37:46 +1200
changeset 308312 4d27015914702b520c77574e82ba7f09e5b13f8d
parent 308311 79b31ab92faac9a6aae28104d3348bcf453ec146
child 308313 9e70c48a9b7ce67a913b4a5a838b9f93c6719b1f
push id31092
push usercbook@mozilla.com
push dateFri, 05 Aug 2016 10:16:59 +0000
treeherderautoland@b97dd7dd3cb9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs1287122
milestone51.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 1287122 - Make sure we build nsDisplayOpacity if we need it, since useOpacity already takes svg effects into account. r=dbaron
layout/generic/nsFrame.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -2440,20 +2440,21 @@ nsIFrame::BuildDisplayListForStackingCon
     /* List now emptied, so add the new list to the top. */
     resultList.AppendNewToTop(
         new (aBuilder) nsDisplaySVGEffects(aBuilder, this, &resultList, useOpacity));
     // Also add the hoisted scroll info items. We need those for APZ scrolling
     // because nsDisplaySVGEffects items can't build active layers.
     aBuilder->ExitSVGEffectsContents();
     resultList.AppendToTop(&hoistedScrollInfoItemsStorage);
   }
-  /* Else, if the list is non-empty and there is CSS group opacity without SVG
+
+  /* If the list is non-empty and there is CSS group opacity without SVG
    * effects, wrap it up in an opacity item.
    */
-  else if (useOpacity && !resultList.IsEmpty()) {
+  if (useOpacity && !resultList.IsEmpty()) {
     // Don't clip nsDisplayOpacity items. We clip their descendants instead.
     // The clip we would set on an element with opacity would clip
     // all descendant content, but some should not be clipped.
     DisplayListClipState::AutoSaveRestore opacityClipState(aBuilder);
     opacityClipState.Clear();
     resultList.AppendNewToTop(
         new (aBuilder) nsDisplayOpacity(aBuilder, this, &resultList,
                                         containerItemScrollClip, opacityItemForEventsOnly));