From eef6edd635d65c7c780bbe39b7412dbc1d07707f Mon Sep 17 00:00:00 2001 From: David Zbarsky Date: Tue, 29 Jan 2013 17:11:44 -0500 Subject: [PATCH] Bug 832154: Move SVGMarkerElement to mozilla::dom r=bz,longsonr --HG-- rename : content/svg/content/src/nsSVGMarkerElement.cpp => content/svg/content/src/SVGMarkerElement.cpp rename : content/svg/content/src/nsSVGMarkerElement.h => content/svg/content/src/SVGMarkerElement.h --- content/svg/content/src/Makefile.in | 3 +- ...MarkerElement.cpp => SVGMarkerElement.cpp} | 116 +++++++++--------- ...sSVGMarkerElement.h => SVGMarkerElement.h} | 41 ++++--- content/svg/content/src/nsSVGAngle.cpp | 4 +- content/svg/content/src/nsSVGAngle.h | 6 +- layout/svg/nsSVGMarkerFrame.cpp | 10 +- 6 files changed, 97 insertions(+), 83 deletions(-) rename content/svg/content/src/{nsSVGMarkerElement.cpp => SVGMarkerElement.cpp} (75%) rename content/svg/content/src/{nsSVGMarkerElement.h => SVGMarkerElement.h} (82%) diff --git a/content/svg/content/src/Makefile.in b/content/svg/content/src/Makefile.in index 04fd7cf1584..6f4868c3cda 100644 --- a/content/svg/content/src/Makefile.in +++ b/content/svg/content/src/Makefile.in @@ -49,7 +49,6 @@ CPPSRCS = \ nsSVGInteger.cpp \ nsSVGIntegerPair.cpp \ nsSVGLength2.cpp \ - nsSVGMarkerElement.cpp \ nsSVGNumber2.cpp \ nsSVGNumberPair.cpp \ nsSVGPathDataParser.cpp \ @@ -94,6 +93,7 @@ CPPSRCS = \ SVGLengthListSMILType.cpp \ SVGLineElement.cpp \ SVGLocatableElement.cpp \ + SVGMarkerElement.cpp \ SVGMaskElement.cpp \ SVGMatrix.cpp \ SVGMetadataElement.cpp \ @@ -177,6 +177,7 @@ EXPORTS_mozilla/dom = \ SVGImageElement.h \ SVGLineElement.h \ SVGLocatableElement.h \ + SVGMarkerElement.h \ SVGMaskElement.h \ SVGMatrix.h \ SVGMetadataElement.h \ diff --git a/content/svg/content/src/nsSVGMarkerElement.cpp b/content/svg/content/src/SVGMarkerElement.cpp similarity index 75% rename from content/svg/content/src/nsSVGMarkerElement.cpp rename to content/svg/content/src/SVGMarkerElement.cpp index 51f56351105..7b66ccbcb4e 100644 --- a/content/svg/content/src/nsSVGMarkerElement.cpp +++ b/content/svg/content/src/SVGMarkerElement.cpp @@ -9,16 +9,20 @@ #include "nsCOMPtr.h" #include "SVGAnimatedPreserveAspectRatio.h" #include "nsError.h" -#include "nsSVGMarkerElement.h" +#include "mozilla/dom/SVGMarkerElement.h" #include "gfxMatrix.h" #include "nsContentUtils.h" // NS_ENSURE_FINITE #include "SVGContentUtils.h" #include "SVGAngle.h" -using namespace mozilla; -using namespace mozilla::dom; +NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Marker) -nsSVGElement::LengthInfo nsSVGMarkerElement::sLengthInfo[4] = +DOMCI_NODE_DATA(SVGMarkerElement, mozilla::dom::SVGMarkerElement) + +namespace mozilla { +namespace dom { + +nsSVGElement::LengthInfo SVGMarkerElement::sLengthInfo[4] = { { &nsGkAtoms::refX, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X }, { &nsGkAtoms::refY, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y }, @@ -26,13 +30,13 @@ nsSVGElement::LengthInfo nsSVGMarkerElement::sLengthInfo[4] = { &nsGkAtoms::markerHeight, 3, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y }, }; -nsSVGEnumMapping nsSVGMarkerElement::sUnitsMap[] = { +nsSVGEnumMapping SVGMarkerElement::sUnitsMap[] = { {&nsGkAtoms::strokeWidth, nsIDOMSVGMarkerElement::SVG_MARKERUNITS_STROKEWIDTH}, {&nsGkAtoms::userSpaceOnUse, nsIDOMSVGMarkerElement::SVG_MARKERUNITS_USERSPACEONUSE}, {nullptr, 0} }; -nsSVGElement::EnumInfo nsSVGMarkerElement::sEnumInfo[1] = +nsSVGElement::EnumInfo SVGMarkerElement::sEnumInfo[1] = { { &nsGkAtoms::markerUnits, sUnitsMap, @@ -40,13 +44,11 @@ nsSVGElement::EnumInfo nsSVGMarkerElement::sEnumInfo[1] = } }; -nsSVGElement::AngleInfo nsSVGMarkerElement::sAngleInfo[1] = +nsSVGElement::AngleInfo SVGMarkerElement::sAngleInfo[1] = { { &nsGkAtoms::orient, 0, SVG_ANGLETYPE_UNSPECIFIED } }; -NS_IMPL_NS_NEW_SVG_ELEMENT(Marker) - //---------------------------------------------------------------------- // nsISupports methods @@ -61,17 +63,15 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsSVGOrientType::DOMAnimatedEnum) NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGAnimatedEnumeration) NS_INTERFACE_MAP_END -NS_IMPL_ADDREF_INHERITED(nsSVGMarkerElement,nsSVGMarkerElementBase) -NS_IMPL_RELEASE_INHERITED(nsSVGMarkerElement,nsSVGMarkerElementBase) +NS_IMPL_ADDREF_INHERITED(SVGMarkerElement,SVGMarkerElementBase) +NS_IMPL_RELEASE_INHERITED(SVGMarkerElement,SVGMarkerElementBase) -DOMCI_NODE_DATA(SVGMarkerElement, nsSVGMarkerElement) - -NS_INTERFACE_TABLE_HEAD(nsSVGMarkerElement) - NS_NODE_INTERFACE_TABLE5(nsSVGMarkerElement, nsIDOMNode, nsIDOMElement, +NS_INTERFACE_TABLE_HEAD(SVGMarkerElement) + NS_NODE_INTERFACE_TABLE5(SVGMarkerElement, nsIDOMNode, nsIDOMElement, nsIDOMSVGElement, nsIDOMSVGFitToViewBox, nsIDOMSVGMarkerElement) NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGMarkerElement) -NS_INTERFACE_MAP_END_INHERITING(nsSVGMarkerElementBase) +NS_INTERFACE_MAP_END_INHERITING(SVGMarkerElementBase) //---------------------------------------------------------------------- // Implementation @@ -105,29 +105,29 @@ nsSVGOrientType::ToDOMAnimatedEnum(nsIDOMSVGAnimatedEnumeration **aResult, return NS_OK; } -nsSVGMarkerElement::nsSVGMarkerElement(already_AddRefed aNodeInfo) - : nsSVGMarkerElementBase(aNodeInfo), mCoordCtx(nullptr) +SVGMarkerElement::SVGMarkerElement(already_AddRefed aNodeInfo) + : SVGMarkerElementBase(aNodeInfo), mCoordCtx(nullptr) { } //---------------------------------------------------------------------- // nsIDOMNode methods -NS_IMPL_ELEMENT_CLONE_WITH_INIT(nsSVGMarkerElement) +NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGMarkerElement) //---------------------------------------------------------------------- // nsIDOMSVGFitToViewBox methods /* readonly attribute nsIDOMSVGAnimatedRect viewBox; */ - NS_IMETHODIMP nsSVGMarkerElement::GetViewBox(nsIDOMSVGAnimatedRect * *aViewBox) + NS_IMETHODIMP SVGMarkerElement::GetViewBox(nsIDOMSVGAnimatedRect * *aViewBox) { return mViewBox.ToDOMAnimatedRect(aViewBox, this); } /* readonly attribute SVGPreserveAspectRatio preserveAspectRatio; */ NS_IMETHODIMP -nsSVGMarkerElement::GetPreserveAspectRatio(nsISupports - **aPreserveAspectRatio) +SVGMarkerElement::GetPreserveAspectRatio(nsISupports + **aPreserveAspectRatio) { nsRefPtr ratio; mPreserveAspectRatio.ToDOMAnimatedPreserveAspectRatio(getter_AddRefs(ratio), this); @@ -139,49 +139,49 @@ nsSVGMarkerElement::GetPreserveAspectRatio(nsISupports // nsIDOMSVGMarkerElement methods /* readonly attribute nsIDOMSVGAnimatedLength refX; */ -NS_IMETHODIMP nsSVGMarkerElement::GetRefX(nsIDOMSVGAnimatedLength * *aRefX) +NS_IMETHODIMP SVGMarkerElement::GetRefX(nsIDOMSVGAnimatedLength * *aRefX) { return mLengthAttributes[REFX].ToDOMAnimatedLength(aRefX, this); } /* readonly attribute nsIDOMSVGAnimatedLength refY; */ -NS_IMETHODIMP nsSVGMarkerElement::GetRefY(nsIDOMSVGAnimatedLength * *aRefY) +NS_IMETHODIMP SVGMarkerElement::GetRefY(nsIDOMSVGAnimatedLength * *aRefY) { return mLengthAttributes[REFY].ToDOMAnimatedLength(aRefY, this); } /* readonly attribute nsIDOMSVGAnimatedEnumeration markerUnits; */ -NS_IMETHODIMP nsSVGMarkerElement::GetMarkerUnits(nsIDOMSVGAnimatedEnumeration * *aMarkerUnits) +NS_IMETHODIMP SVGMarkerElement::GetMarkerUnits(nsIDOMSVGAnimatedEnumeration * *aMarkerUnits) { return mEnumAttributes[MARKERUNITS].ToDOMAnimatedEnum(aMarkerUnits, this); } /* readonly attribute nsIDOMSVGAnimatedLength markerWidth; */ -NS_IMETHODIMP nsSVGMarkerElement::GetMarkerWidth(nsIDOMSVGAnimatedLength * *aMarkerWidth) +NS_IMETHODIMP SVGMarkerElement::GetMarkerWidth(nsIDOMSVGAnimatedLength * *aMarkerWidth) { return mLengthAttributes[MARKERWIDTH].ToDOMAnimatedLength(aMarkerWidth, this); } /* readonly attribute nsIDOMSVGAnimatedLength markerHeight; */ -NS_IMETHODIMP nsSVGMarkerElement::GetMarkerHeight(nsIDOMSVGAnimatedLength * *aMarkerHeight) +NS_IMETHODIMP SVGMarkerElement::GetMarkerHeight(nsIDOMSVGAnimatedLength * *aMarkerHeight) { return mLengthAttributes[MARKERHEIGHT].ToDOMAnimatedLength(aMarkerHeight, this); } /* readonly attribute nsIDOMSVGAnimatedEnumeration orientType; */ -NS_IMETHODIMP nsSVGMarkerElement::GetOrientType(nsIDOMSVGAnimatedEnumeration * *aOrientType) +NS_IMETHODIMP SVGMarkerElement::GetOrientType(nsIDOMSVGAnimatedEnumeration * *aOrientType) { return mOrientType.ToDOMAnimatedEnum(aOrientType, this); } /* readonly attribute SVGAnimatedAngle orientAngle; */ -NS_IMETHODIMP nsSVGMarkerElement::GetOrientAngle(nsISupports * *aOrientAngle) +NS_IMETHODIMP SVGMarkerElement::GetOrientAngle(nsISupports * *aOrientAngle) { return mAngleAttributes[ORIENT].ToDOMAnimatedAngle(aOrientAngle, this); } /* void setOrientToAuto (); */ -NS_IMETHODIMP nsSVGMarkerElement::SetOrientToAuto() +NS_IMETHODIMP SVGMarkerElement::SetOrientToAuto() { SetAttr(kNameSpaceID_None, nsGkAtoms::orient, nullptr, NS_LITERAL_STRING("auto"), true); @@ -189,7 +189,7 @@ NS_IMETHODIMP nsSVGMarkerElement::SetOrientToAuto() } /* void setOrientToAngle (in SVGAngle angle); */ -NS_IMETHODIMP nsSVGMarkerElement::SetOrientToAngle(nsISupports *aAngle) +NS_IMETHODIMP SVGMarkerElement::SetOrientToAngle(nsISupports *aAngle) { nsCOMPtr angle = do_QueryInterface(aAngle); if (!angle) @@ -206,7 +206,7 @@ NS_IMETHODIMP nsSVGMarkerElement::SetOrientToAngle(nsISupports *aAngle) // nsIContent methods NS_IMETHODIMP_(bool) -nsSVGMarkerElement::IsAttributeMapped(const nsIAtom* name) const +SVGMarkerElement::IsAttributeMapped(const nsIAtom* name) const { static const MappedAttributeEntry* const map[] = { sFEFloodMap, @@ -216,19 +216,22 @@ nsSVGMarkerElement::IsAttributeMapped(const nsIAtom* name) const sLightingEffectsMap, sMarkersMap, sTextContentElementsMap, - sViewportsMap + sViewportsMap, + sColorMap, + sFillStrokeMap, + sGraphicsMap }; return FindAttributeDependence(name, map) || - nsSVGMarkerElementBase::IsAttributeMapped(name); + SVGMarkerElementBase::IsAttributeMapped(name); } //---------------------------------------------------------------------- // nsSVGElement methods bool -nsSVGMarkerElement::GetAttr(int32_t aNameSpaceID, nsIAtom* aName, - nsAString &aResult) const +SVGMarkerElement::GetAttr(int32_t aNameSpaceID, nsIAtom* aName, + nsAString &aResult) const { if (aNameSpaceID == kNameSpaceID_None && aName == nsGkAtoms::orient && @@ -236,13 +239,13 @@ nsSVGMarkerElement::GetAttr(int32_t aNameSpaceID, nsIAtom* aName, aResult.AssignLiteral("auto"); return true; } - return nsSVGMarkerElementBase::GetAttr(aNameSpaceID, aName, aResult); + return SVGMarkerElementBase::GetAttr(aNameSpaceID, aName, aResult); } bool -nsSVGMarkerElement::ParseAttribute(int32_t aNameSpaceID, nsIAtom* aName, - const nsAString& aValue, - nsAttrValue& aResult) +SVGMarkerElement::ParseAttribute(int32_t aNameSpaceID, nsIAtom* aName, + const nsAString& aValue, + nsAttrValue& aResult) { if (aNameSpaceID == kNameSpaceID_None && aName == nsGkAtoms::orient) { if (aValue.EqualsLiteral("auto")) { @@ -252,13 +255,13 @@ nsSVGMarkerElement::ParseAttribute(int32_t aNameSpaceID, nsIAtom* aName, } mOrientType.SetBaseValue(SVG_MARKER_ORIENT_ANGLE); } - return nsSVGMarkerElementBase::ParseAttribute(aNameSpaceID, aName, - aValue, aResult); + return SVGMarkerElementBase::ParseAttribute(aNameSpaceID, aName, + aValue, aResult); } nsresult -nsSVGMarkerElement::UnsetAttr(int32_t aNamespaceID, nsIAtom* aName, - bool aNotify) +SVGMarkerElement::UnsetAttr(int32_t aNamespaceID, nsIAtom* aName, + bool aNotify) { if (aNamespaceID == kNameSpaceID_None) { if (aName == nsGkAtoms::orient) { @@ -273,14 +276,14 @@ nsSVGMarkerElement::UnsetAttr(int32_t aNamespaceID, nsIAtom* aName, // nsSVGElement methods void -nsSVGMarkerElement::SetParentCoordCtxProvider(SVGSVGElement *aContext) +SVGMarkerElement::SetParentCoordCtxProvider(SVGSVGElement *aContext) { mCoordCtx = aContext; mViewBoxToViewportTransform = nullptr; } /* virtual */ bool -nsSVGMarkerElement::HasValidDimensions() const +SVGMarkerElement::HasValidDimensions() const { return (!mLengthAttributes[MARKERWIDTH].IsExplicitlySet() || mLengthAttributes[MARKERWIDTH].GetAnimValInSpecifiedUnits() > 0) && @@ -289,34 +292,34 @@ nsSVGMarkerElement::HasValidDimensions() const } nsSVGElement::LengthAttributesInfo -nsSVGMarkerElement::GetLengthInfo() +SVGMarkerElement::GetLengthInfo() { return LengthAttributesInfo(mLengthAttributes, sLengthInfo, ArrayLength(sLengthInfo)); } nsSVGElement::AngleAttributesInfo -nsSVGMarkerElement::GetAngleInfo() +SVGMarkerElement::GetAngleInfo() { return AngleAttributesInfo(mAngleAttributes, sAngleInfo, ArrayLength(sAngleInfo)); } nsSVGElement::EnumAttributesInfo -nsSVGMarkerElement::GetEnumInfo() +SVGMarkerElement::GetEnumInfo() { return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo)); } nsSVGViewBox * -nsSVGMarkerElement::GetViewBox() +SVGMarkerElement::GetViewBox() { return &mViewBox; } SVGAnimatedPreserveAspectRatio * -nsSVGMarkerElement::GetPreserveAspectRatio() +SVGMarkerElement::GetPreserveAspectRatio() { return &mPreserveAspectRatio; } @@ -325,8 +328,8 @@ nsSVGMarkerElement::GetPreserveAspectRatio() // public helpers gfxMatrix -nsSVGMarkerElement::GetMarkerTransform(float aStrokeWidth, - float aX, float aY, float aAutoAngle) +SVGMarkerElement::GetMarkerTransform(float aStrokeWidth, + float aX, float aY, float aAutoAngle) { gfxFloat scale = mEnumAttributes[MARKERUNITS].GetAnimValue() == SVG_MARKERUNITS_STROKEWIDTH ? aStrokeWidth : 1.0; @@ -341,7 +344,7 @@ nsSVGMarkerElement::GetMarkerTransform(float aStrokeWidth, } nsSVGViewBoxRect -nsSVGMarkerElement::GetViewBoxRect() +SVGMarkerElement::GetViewBoxRect() { if (mViewBox.IsExplicitlySet()) { return mViewBox.GetAnimValue(); @@ -353,7 +356,7 @@ nsSVGMarkerElement::GetViewBoxRect() } gfxMatrix -nsSVGMarkerElement::GetViewBoxTransform() +SVGMarkerElement::GetViewBoxTransform() { if (!mViewBoxToViewportTransform) { float viewportWidth = @@ -386,4 +389,5 @@ nsSVGMarkerElement::GetViewBoxTransform() return *mViewBoxToViewportTransform; } - +} // namespace dom +} // namespace mozilla diff --git a/content/svg/content/src/nsSVGMarkerElement.h b/content/svg/content/src/SVGMarkerElement.h similarity index 82% rename from content/svg/content/src/nsSVGMarkerElement.h rename to content/svg/content/src/SVGMarkerElement.h index 50fc788c40c..a50abd5dc25 100644 --- a/content/svg/content/src/nsSVGMarkerElement.h +++ b/content/svg/content/src/SVGMarkerElement.h @@ -3,8 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef __NS_SVGMARKERELEMENT_H__ -#define __NS_SVGMARKERELEMENT_H__ +#ifndef mozilla_dom_SVGMarkerElement_h +#define mozilla_dom_SVGMarkerElement_h #include "gfxMatrix.h" #include "nsIDOMSVGFitToViewBox.h" @@ -14,9 +14,17 @@ #include "nsSVGLength2.h" #include "nsSVGViewBox.h" #include "SVGAnimatedPreserveAspectRatio.h" -#include "SVGGraphicsElement.h" +#include "nsSVGElement.h" #include "mozilla/Attributes.h" +class nsSVGMarkerFrame; + +nsresult NS_NewSVGMarkerElement(nsIContent **aResult, + already_AddRefed aNodeInfo); + +namespace mozilla { +namespace dom { + class nsSVGOrientType { public: @@ -68,22 +76,20 @@ private: }; }; -typedef mozilla::dom::SVGGraphicsElement nsSVGMarkerElementBase; +typedef nsSVGElement SVGMarkerElementBase; -class nsSVGMarkerElement : public nsSVGMarkerElementBase, - public nsIDOMSVGMarkerElement, - public nsIDOMSVGFitToViewBox +class SVGMarkerElement : public SVGMarkerElementBase, + public nsIDOMSVGMarkerElement, + public nsIDOMSVGFitToViewBox { - friend class nsSVGMarkerFrame; + friend class ::nsSVGMarkerFrame; protected: - friend nsresult NS_NewSVGMarkerElement(nsIContent **aResult, - already_AddRefed aNodeInfo); - nsSVGMarkerElement(already_AddRefed aNodeInfo); + friend nsresult (::NS_NewSVGMarkerElement(nsIContent **aResult, + already_AddRefed aNodeInfo)); + SVGMarkerElement(already_AddRefed aNodeInfo); public: - typedef mozilla::SVGAnimatedPreserveAspectRatio SVGAnimatedPreserveAspectRatio; - // interfaces: NS_DECL_ISUPPORTS_INHERITED @@ -125,7 +131,7 @@ protected: const nsAString& aValue, nsAttrValue& aResult); - void SetParentCoordCtxProvider(mozilla::dom::SVGSVGElement *aContext); + void SetParentCoordCtxProvider(SVGSVGElement *aContext); virtual LengthAttributesInfo GetLengthInfo(); virtual AngleAttributesInfo GetAngleInfo(); @@ -152,8 +158,11 @@ protected: // derived properties (from 'orient') handled separately nsSVGOrientType mOrientType; - mozilla::dom::SVGSVGElement *mCoordCtx; + SVGSVGElement *mCoordCtx; nsAutoPtr mViewBoxToViewportTransform; }; -#endif +} // namespace dom +} // namespace mozilla + +#endif // mozilla_dom_SVGMarkerElement_h diff --git a/content/svg/content/src/nsSVGAngle.cpp b/content/svg/content/src/nsSVGAngle.cpp index a67899b884e..fcc3d043ab5 100644 --- a/content/svg/content/src/nsSVGAngle.cpp +++ b/content/svg/content/src/nsSVGAngle.cpp @@ -9,7 +9,7 @@ #include "prdtoa.h" #include "nsTextFormatter.h" #include "nsSVGAttrTearoffTable.h" -#include "nsSVGMarkerElement.h" +#include "mozilla/dom/SVGMarkerElement.h" #include "nsMathUtils.h" #include "nsContentUtils.h" // NS_ENSURE_FINITE #include "nsSMILValue.h" @@ -366,7 +366,7 @@ nsISMILAttr* nsSVGAngle::ToSMILAttr(nsSVGElement *aSVGElement) { if (aSVGElement->NodeInfo()->Equals(nsGkAtoms::marker, kNameSpaceID_SVG)) { - nsSVGMarkerElement *marker = static_cast(aSVGElement); + SVGMarkerElement *marker = static_cast(aSVGElement); return new SMILOrient(marker->GetOrientType(), this, aSVGElement); } // SMILOrient would not be useful for general angle attributes (also, diff --git a/content/svg/content/src/nsSVGAngle.h b/content/svg/content/src/nsSVGAngle.h index 6a9bd5c887e..5a31fdb46ef 100644 --- a/content/svg/content/src/nsSVGAngle.h +++ b/content/svg/content/src/nsSVGAngle.h @@ -16,7 +16,6 @@ class nsISMILAnimationElement; class nsSMILValue; -class nsSVGOrientType; namespace mozilla { @@ -28,6 +27,7 @@ static const unsigned short SVG_ANGLETYPE_RAD = 3; static const unsigned short SVG_ANGLETYPE_GRAD = 4; namespace dom { +class nsSVGOrientType; class SVGAngle; class SVGAnimatedAngle; } @@ -100,7 +100,7 @@ public: struct SMILOrient MOZ_FINAL : public nsISMILAttr { public: - SMILOrient(nsSVGOrientType* aOrientType, + SMILOrient(mozilla::dom::nsSVGOrientType* aOrientType, nsSVGAngle* aAngle, nsSVGElement* aSVGElement) : mOrientType(aOrientType) @@ -111,7 +111,7 @@ public: // These will stay alive because a nsISMILAttr only lives as long // as the Compositing step, and DOM elements don't get a chance to // die during that. - nsSVGOrientType* mOrientType; + mozilla::dom::nsSVGOrientType* mOrientType; nsSVGAngle* mAngle; nsSVGElement* mSVGElement; diff --git a/layout/svg/nsSVGMarkerFrame.cpp b/layout/svg/nsSVGMarkerFrame.cpp index 065e456a27e..cebe817f433 100644 --- a/layout/svg/nsSVGMarkerFrame.cpp +++ b/layout/svg/nsSVGMarkerFrame.cpp @@ -10,7 +10,7 @@ #include "gfxContext.h" #include "nsRenderingContext.h" #include "nsSVGEffects.h" -#include "nsSVGMarkerElement.h" +#include "mozilla/dom/SVGMarkerElement.h" #include "nsSVGPathGeometryElement.h" #include "nsSVGPathGeometryFrame.h" @@ -80,7 +80,7 @@ nsSVGMarkerFrame::GetCanvasTM(uint32_t aFor) return gfxMatrix(); } - nsSVGMarkerElement *content = static_cast(mContent); + SVGMarkerElement *content = static_cast(mContent); mInUse2 = true; gfxMatrix markedTM = mMarkedFrame->GetCanvasTM(aFor); @@ -106,7 +106,7 @@ nsSVGMarkerFrame::PaintMark(nsRenderingContext *aContext, AutoMarkerReferencer markerRef(this, aMarkedFrame); - nsSVGMarkerElement *marker = static_cast(mContent); + SVGMarkerElement *marker = static_cast(mContent); const nsSVGViewBoxRect viewBox = marker->GetViewBoxRect(); @@ -164,7 +164,7 @@ nsSVGMarkerFrame::GetMarkBBoxContribution(const gfxMatrix &aToBBoxUserspace, AutoMarkerReferencer markerRef(this, aMarkedFrame); - nsSVGMarkerElement *content = static_cast(mContent); + SVGMarkerElement *content = static_cast(mContent); const nsSVGViewBoxRect viewBox = content->GetViewBoxRect(); @@ -204,7 +204,7 @@ nsSVGMarkerFrame::GetMarkBBoxContribution(const gfxMatrix &aToBBoxUserspace, void nsSVGMarkerFrame::SetParentCoordCtxProvider(SVGSVGElement *aContext) { - nsSVGMarkerElement *marker = static_cast(mContent); + SVGMarkerElement *marker = static_cast(mContent); marker->SetParentCoordCtxProvider(aContext); }