Bug 1317636 - Part 5. Fix identation. draft
authorcku <cku@mozilla.com>
Thu, 17 Nov 2016 15:15:43 +0800
changeset 440752 493b7280366767d83b1fa9f62efd146ea0c651ef
parent 440751 3a60f9ac27659dae662a647d5fe3b9d9dcd76fd6
child 440753 e5e91aa16bd58ffd1ab47c354993e383c9712a8c
push id36315
push userbmo:cku@mozilla.com
push dateFri, 18 Nov 2016 02:41:02 +0000
bugs1317636
milestone53.0a1
Bug 1317636 - Part 5. Fix identation. MozReview-Commit-ID: 84aJzl6LrDC
layout/svg/nsSVGClipPathFrame.cpp
--- a/layout/svg/nsSVGClipPathFrame.cpp
+++ b/layout/svg/nsSVGClipPathFrame.cpp
@@ -144,53 +144,51 @@ nsSVGClipPathFrame::PaintClipMask(gfxCon
     return DrawResult::SUCCESS; // Reference loop!
   }
 
   DrawResult result = DrawResult::SUCCESS;
   DrawTarget* maskDT = aMaskContext.GetDrawTarget();
   MOZ_ASSERT(maskDT->GetFormat() == SurfaceFormat::A8);
 
   // Paint this clipPath's contents into aMaskDT:
-  {
-    // We need to set mMatrixForChildren here so that under the PaintSVG calls
-    // on our children (below) our GetCanvasTM() method will return the correct
-    // transform.
-    mMatrixForChildren = GetClipPathTransform(aClippedFrame) * aMatrix;
+  // We need to set mMatrixForChildren here so that under the PaintSVG calls
+  // on our children (below) our GetCanvasTM() method will return the correct
+  // transform.
+  mMatrixForChildren = GetClipPathTransform(aClippedFrame) * aMatrix;
 
-    // Check if this clipPath is itself clipped by another clipPath:
-    nsSVGClipPathFrame* clipPathThatClipsClipPath =
-      nsSVGEffects::GetEffectProperties(this).GetClipPathFrame(nullptr);
-    nsSVGUtils::MaskUsage maskUsage;
-    nsSVGUtils::DetermineMaskUsage(this, true, maskUsage);
+  // Check if this clipPath is itself clipped by another clipPath:
+  nsSVGClipPathFrame* clipPathThatClipsClipPath =
+    nsSVGEffects::GetEffectProperties(this).GetClipPathFrame(nullptr);
+  nsSVGUtils::MaskUsage maskUsage;
+  nsSVGUtils::DetermineMaskUsage(this, true, maskUsage);
 
-    if (maskUsage.shouldApplyClipPath) {
-      clipPathThatClipsClipPath->ApplyClipPath(aMaskContext, aClippedFrame,
-                                               aMatrix);
-    } else if (maskUsage.shouldGenerateClipMaskLayer) {
-      Matrix maskTransform;
-      RefPtr<SourceSurface> mask =
-        clipPathThatClipsClipPath->GetClipMask(aMaskContext, aClippedFrame,
-                                               aMatrix, &maskTransform);
-      aMaskContext.PushGroupForBlendBack(gfxContentType::ALPHA, 1.0,
-                                         mask, maskTransform);
-      // The corresponding PopGroupAndBlend call below will mask the
-      // blend using |mask|.
-    }
+  if (maskUsage.shouldApplyClipPath) {
+    clipPathThatClipsClipPath->ApplyClipPath(aMaskContext, aClippedFrame,
+                                             aMatrix);
+  } else if (maskUsage.shouldGenerateClipMaskLayer) {
+    Matrix maskTransform;
+    RefPtr<SourceSurface> mask =
+      clipPathThatClipsClipPath->GetClipMask(aMaskContext, aClippedFrame,
+                                             aMatrix, &maskTransform);
+    aMaskContext.PushGroupForBlendBack(gfxContentType::ALPHA, 1.0,
+                                       mask, maskTransform);
+    // The corresponding PopGroupAndBlend call below will mask the
+    // blend using |mask|.
+  }
 
-    // Paint our children into the mask:
-    for (nsIFrame* kid = mFrames.FirstChild(); kid;
-         kid = kid->GetNextSibling()) {
-      result &= PaintFrameIntoMask(kid, aClippedFrame, aMaskContext, aMatrix);
-    }
+  // Paint our children into the mask:
+  for (nsIFrame* kid = mFrames.FirstChild(); kid;
+       kid = kid->GetNextSibling()) {
+    result &= PaintFrameIntoMask(kid, aClippedFrame, aMaskContext, aMatrix);
+  }
 
-    if (maskUsage.shouldGenerateClipMaskLayer) {
-      aMaskContext.PopGroupAndBlend();
-    } else if (maskUsage.shouldApplyClipPath) {
-      aMaskContext.PopClip();
-    }
+  if (maskUsage.shouldGenerateClipMaskLayer) {
+    aMaskContext.PopGroupAndBlend();
+  } else if (maskUsage.shouldApplyClipPath) {
+    aMaskContext.PopClip();
   }
 
   // Moz2D transforms in the opposite direction to Thebes
   gfxMatrix maskTransfrom = aMaskContext.CurrentMatrix();
   maskTransfrom.Invert();
 
   if (aExtraMask) {
     ComposeExtraMask(maskDT, maskTransfrom, aExtraMask, aExtraMasksTransform);