Bug 1317636 - Part 6. Fix identation. draft
authorcku <cku@mozilla.com>
Thu, 17 Nov 2016 15:15:43 +0800
changeset 440353 c88b14dfafdd9f048a5ea0c6e31aa367679f8618
parent 440352 8e9990617269fdfc719820c0dc3b4eb57d01eac6
child 440354 fe6017bd35cd77964bb7a853c7ab1e6a84d608e6
push id36210
push userbmo:cku@mozilla.com
push dateThu, 17 Nov 2016 12:38:18 +0000
bugs1317636
milestone53.0a1
Bug 1317636 - Part 6. Fix identation. MozReview-Commit-ID: 84aJzl6LrDC
layout/svg/nsSVGClipPathFrame.cpp
--- a/layout/svg/nsSVGClipPathFrame.cpp
+++ b/layout/svg/nsSVGClipPathFrame.cpp
@@ -145,53 +145,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);