Bug 952977: Switch SVGIntegrationUtils to gfx::Matrix r=nical
authorDavid Zbarsky <dzbarsky@gmail.com>
Sun, 29 Dec 2013 18:35:52 -0500
changeset 161846 f29ac8c53779b7ebe5f10ed3241135840bca813f
parent 161845 f71a7dafeefe40da30c6f760a4958dc7d9d28bae
child 161847 983b63dc75e32394717c7049b6b9c042be3e6dbb
push idunknown
push userunknown
push dateunknown
reviewersnical
bugs952977
milestone29.0a1
Bug 952977: Switch SVGIntegrationUtils to gfx::Matrix r=nical
content/svg/content/src/nsSVGLength2.cpp
layout/svg/nsSVGIntegrationUtils.cpp
layout/svg/nsSVGIntegrationUtils.h
--- a/content/svg/content/src/nsSVGLength2.cpp
+++ b/content/svg/content/src/nsSVGLength2.cpp
@@ -156,17 +156,17 @@ nsSVGLength2::GetAxisLength(SVGSVGElemen
     return 1;
 
   return FixAxisLength(aCtx->GetLength(mCtxType));
 }
 
 float
 nsSVGLength2::GetAxisLength(nsIFrame *aNonSVGFrame) const
 {
-  gfxSize size =
+  gfx::Size size =
     nsSVGIntegrationUtils::GetSVGCoordContextForNonSVGFrame(aNonSVGFrame);
   float length;
   switch (mCtxType) {
   case SVGContentUtils::X:
     length = size.width;
     break;
   case SVGContentUtils::Y:
     length = size.height;
--- a/layout/svg/nsSVGIntegrationUtils.cpp
+++ b/layout/svg/nsSVGIntegrationUtils.cpp
@@ -17,16 +17,17 @@
 #include "nsSVGElement.h"
 #include "nsSVGFilterFrame.h"
 #include "nsSVGFilterPaintCallback.h"
 #include "nsSVGMaskFrame.h"
 #include "nsSVGPaintServerFrame.h"
 #include "nsSVGUtils.h"
 #include "FrameLayerBuilder.h"
 #include "BasicLayers.h"
+#include "mozilla/gfx/Point.h"
 
 using namespace mozilla;
 using namespace mozilla::layers;
 
 // ----------------------------------------------------------------------
 
 /**
  * This class is used to get the pre-effects visual overflow rect of a frame,
@@ -180,27 +181,27 @@ nsSVGIntegrationUtils::GetContinuationUn
 {
   NS_ASSERTION(!aNonSVGFrame->IsFrameOfType(nsIFrame::eSVG),
                "SVG frames should not get here");
   nsIFrame* firstFrame =
     nsLayoutUtils::FirstContinuationOrSpecialSibling(aNonSVGFrame);
   return nsLayoutUtils::GetAllInFlowRectsUnion(firstFrame, firstFrame).Size();
 }
 
-/* static */ gfxSize
+/* static */ gfx::Size
 nsSVGIntegrationUtils::GetSVGCoordContextForNonSVGFrame(nsIFrame* aNonSVGFrame)
 {
   NS_ASSERTION(!aNonSVGFrame->IsFrameOfType(nsIFrame::eSVG),
                "SVG frames should not get here");
   nsIFrame* firstFrame =
     nsLayoutUtils::FirstContinuationOrSpecialSibling(aNonSVGFrame);
   nsRect r = nsLayoutUtils::GetAllInFlowRectsUnion(firstFrame, firstFrame);
   nsPresContext* presContext = firstFrame->PresContext();
-  return gfxSize(presContext->AppUnitsToFloatCSSPixels(r.width),
-                 presContext->AppUnitsToFloatCSSPixels(r.height));
+  return gfx::Size(presContext->AppUnitsToFloatCSSPixels(r.width),
+                   presContext->AppUnitsToFloatCSSPixels(r.height));
 }
 
 gfxRect
 nsSVGIntegrationUtils::GetSVGBBoxForNonSVGFrame(nsIFrame* aNonSVGFrame)
 {
   NS_ASSERTION(!aNonSVGFrame->IsFrameOfType(nsIFrame::eSVG),
                "SVG frames should not get here");
   nsIFrame* firstFrame =
--- a/layout/svg/nsSVGIntegrationUtils.h
+++ b/layout/svg/nsSVGIntegrationUtils.h
@@ -77,17 +77,17 @@ public:
   /**
    * When SVG effects need to resolve percentage, userSpaceOnUse lengths, they
    * need a coordinate context to resolve them against. This method provides
    * that coordinate context for non-SVG frames with SVG effects applied to
    * them. The gfxSize returned is the size of the union of all of the given
    * frame's continuations' border boxes, converted to SVG user units (equal to
    * CSS px units), as required by the SVG code.
    */
-  static gfxSize
+  static mozilla::gfx::Size
   GetSVGCoordContextForNonSVGFrame(nsIFrame* aNonSVGFrame);
 
   /**
    * SVG effects such as SVG filters, masking and clipPath may require an SVG
    * "bbox" for the element they're being applied to in order to make decisions
    * about positioning, and to resolve various lengths against. This method
    * provides the "bbox" for non-SVG frames. The bbox returned is in CSS px
    * units, and is the union of all aNonSVGFrame's continuations' overflow