Bug 1516076 - Part 3 rename nsSVGAnimatedTransformList to SVGAnimatedTransformList and move it to the mozilla namespace r=dholbert

--HG--
rename : dom/svg/nsSVGAnimatedTransformList.cpp => dom/svg/SVGAnimatedTransformList.cpp
rename : dom/svg/nsSVGAnimatedTransformList.h => dom/svg/SVGAnimatedTransformList.h
This commit is contained in:
longsonr 2018-12-26 23:46:38 +00:00
parent 9638942d6f
commit cd491fca01
29 changed files with 100 additions and 105 deletions

View File

@ -6,14 +6,14 @@
#include "DOMSVGAnimatedTransformList.h"
#include "DOMSVGTransformList.h"
#include "nsSVGAnimatedTransformList.h"
#include "SVGAnimatedTransformList.h"
#include "nsSVGAttrTearoffTable.h"
#include "mozilla/dom/SVGAnimatedTransformListBinding.h"
namespace mozilla {
namespace dom {
static nsSVGAttrTearoffTable<nsSVGAnimatedTransformList,
static nsSVGAttrTearoffTable<SVGAnimatedTransformList,
DOMSVGAnimatedTransformList>
sSVGAnimatedTransformListTearoffTable;
@ -46,7 +46,7 @@ already_AddRefed<DOMSVGTransformList> DOMSVGAnimatedTransformList::AnimVal() {
}
/* static */ already_AddRefed<DOMSVGAnimatedTransformList>
DOMSVGAnimatedTransformList::GetDOMWrapper(nsSVGAnimatedTransformList* aList,
DOMSVGAnimatedTransformList::GetDOMWrapper(SVGAnimatedTransformList* aList,
SVGElement* aElement) {
RefPtr<DOMSVGAnimatedTransformList> wrapper =
sSVGAnimatedTransformListTearoffTable.GetTearoff(aList);
@ -59,7 +59,7 @@ DOMSVGAnimatedTransformList::GetDOMWrapper(nsSVGAnimatedTransformList* aList,
/* static */ DOMSVGAnimatedTransformList*
DOMSVGAnimatedTransformList::GetDOMWrapperIfExists(
nsSVGAnimatedTransformList* aList) {
SVGAnimatedTransformList* aList) {
return sSVGAnimatedTransformListTearoffTable.GetTearoff(aList);
}
@ -109,11 +109,11 @@ bool DOMSVGAnimatedTransformList::IsAnimating() const {
return InternalAList().IsAnimating();
}
nsSVGAnimatedTransformList& DOMSVGAnimatedTransformList::InternalAList() {
SVGAnimatedTransformList& DOMSVGAnimatedTransformList::InternalAList() {
return *mElement->GetAnimatedTransformList();
}
const nsSVGAnimatedTransformList& DOMSVGAnimatedTransformList::InternalAList()
const SVGAnimatedTransformList& DOMSVGAnimatedTransformList::InternalAList()
const {
return *mElement->GetAnimatedTransformList();
}

View File

@ -17,7 +17,7 @@
namespace mozilla {
class DOMSVGTransformList;
class nsSVGAnimatedTransformList;
class SVGAnimatedTransformList;
namespace dom {
@ -25,7 +25,7 @@ namespace dom {
* Class DOMSVGAnimatedTransformList
*
* This class is used to create the DOM tearoff objects that wrap internal
* nsSVGAnimatedTransformList objects.
* SVGAnimatedTransformList objects.
*
* See the architecture comment in DOMSVGAnimatedLengthList.h (that's
* LENGTH list). The comment for that class largly applies to this one too
@ -48,25 +48,25 @@ class DOMSVGAnimatedTransformList final : public nsWrapperCache {
/**
* Factory method to create and return a DOMSVGAnimatedTransformList wrapper
* for a given internal nsSVGAnimatedTransformList object. The factory takes
* for a given internal SVGAnimatedTransformList object. The factory takes
* care of caching the object that it returns so that the same object can be
* returned for the given nsSVGAnimatedTransformList each time it is
* returned for the given SVGAnimatedTransformList each time it is
* requested. The cached object is only removed from the cache when it is
* destroyed due to there being no more references to it or to any of its
* descendant objects. If that happens, any subsequent call requesting the DOM
* wrapper for the nsSVGAnimatedTransformList will naturally result in a new
* wrapper for the SVGAnimatedTransformList will naturally result in a new
* DOMSVGAnimatedTransformList being returned.
*/
static already_AddRefed<DOMSVGAnimatedTransformList> GetDOMWrapper(
nsSVGAnimatedTransformList* aList, SVGElement* aElement);
SVGAnimatedTransformList* aList, SVGElement* aElement);
/**
* This method returns the DOMSVGAnimatedTransformList wrapper for an internal
* nsSVGAnimatedTransformList object if it currently has a wrapper. If it does
* SVGAnimatedTransformList object if it currently has a wrapper. If it does
* not, then nullptr is returned.
*/
static DOMSVGAnimatedTransformList* GetDOMWrapperIfExists(
nsSVGAnimatedTransformList* aList);
SVGAnimatedTransformList* aList);
/**
* Called by internal code to notify us when we need to sync the length of
@ -108,8 +108,8 @@ class DOMSVGAnimatedTransformList final : public nsWrapperCache {
~DOMSVGAnimatedTransformList();
/// Get a reference to this DOM wrapper object's internal counterpart.
nsSVGAnimatedTransformList& InternalAList();
const nsSVGAnimatedTransformList& InternalAList() const;
SVGAnimatedTransformList& InternalAList();
const SVGAnimatedTransformList& InternalAList() const;
// Weak refs to our DOMSVGTransformList baseVal/animVal objects. These objects
// are friends and take care of clearing these pointers when they die, making

View File

@ -7,7 +7,7 @@
#include "DOMSVGTransformList.h"
#include "mozilla/dom/SVGTransform.h"
#include "mozilla/dom/SVGMatrix.h"
#include "nsSVGAnimatedTransformList.h"
#include "SVGAnimatedTransformList.h"
#include "SVGElement.h"
#include "mozilla/dom/SVGTransformListBinding.h"
#include "nsError.h"
@ -138,7 +138,7 @@ void DOMSVGTransformList::InternalListLengthWillChange(uint32_t aNewLength) {
}
SVGTransformList& DOMSVGTransformList::InternalList() const {
nsSVGAnimatedTransformList* alist = Element()->GetAnimatedTransformList();
SVGAnimatedTransformList* alist = Element()->GetAnimatedTransformList();
return IsAnimValList() && alist->mAnimVal ? *alist->mAnimVal
: alist->mBaseVal;
}

View File

@ -4,7 +4,7 @@
* 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/. */
#include "nsSVGAnimatedTransformList.h"
#include "SVGAnimatedTransformList.h"
#include "mozilla/dom/MutationEventBinding.h"
#include "DOMSVGAnimatedTransformList.h"
@ -21,8 +21,8 @@ using namespace mozilla::dom::SVGTransform_Binding;
namespace mozilla {
nsresult nsSVGAnimatedTransformList::SetBaseValueString(
const nsAString& aValue, SVGElement* aSVGElement) {
nsresult SVGAnimatedTransformList::SetBaseValueString(const nsAString& aValue,
SVGElement* aSVGElement) {
SVGTransformList newBaseValue;
nsresult rv = newBaseValue.SetValueFromString(aValue);
if (NS_FAILED(rv)) {
@ -32,8 +32,8 @@ nsresult nsSVGAnimatedTransformList::SetBaseValueString(
return SetBaseValue(newBaseValue, aSVGElement);
}
nsresult nsSVGAnimatedTransformList::SetBaseValue(
const SVGTransformList& aValue, SVGElement* aSVGElement) {
nsresult SVGAnimatedTransformList::SetBaseValue(const SVGTransformList& aValue,
SVGElement* aSVGElement) {
DOMSVGAnimatedTransformList* domWrapper =
DOMSVGAnimatedTransformList::GetDOMWrapperIfExists(this);
if (domWrapper) {
@ -67,7 +67,7 @@ nsresult nsSVGAnimatedTransformList::SetBaseValue(
return rv;
}
void nsSVGAnimatedTransformList::ClearBaseValue() {
void SVGAnimatedTransformList::ClearBaseValue() {
mRequiresFrameReconstruction = !HasTransform();
DOMSVGAnimatedTransformList* domWrapper =
@ -81,8 +81,8 @@ void nsSVGAnimatedTransformList::ClearBaseValue() {
// Caller notifies
}
nsresult nsSVGAnimatedTransformList::SetAnimValue(
const SVGTransformList& aValue, SVGElement* aElement) {
nsresult SVGAnimatedTransformList::SetAnimValue(const SVGTransformList& aValue,
SVGElement* aElement) {
bool prevSet = HasTransform() || aElement->GetAnimateMotionTransform();
DOMSVGAnimatedTransformList* domWrapper =
DOMSVGAnimatedTransformList::GetDOMWrapperIfExists(this);
@ -125,7 +125,7 @@ nsresult nsSVGAnimatedTransformList::SetAnimValue(
return NS_OK;
}
void nsSVGAnimatedTransformList::ClearAnimValue(SVGElement* aElement) {
void SVGAnimatedTransformList::ClearAnimValue(SVGElement* aElement) {
DOMSVGAnimatedTransformList* domWrapper =
DOMSVGAnimatedTransformList::GetDOMWrapperIfExists(this);
if (domWrapper) {
@ -146,7 +146,7 @@ void nsSVGAnimatedTransformList::ClearAnimValue(SVGElement* aElement) {
aElement->DidAnimateTransformList(modType);
}
bool nsSVGAnimatedTransformList::IsExplicitlySet() const {
bool SVGAnimatedTransformList::IsExplicitlySet() const {
// Like other methods of this name, we need to know when a transform value has
// been explicitly set.
//
@ -161,12 +161,12 @@ bool nsSVGAnimatedTransformList::IsExplicitlySet() const {
return mIsAttrSet || !mBaseVal.IsEmpty() || mAnimVal;
}
UniquePtr<nsISMILAttr> nsSVGAnimatedTransformList::ToSMILAttr(
UniquePtr<nsISMILAttr> SVGAnimatedTransformList::ToSMILAttr(
SVGElement* aSVGElement) {
return MakeUnique<SMILAnimatedTransformList>(this, aSVGElement);
}
nsresult nsSVGAnimatedTransformList::SMILAnimatedTransformList::ValueFromString(
nsresult SVGAnimatedTransformList::SMILAnimatedTransformList::ValueFromString(
const nsAString& aStr, const dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue, bool& aPreventCachingOfSandwich) const {
NS_ENSURE_TRUE(aSrcElement, NS_ERROR_FAILURE);
@ -190,7 +190,7 @@ nsresult nsSVGAnimatedTransformList::SMILAnimatedTransformList::ValueFromString(
return aValue.IsNull() ? NS_ERROR_FAILURE : NS_OK;
}
void nsSVGAnimatedTransformList::SMILAnimatedTransformList::ParseValue(
void SVGAnimatedTransformList::SMILAnimatedTransformList::ParseValue(
const nsAString& aSpec, const nsAtom* aTransformType,
nsSMILValue& aResult) {
MOZ_ASSERT(aResult.IsNull(), "Unexpected type for SMIL value");
@ -240,8 +240,7 @@ void nsSVGAnimatedTransformList::SMILAnimatedTransformList::ParseValue(
aResult = std::move(val);
}
int32_t
nsSVGAnimatedTransformList::SMILAnimatedTransformList::ParseParameterList(
int32_t SVGAnimatedTransformList::SMILAnimatedTransformList::ParseParameterList(
const nsAString& aSpec, float* aVars, int32_t aNVars) {
nsCharSeparatedTokenizerTemplate<nsContentUtils::IsHTMLWhitespace> tokenizer(
aSpec, ',', nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL);
@ -261,8 +260,8 @@ nsSVGAnimatedTransformList::SMILAnimatedTransformList::ParseParameterList(
return numArgsFound;
}
nsSMILValue
nsSVGAnimatedTransformList::SMILAnimatedTransformList::GetBaseValue() const {
nsSMILValue SVGAnimatedTransformList::SMILAnimatedTransformList::GetBaseValue()
const {
// To benefit from Return Value Optimization and avoid copy constructor calls
// due to our use of return-by-value, we must return the exact same object
// from ALL return points. This function must only return THIS variable:
@ -274,7 +273,7 @@ nsSVGAnimatedTransformList::SMILAnimatedTransformList::GetBaseValue() const {
return val;
}
nsresult nsSVGAnimatedTransformList::SMILAnimatedTransformList::SetAnimValue(
nsresult SVGAnimatedTransformList::SMILAnimatedTransformList::SetAnimValue(
const nsSMILValue& aNewAnimValue) {
MOZ_ASSERT(aNewAnimValue.mType == SVGTransformListSMILType::Singleton(),
"Unexpected type to assign animated value");
@ -286,7 +285,7 @@ nsresult nsSVGAnimatedTransformList::SMILAnimatedTransformList::SetAnimValue(
return mVal->SetAnimValue(animVal, mElement);
}
void nsSVGAnimatedTransformList::SMILAnimatedTransformList::ClearAnimValue() {
void SVGAnimatedTransformList::SMILAnimatedTransformList::ClearAnimValue() {
if (mVal->mAnimVal) {
mVal->ClearAnimValue(mElement);
}

View File

@ -25,7 +25,7 @@ class SVGTransform;
} // namespace dom
/**
* Class nsSVGAnimatedTransformList
* Class SVGAnimatedTransformList
*
* This class is very different to the SVG DOM interface of the same name found
* in the SVG specification. This is a lightweight internal class - see
@ -38,13 +38,13 @@ class SVGTransform;
* DOMSVGAnimatedTransformList::InternalBaseValListWillChangeTo) so that their
* consumers don't need to concern themselves with that.
*/
class nsSVGAnimatedTransformList {
class SVGAnimatedTransformList {
// friends so that they can get write access to mBaseVal
friend class dom::SVGTransform;
friend class DOMSVGTransformList;
public:
nsSVGAnimatedTransformList()
SVGAnimatedTransformList()
: mIsAttrSet(false), mRequiresFrameReconstruction(true) {}
/**
@ -123,7 +123,7 @@ class nsSVGAnimatedTransformList {
struct SMILAnimatedTransformList : public nsISMILAttr {
public:
SMILAnimatedTransformList(nsSVGAnimatedTransformList* aVal,
SMILAnimatedTransformList(SVGAnimatedTransformList* aVal,
dom::SVGElement* aSVGElement)
: mVal(aVal), mElement(aSVGElement) {}
@ -144,7 +144,7 @@ class nsSVGAnimatedTransformList {
// 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.
nsSVGAnimatedTransformList* mVal;
SVGAnimatedTransformList* mVal;
dom::SVGElement* mElement;
};
};

View File

@ -25,7 +25,7 @@ class nsStyleCoord;
namespace mozilla {
class ComputedStyle;
class nsSVGAnimatedTransformList;
class SVGAnimatedTransformList;
class SVGAnimatedPreserveAspectRatio;
class SVGContextPaint;
class SVGPreserveAspectRatio;

View File

@ -26,7 +26,7 @@
#include "nsCSSProps.h"
#include "mozilla/EventListenerManager.h"
#include "nsLayoutUtils.h"
#include "nsSVGAnimatedTransformList.h"
#include "SVGAnimatedTransformList.h"
#include "nsSVGLength2.h"
#include "nsSVGNumber2.h"
#include "nsSVGNumberPair.h"
@ -577,8 +577,8 @@ bool SVGElement::ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
// Check for SVGAnimatedTransformList attribute
} else if (GetTransformListAttrName() == aAttribute) {
// The transform attribute is being set, so we must ensure that the
// nsSVGAnimatedTransformList is/has been allocated:
nsSVGAnimatedTransformList* transformList =
// SVGAnimatedTransformList is/has been allocated:
SVGAnimatedTransformList* transformList =
GetAnimatedTransformList(DO_ALLOCATE);
rv = transformList->SetBaseValueString(aValue, this);
if (NS_FAILED(rv)) {
@ -804,7 +804,7 @@ void SVGElement::UnsetAttrInternal(int32_t aNamespaceID, nsAtom* aName,
// Check if this is a transform list attribute going away
if (GetTransformListAttrName() == aName) {
nsSVGAnimatedTransformList* transformList = GetAnimatedTransformList();
SVGAnimatedTransformList* transformList = GetAnimatedTransformList();
if (transformList) {
MaybeSerializeAttrBeforeRemoval(aName, aNotify);
transformList->ClearBaseValue();

View File

@ -53,7 +53,7 @@ class SVGUserUnitList;
class SVGAnimatedPointList;
class SVGAnimatedPathSegList;
class SVGAnimatedPreserveAspectRatio;
class nsSVGAnimatedTransformList;
class SVGAnimatedTransformList;
class SVGStringList;
class DOMSVGStringList;
@ -85,7 +85,7 @@ class SVGElement : public SVGElementBase // nsIContent
typedef mozilla::SVGAnimatedPathSegList SVGAnimatedPathSegList;
typedef mozilla::SVGAnimatedPreserveAspectRatio
SVGAnimatedPreserveAspectRatio;
typedef mozilla::nsSVGAnimatedTransformList nsSVGAnimatedTransformList;
typedef mozilla::SVGAnimatedTransformList SVGAnimatedTransformList;
typedef mozilla::SVGStringList SVGStringList;
// nsISupports
@ -259,18 +259,18 @@ class SVGElement : public SVGElementBase // nsIContent
return nullptr;
}
/**
* Get the nsSVGAnimatedTransformList for this element.
* Get the SVGAnimatedTransformList for this element.
*
* Despite the fact that animated transform lists are used for a variety of
* attributes, no SVG element uses more than one.
*
* It's relatively uncommon for elements to have their transform attribute
* set, so to save memory the nsSVGAnimatedTransformList is not allocated
* set, so to save memory the SVGAnimatedTransformList is not allocated
* until the attribute is set/animated or its DOM wrapper is created. Callers
* that require the nsSVGAnimatedTransformList to be allocated and for this
* that require the SVGAnimatedTransformList to be allocated and for this
* method to return non-null must pass the DO_ALLOCATE flag.
*/
virtual nsSVGAnimatedTransformList* GetAnimatedTransformList(
virtual SVGAnimatedTransformList* GetAnimatedTransformList(
uint32_t aFlags = 0) {
return nullptr;
}

View File

@ -9,7 +9,7 @@
#include "mozilla/dom/SVGSVGElement.h"
#include "mozilla/dom/SVGViewElement.h"
#include "nsContentUtils.h" // for nsCharSeparatedTokenizerTemplate
#include "nsSVGAnimatedTransformList.h"
#include "SVGAnimatedTransformList.h"
#include "nsCharSeparatedTokenizer.h"
namespace mozilla {
@ -88,7 +88,7 @@ class MOZ_RAII AutoSVGViewHandler {
if (mSVGView->mTransforms) {
return false;
}
mSVGView->mTransforms = new nsSVGAnimatedTransformList();
mSVGView->mTransforms = new SVGAnimatedTransformList();
if (NS_FAILED(
mSVGView->mTransforms->SetBaseValueString(aParams, mRoot))) {
return false;

View File

@ -147,10 +147,10 @@ already_AddRefed<SVGAnimatedLength> SVGLinearGradientElement::Y2() {
//----------------------------------------------------------------------
// SVGElement methods
nsSVGAnimatedTransformList* SVGGradientElement::GetAnimatedTransformList(
SVGAnimatedTransformList* SVGGradientElement::GetAnimatedTransformList(
uint32_t aFlags) {
if (!mGradientTransform && (aFlags & DO_ALLOCATE)) {
mGradientTransform = new nsSVGAnimatedTransformList();
mGradientTransform = new SVGAnimatedTransformList();
}
return mGradientTransform;
}

View File

@ -8,7 +8,7 @@
#define __NS_SVGGRADIENTELEMENT_H__
#include "nsAutoPtr.h"
#include "nsSVGAnimatedTransformList.h"
#include "SVGAnimatedTransformList.h"
#include "SVGElement.h"
#include "nsSVGLength2.h"
#include "nsSVGEnum.h"
@ -47,7 +47,7 @@ class SVGGradientElement : public SVGGradientElementBase {
// nsIContent
NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* aAttribute) const override;
virtual nsSVGAnimatedTransformList* GetAnimatedTransformList(
virtual SVGAnimatedTransformList* GetAnimatedTransformList(
uint32_t aFlags = 0) override;
virtual nsStaticAtom* GetTransformListAttrName() const override {
return nsGkAtoms::gradientTransform;
@ -73,7 +73,7 @@ class SVGGradientElement : public SVGGradientElementBase {
static StringInfo sStringInfo[2];
// SVGGradientElement values
nsAutoPtr<nsSVGAnimatedTransformList> mGradientTransform;
nsAutoPtr<SVGAnimatedTransformList> mGradientTransform;
};
//---------------------Linear Gradients------------------------

View File

@ -137,10 +137,10 @@ SVGPatternElement::IsAttributeMapped(const nsAtom* name) const {
//----------------------------------------------------------------------
// SVGElement methods
nsSVGAnimatedTransformList* SVGPatternElement::GetAnimatedTransformList(
SVGAnimatedTransformList* SVGPatternElement::GetAnimatedTransformList(
uint32_t aFlags) {
if (!mPatternTransform && (aFlags & DO_ALLOCATE)) {
mPatternTransform = new nsSVGAnimatedTransformList();
mPatternTransform = new SVGAnimatedTransformList();
}
return mPatternTransform;
}

View File

@ -14,7 +14,7 @@
#include "SVGElement.h"
#include "nsSVGViewBox.h"
#include "SVGAnimatedPreserveAspectRatio.h"
#include "nsSVGAnimatedTransformList.h"
#include "SVGAnimatedTransformList.h"
class nsSVGPatternFrame;
@ -51,7 +51,7 @@ class SVGPatternElement final : public SVGPatternElementBase {
// nsSVGSVGElement methods:
virtual bool HasValidDimensions() const override;
virtual mozilla::nsSVGAnimatedTransformList* GetAnimatedTransformList(
virtual mozilla::SVGAnimatedTransformList* GetAnimatedTransformList(
uint32_t aFlags = 0) override;
virtual nsStaticAtom* GetTransformListAttrName() const override {
return nsGkAtoms::patternTransform;
@ -84,7 +84,7 @@ class SVGPatternElement final : public SVGPatternElementBase {
nsSVGEnum mEnumAttributes[2];
static EnumInfo sEnumInfo[2];
nsAutoPtr<mozilla::nsSVGAnimatedTransformList> mPatternTransform;
nsAutoPtr<mozilla::SVGAnimatedTransformList> mPatternTransform;
enum { HREF, XLINK_HREF };
nsSVGString mStringAttributes[2];

View File

@ -423,7 +423,7 @@ void SVGSVGElement::UnbindFromTree(bool aDeep, bool aNullParent) {
SVGGraphicsElement::UnbindFromTree(aDeep, aNullParent);
}
nsSVGAnimatedTransformList* SVGSVGElement::GetAnimatedTransformList(
SVGAnimatedTransformList* SVGSVGElement::GetAnimatedTransformList(
uint32_t aFlags) {
if (!(aFlags & DO_ALLOCATE) && mSVGView && mSVGView->mTransforms) {
return mSVGView->mTransforms;
@ -662,7 +662,7 @@ const nsSVGViewBox& SVGSVGElement::GetViewBoxInternal() const {
return mViewBox;
}
nsSVGAnimatedTransformList* SVGSVGElement::GetTransformInternal() const {
SVGAnimatedTransformList* SVGSVGElement::GetTransformInternal() const {
return (mSVGView && mSVGView->mTransforms) ? mSVGView->mTransforms
: mTransforms;
}

View File

@ -36,7 +36,7 @@ class SVGView {
nsSVGEnum mZoomAndPan;
nsSVGViewBox mViewBox;
SVGAnimatedPreserveAspectRatio mPreserveAspectRatio;
nsAutoPtr<nsSVGAnimatedTransformList> mTransforms;
nsAutoPtr<SVGAnimatedTransformList> mTransforms;
};
class DOMSVGTranslatePoint final : public nsISVGPoint {
@ -149,7 +149,7 @@ class SVGSVGElement final : public SVGSVGElementBase {
virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
virtual void UnbindFromTree(bool aDeep, bool aNullParent) override;
virtual nsSVGAnimatedTransformList* GetAnimatedTransformList(
virtual SVGAnimatedTransformList* GetAnimatedTransformList(
uint32_t aFlags = 0) override;
// SVGSVGElement methods:
@ -220,7 +220,7 @@ class SVGSVGElement final : public SVGSVGElementBase {
virtual float GetCurrentScale() const override { return mCurrentScale; }
virtual const nsSVGViewBox& GetViewBoxInternal() const override;
virtual nsSVGAnimatedTransformList* GetTransformInternal() const override;
virtual SVGAnimatedTransformList* GetTransformInternal() const override;
virtual EnumAttributesInfo GetEnumInfo() override;

View File

@ -10,7 +10,7 @@
#include "mozilla/dom/SVGMatrix.h"
#include "mozilla/dom/SVGTransformBinding.h"
#include "nsError.h"
#include "nsSVGAnimatedTransformList.h"
#include "SVGAnimatedTransformList.h"
#include "nsSVGAttrTearoffTable.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/FloatingPoint.h"
@ -282,7 +282,7 @@ void SVGTransform::RemovingFromList() {
}
nsSVGTransform& SVGTransform::InternalItem() {
nsSVGAnimatedTransformList* alist = Element()->GetAnimatedTransformList();
SVGAnimatedTransformList* alist = Element()->GetAnimatedTransformList();
return mIsAnimValItem && alist->mAnimVal ? (*alist->mAnimVal)[mListIndex]
: alist->mBaseVal[mListIndex];
}
@ -293,7 +293,7 @@ const nsSVGTransform& SVGTransform::InternalItem() const {
#ifdef DEBUG
bool SVGTransform::IndexIsValid() {
nsSVGAnimatedTransformList* alist = Element()->GetAnimatedTransformList();
SVGAnimatedTransformList* alist = Element()->GetAnimatedTransformList();
return (mIsAnimValItem && mListIndex < alist->GetAnimValue().Length()) ||
(!mIsAnimValItem && mListIndex < alist->GetBaseValue().Length());
}

View File

@ -28,7 +28,7 @@ class SVGTransform;
* The DOM wrapper class for this class is DOMSVGTransformList.
*/
class SVGTransformList {
friend class nsSVGAnimatedTransformList;
friend class SVGAnimatedTransformList;
friend class DOMSVGTransformList;
friend class dom::SVGTransform;

View File

@ -138,10 +138,10 @@ void SVGTransformableElement::SetAnimateMotionTransform(
}
}
nsSVGAnimatedTransformList* SVGTransformableElement::GetAnimatedTransformList(
SVGAnimatedTransformList* SVGTransformableElement::GetAnimatedTransformList(
uint32_t aFlags) {
if (!mTransforms && (aFlags & DO_ALLOCATE)) {
mTransforms = new nsSVGAnimatedTransformList();
mTransforms = new SVGAnimatedTransformList();
}
return mTransforms;
}
@ -241,7 +241,7 @@ already_AddRefed<SVGMatrix> SVGTransformableElement::GetTransformToElement(
/* static */ gfxMatrix SVGTransformableElement::GetUserToParentTransform(
const gfx::Matrix* aAnimateMotionTransform,
const nsSVGAnimatedTransformList* aTransforms) {
const SVGAnimatedTransformList* aTransforms) {
gfxMatrix result;
if (aAnimateMotionTransform) {

View File

@ -9,7 +9,7 @@
#include "mozilla/Attributes.h"
#include "nsAutoPtr.h"
#include "nsSVGAnimatedTransformList.h"
#include "SVGAnimatedTransformList.h"
#include "SVGElement.h"
#include "gfxMatrix.h"
#include "mozilla/gfx/Matrix.h"
@ -58,7 +58,7 @@ class SVGTransformableElement : public SVGElement {
virtual const gfx::Matrix* GetAnimateMotionTransform() const override;
virtual void SetAnimateMotionTransform(const gfx::Matrix* aMatrix) override;
virtual nsSVGAnimatedTransformList* GetAnimatedTransformList(
virtual SVGAnimatedTransformList* GetAnimatedTransformList(
uint32_t aFlags = 0) override;
virtual nsStaticAtom* GetTransformListAttrName() const override {
return nsGkAtoms::transform;
@ -76,9 +76,9 @@ class SVGTransformableElement : public SVGElement {
*/
static gfxMatrix GetUserToParentTransform(
const gfx::Matrix* aAnimateMotionTransform,
const nsSVGAnimatedTransformList* aTransforms);
const SVGAnimatedTransformList* aTransforms);
nsAutoPtr<nsSVGAnimatedTransformList> mTransforms;
nsAutoPtr<SVGAnimatedTransformList> mTransforms;
// XXX maybe move this to property table, to save space on un-animated elems?
nsAutoPtr<gfx::Matrix> mAnimateMotionTransform;

View File

@ -180,7 +180,7 @@ class SVGViewportElement : public SVGGraphicsElement {
virtual SVGAnimatedPreserveAspectRatio* GetPreserveAspectRatio() override;
virtual const nsSVGViewBox& GetViewBoxInternal() const { return mViewBox; }
virtual nsSVGAnimatedTransformList* GetTransformInternal() const {
virtual SVGAnimatedTransformList* GetTransformInternal() const {
return mTransforms;
}
nsSVGViewBox mViewBox;

View File

@ -20,7 +20,6 @@ EXPORTS += [
]
EXPORTS.mozilla.dom += [
'nsSVGAnimatedTransformList.h',
'SVGAElement.h',
'SVGAngle.h',
'SVGAnimatedAngle.h',
@ -124,7 +123,6 @@ UNIFIED_SOURCES += [
'DOMSVGTransformList.cpp',
'nsISVGPoint.cpp',
'nsSVGAngle.cpp',
'nsSVGAnimatedTransformList.cpp',
'nsSVGBoolean.cpp',
'nsSVGClass.cpp',
'nsSVGEnum.cpp',
@ -152,6 +150,7 @@ UNIFIED_SOURCES += [
'SVGAnimatedPreserveAspectRatio.cpp',
'SVGAnimatedRect.cpp',
'SVGAnimatedString.cpp',
'SVGAnimatedTransformList.cpp',
'SVGAnimateElement.cpp',
'SVGAnimateMotionElement.cpp',
'SVGAnimateTransformElement.cpp',

View File

@ -25,7 +25,7 @@
#include "SVGGeometryElement.h"
#include "nsSVGUtils.h"
#include "mozilla/ArrayUtils.h"
#include "nsSVGAnimatedTransformList.h"
#include "SVGAnimatedTransformList.h"
#include "SVGContentUtils.h"
#include "SVGGraphicsElement.h"
@ -215,8 +215,7 @@ bool SVGGeometryFrame::IsSVGTransformed(
}
SVGElement* content = static_cast<SVGElement*>(GetContent());
nsSVGAnimatedTransformList* transformList =
content->GetAnimatedTransformList();
SVGAnimatedTransformList* transformList = content->GetAnimatedTransformList();
if ((transformList && transformList->HasTransform()) ||
content->GetAnimateMotionTransform()) {
if (aOwnTransform) {

View File

@ -14,7 +14,7 @@
#include "SVGObserverUtils.h"
#include "SVGElement.h"
#include "nsSVGUtils.h"
#include "nsSVGAnimatedTransformList.h"
#include "SVGAnimatedTransformList.h"
#include "SVGTextFrame.h"
using namespace mozilla;
@ -209,7 +209,7 @@ bool nsSVGDisplayContainerFrame::IsSVGTransformed(
// mContent could be a XUL element so check for an SVG element before casting
if (mContent->IsSVGElement()) {
SVGElement* content = static_cast<SVGElement*>(GetContent());
nsSVGAnimatedTransformList* transformList =
SVGAnimatedTransformList* transformList =
content->GetAnimatedTransformList();
if ((transformList && transformList->HasTransform()) ||
content->GetAnimateMotionTransform()) {

View File

@ -171,8 +171,7 @@ bool nsSVGForeignObjectFrame::IsSVGTransformed(
}
SVGElement* content = static_cast<SVGElement*>(GetContent());
nsSVGAnimatedTransformList* transformList =
content->GetAnimatedTransformList();
SVGAnimatedTransformList* transformList = content->GetAnimatedTransformList();
if ((transformList && transformList->HasTransform()) ||
content->GetAnimateMotionTransform()) {
if (aOwnTransform) {

View File

@ -17,7 +17,7 @@
#include "mozilla/dom/SVGUnitTypesBinding.h"
#include "nsContentUtils.h"
#include "SVGObserverUtils.h"
#include "nsSVGAnimatedTransformList.h"
#include "SVGAnimatedTransformList.h"
// XXX Tight coupling with content classes ahead!
@ -102,9 +102,9 @@ uint16_t nsSVGGradientFrame::GetSpreadMethod() {
return GetEnumValue(dom::SVGGradientElement::SPREADMETHOD);
}
const nsSVGAnimatedTransformList* nsSVGGradientFrame::GetGradientTransformList(
const SVGAnimatedTransformList* nsSVGGradientFrame::GetGradientTransformList(
nsIContent* aDefault) {
nsSVGAnimatedTransformList* thisTransformList =
SVGAnimatedTransformList* thisTransformList =
static_cast<dom::SVGGradientElement*>(GetContent())
->GetAnimatedTransformList();
@ -148,7 +148,7 @@ gfxMatrix nsSVGGradientFrame::GetGradientTransform(
gfxMatrix(bbox.Width(), 0, 0, bbox.Height(), bbox.X(), bbox.Y());
}
const nsSVGAnimatedTransformList* animTransformList =
const SVGAnimatedTransformList* animTransformList =
GetGradientTransformList(GetContent());
if (!animTransformList) {
return bboxMatrix;

View File

@ -21,7 +21,7 @@ class nsIContent;
class nsIPresShell;
namespace mozilla {
class nsSVGAnimatedTransformList;
class SVGAnimatedTransformList;
namespace dom {
class SVGLinearGradientElement;
@ -65,7 +65,7 @@ class nsSVGGradientFrame : public nsSVGPaintServerFrame {
// Optionally get a stop frame (returns stop index/count)
void GetStopFrames(nsTArray<nsIFrame*>* aStopFrames);
const mozilla::nsSVGAnimatedTransformList* GetGradientTransformList(
const mozilla::SVGAnimatedTransformList* GetGradientTransformList(
nsIContent* aDefault);
// Will be singular for gradientUnits="objectBoundingBox" with an empty bbox.
gfxMatrix GetGradientTransform(nsIFrame* aSource,

View File

@ -714,8 +714,7 @@ bool nsSVGOuterSVGFrame::IsSVGTransformed(Matrix* aOwnTransform,
bool foundTransform = false;
SVGSVGElement* content = static_cast<SVGSVGElement*>(GetContent());
nsSVGAnimatedTransformList* transformList =
content->GetAnimatedTransformList();
SVGAnimatedTransformList* transformList = content->GetAnimatedTransformList();
if ((transformList && transformList->HasTransform()) ||
content->GetAnimateMotionTransform()) {
if (aOwnTransform) {

View File

@ -23,7 +23,7 @@
#include "mozilla/dom/SVGPatternElement.h"
#include "mozilla/dom/SVGUnitTypesBinding.h"
#include "nsSVGUtils.h"
#include "nsSVGAnimatedTransformList.h"
#include "SVGAnimatedTransformList.h"
#include "SVGContentUtils.h"
using namespace mozilla;
@ -436,9 +436,9 @@ uint16_t nsSVGPatternFrame::GetEnumValue(uint32_t aIndex,
.GetAnimValue();
}
nsSVGAnimatedTransformList *nsSVGPatternFrame::GetPatternTransformList(
SVGAnimatedTransformList *nsSVGPatternFrame::GetPatternTransformList(
nsIContent *aDefault) {
nsSVGAnimatedTransformList *thisTransformList =
SVGAnimatedTransformList *thisTransformList =
static_cast<SVGPatternElement *>(GetContent())
->GetAnimatedTransformList();
@ -462,7 +462,7 @@ nsSVGAnimatedTransformList *nsSVGPatternFrame::GetPatternTransformList(
}
gfxMatrix nsSVGPatternFrame::GetPatternTransform() {
nsSVGAnimatedTransformList *animTransformList =
SVGAnimatedTransformList *animTransformList =
GetPatternTransformList(GetContent());
if (!animTransformList) {
return gfxMatrix();

View File

@ -20,8 +20,8 @@ class nsSVGViewBox;
namespace mozilla {
class SVGAnimatedPreserveAspectRatio;
class SVGAnimatedTransformList;
class SVGGeometryFrame;
class nsSVGAnimatedTransformList;
} // namespace mozilla
class nsSVGPatternFrame final : public nsSVGPaintServerFrame {
@ -76,7 +76,7 @@ class nsSVGPatternFrame final : public nsSVGPaintServerFrame {
uint16_t GetEnumValue(uint32_t aIndex) {
return GetEnumValue(aIndex, mContent);
}
mozilla::nsSVGAnimatedTransformList* GetPatternTransformList(
mozilla::SVGAnimatedTransformList* GetPatternTransformList(
nsIContent* aDefault);
gfxMatrix GetPatternTransform();
const nsSVGViewBox& GetViewBox(nsIContent* aDefault);