Bug 1366866 - Enable inset box shadows with negative offsets. r=rhunt
authorMason Chang <mchang@mozilla.com>
Tue, 23 May 2017 11:08:10 -0700
changeset 409343 63fc83da98c19b40405e5dcfa9a78d109b3fa491
parent 409342 a2df1bb4fc8674c45126bed0a76ced298705a633
child 409344 1c986e3d73605e4ec09e5a4f3931ee4ffd8eefbe
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrhunt
bugs1366866
milestone55.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 1366866 - Enable inset box shadows with negative offsets. r=rhunt
layout/painting/nsDisplayList.cpp
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -5359,28 +5359,16 @@ nsDisplayBoxShadowInner::CanCreateWebRen
   }
 
   nsCSSShadowArray *shadows = aFrame->StyleEffects()->mBoxShadow;
   if (!shadows) {
     // Means we don't have to paint anything
     return true;
   }
 
-  for (uint32_t i = shadows->Length(); i > 0; --i) {
-    nsCSSShadowItem *shadowItem = shadows->ShadowAt(i - 1);
-    if (!shadowItem->mInset) {
-      continue;
-    }
-
-    if (shadowItem->mXOffset <= 0 || shadowItem->mYOffset <= 0) {
-      // Need to wait for WR to support clip out.
-      return false;
-    }
-  }
-
   return true;
 }
 
 LayerState
 nsDisplayBoxShadowInner::GetLayerState(nsDisplayListBuilder* aBuilder,
                                        LayerManager* aManager,
                                        const ContainerLayerParameters& aParameters)
 {