Bug 1345202 part 3: Add a few more required 'using' and #include statements in layout/svg. r?TYLin draft
authorDaniel Holbert <dholbert@cs.stanford.edu>
Tue, 07 Mar 2017 20:10:29 -0800
changeset 494990 ced5704fd1a8ecb31031ac4956357dc9c40c449e
parent 494989 ed19f22b807c918a940f97062c76f672f0c835d1
child 548252 1e08f5b622b7929642c10a6d6dfa53fbcd4bf473
push id48194
push userdholbert@mozilla.com
push dateWed, 08 Mar 2017 04:11:09 +0000
reviewersTYLin
bugs1345202
milestone55.0a1
Bug 1345202 part 3: Add a few more required 'using' and #include statements in layout/svg. r?TYLin Specifically: - SVGGeometryFrame.cpp has several uses the type SVGGeometryElement which is really mozilla::dom::SVGGeometryElement. So I'm adding a 'using' decl for the 'mozilla::dom' namespace (and I'm dropping a now-unnecessary explicit dom:: prefix from another type there). - SVGImageContext.cpp calls several functions on nsIFrame (PresContext() & StyleSVG() at least). So I'm adding an #include for nsIFrame.h. - nsSVGMarkerFrame.cpp uses the type SVGGeometryFrame, which is really mozilla::SVGGeometryFrame. So I'm adding a 'using' decl for the 'mozilla' namespace. MozReview-Commit-ID: AlCrocHhPtr
layout/svg/SVGGeometryFrame.cpp
layout/svg/SVGImageContext.cpp
--- a/layout/svg/SVGGeometryFrame.cpp
+++ b/layout/svg/SVGGeometryFrame.cpp
@@ -25,16 +25,17 @@
 #include "SVGGeometryElement.h"
 #include "nsSVGUtils.h"
 #include "mozilla/ArrayUtils.h"
 #include "SVGAnimatedTransformList.h"
 #include "SVGContentUtils.h"
 #include "SVGGraphicsElement.h"
 
 using namespace mozilla;
+using namespace mozilla::dom;
 using namespace mozilla::gfx;
 using namespace mozilla::image;
 
 //----------------------------------------------------------------------
 // Implementation
 
 nsIFrame*
 NS_NewSVGGeometryFrame(nsIPresShell* aPresShell,
@@ -702,17 +703,17 @@ SVGGeometryFrame::GetBBoxContribution(co
 // SVGGeometryFrame methods:
 
 gfxMatrix
 SVGGeometryFrame::GetCanvasTM()
 {
   NS_ASSERTION(GetParent(), "null parent");
 
   nsSVGContainerFrame *parent = static_cast<nsSVGContainerFrame*>(GetParent());
-  dom::SVGGraphicsElement *content = static_cast<dom::SVGGraphicsElement*>(mContent);
+  SVGGraphicsElement *content = static_cast<SVGGraphicsElement*>(mContent);
 
   return content->PrependLocalTransformsTo(parent->GetCanvasTM());
 }
 
 SVGGeometryFrame::MarkerProperties
 SVGGeometryFrame::GetMarkerProperties(SVGGeometryFrame *aFrame)
 {
   NS_ASSERTION(!aFrame->GetPrevContinuation(), "aFrame should be first continuation");
--- a/layout/svg/SVGImageContext.cpp
+++ b/layout/svg/SVGImageContext.cpp
@@ -5,16 +5,17 @@
 
 
 // Main header first:
 #include "SVGImageContext.h"
 
 // Keep others in (case-insensitive) order:
 #include "gfxUtils.h"
 #include "mozilla/Preferences.h"
+#include "nsIFrame.h"
 #include "nsPresContext.h"
 
 namespace mozilla {
 
 bool
 SVGImageContext::MaybeStoreContextPaint(nsIFrame* aFromFrame)
 {
   static bool sEnabledForContent = false;