Bug 1313757 - (WIP) Paitially fix this bug when e10 is disable. draft
authorcku <cku@mozilla.com>
Mon, 09 Jan 2017 13:44:45 +0800
changeset 457656 6184e00e5aa389f802bebd13789ce095c2147e9d
parent 457629 701868bfddcba5bdec516be33a86dcd525dc74cf
child 541550 25ecf830c683cffa743d65214494809160e43169
push id40851
push usercku@mozilla.com
push dateMon, 09 Jan 2017 14:28:20 +0000
bugs1313757
milestone53.0a1
Bug 1313757 - (WIP) Paitially fix this bug when e10 is disable. MozReview-Commit-ID: 54sPe4s8Oss
layout/painting/nsDisplayList.cpp
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -2597,17 +2597,21 @@ nsDisplayBackgroundImage::nsDisplayBackg
   uint32_t flags = aBuilder->GetBackgroundPaintFlags();
   const nsStyleImageLayers::Layer &layer = mBackgroundStyle->mImage.mLayers[mLayer];
 
   bool isTransformedFixed;
   nsBackgroundLayerState state =
     nsCSSRendering::PrepareImageLayer(presContext, mFrame, flags,
                                       mBackgroundRect, mBackgroundRect, layer,
                                       &isTransformedFixed);
-  mShouldTreatAsFixed = ComputeShouldTreatAsFixed(isTransformedFixed);
+
+  StyleGeometryBox clip = mBackgroundStyle->mImage.mLayers[mLayer].mClip;
+  mShouldTreatAsFixed = (clip == StyleGeometryBox::Text)
+                        ? false
+                        : ComputeShouldTreatAsFixed(isTransformedFixed);
 
   mBounds = GetBoundsInternal(aBuilder);
   if (ShouldFixToViewport(aBuilder)) {
     mAnimatedGeometryRoot = aBuilder->FindAnimatedGeometryRootFor(this);
 
     // Expand the item's visible rect to cover the entire bounds, limited to the
     // viewport rect. This is necessary because the background's clip can move
     // asynchronously.