Bug 1311270 - Part 9. Handle mask-origin. draft
authorcku <cku@mozilla.com>
Thu, 24 Nov 2016 02:52:44 +0800
changeset 443047 fdba8a95cf53c02e912269e614195c6feee7b433
parent 443046 df93dbc729621180ab1ed1038f5f4122d686919f
child 537956 c46a2d57c0be74178d194a31882ff7425dc895f1
push id36890
push userbmo:cku@mozilla.com
push dateWed, 23 Nov 2016 19:16:58 +0000
bugs1311270
milestone53.0a1
Bug 1311270 - Part 9. Handle mask-origin. MozReview-Commit-ID: EGuK4TIy7wp
layout/painting/nsCSSRendering.cpp
--- a/layout/painting/nsCSSRendering.cpp
+++ b/layout/painting/nsCSSRendering.cpp
@@ -3347,26 +3347,16 @@ nsCSSRendering::ComputeImageLayerPositio
                                                  bool* aOutIsTransformedFixed)
 {
   // Compute background origin area relative to aBorderArea now as we may need
   // it to compute the effective image size for a CSS gradient.
   nsRect bgPositioningArea;
 
   StyleImageLayerOrigin backgroundOrigin = aLayer.mOrigin;
 
-  // XXX TODO: bug 1303623 only implements the parser of fill-box|stroke-box|view-box|no-clip.
-  // So we need to fallback to default value when rendering. We should remove this
-  // in bug 1311270.
-  if (backgroundOrigin == StyleImageLayerOrigin::Margin ||
-      backgroundOrigin == StyleImageLayerOrigin::Fill ||
-      backgroundOrigin == StyleImageLayerOrigin::Stroke ||
-      backgroundOrigin == StyleImageLayerOrigin::View) {
-    backgroundOrigin = StyleImageLayerOrigin::Border;
-  }
-
   nsIAtom* frameType = aForFrame->GetType();
   nsIFrame* geometryFrame = aForFrame;
   if (MOZ_UNLIKELY(frameType == nsGkAtoms::scrollFrame &&
                    NS_STYLE_IMAGELAYER_ATTACHMENT_LOCAL == aLayer.mAttachment)) {
     nsIScrollableFrame* scrollableFrame = do_QueryFrame(aForFrame);
     bgPositioningArea = nsRect(
       scrollableFrame->GetScrolledFrame()->GetPosition()
         // For the dir=rtl case: