Bug 1652395 - Replace 'typedef' by 'using' in SVG and SMIL code r=dholbert

Also removes some mozilla:: where its no longer needed

Note that this patch was created by running

sed -e -i '.bak' 's/typedef ([a-zA-Z0-9:]+) ([a-zA-Z0-9:]+)/using \2 = \1/'

and then fixing up a few cases that didn't work.

Differential Revision: https://phabricator.services.mozilla.com/D83294
This commit is contained in:
longsonr 2020-07-15 10:37:55 +00:00
parent 75c8215499
commit 5b9df67d2e
111 changed files with 274 additions and 295 deletions

View File

@ -111,12 +111,11 @@ class SMILAnimationController final : public SMILTimeContainer,
protected:
~SMILAnimationController();
// Typedefs
typedef nsPtrHashKey<SMILTimeContainer> TimeContainerPtrKey;
typedef nsTHashtable<TimeContainerPtrKey> TimeContainerHashtable;
typedef nsPtrHashKey<mozilla::dom::SVGAnimationElement>
AnimationElementPtrKey;
typedef nsTHashtable<AnimationElementPtrKey> AnimationElementHashtable;
// alias declarations
using TimeContainerPtrKey = nsPtrHashKey<SMILTimeContainer>;
using TimeContainerHashtable = nsTHashtable<TimeContainerPtrKey>;
using AnimationElementPtrKey = nsPtrHashKey<dom::SVGAnimationElement>;
using AnimationElementHashtable = nsTHashtable<AnimationElementPtrKey>;
// Returns mDocument's refresh driver, if it's got one.
nsRefreshDriver* GetRefreshDriver();

View File

@ -257,8 +257,8 @@ class SMILAnimationFunction {
};
protected:
// Typedefs
typedef FallibleTArray<SMILValue> SMILValueArray;
// alias declarations
using SMILValueArray = FallibleTArray<SMILValue>;
// Types
enum SMILCalcMode : uint8_t {

View File

@ -28,9 +28,9 @@ namespace mozilla {
class SMILCompositor : public PLDHashEntryHdr {
public:
typedef SMILTargetIdentifier KeyType;
typedef const KeyType& KeyTypeRef;
typedef const KeyType* KeyTypePointer;
using KeyType = SMILTargetIdentifier;
using KeyTypeRef = const KeyType&;
using KeyTypePointer = const KeyType*;
explicit SMILCompositor(KeyTypePointer aKey)
: mKey(*aKey), mForceCompositing(false) {}

View File

@ -21,7 +21,7 @@ namespace mozilla {
class SMILCompositor;
typedef nsTHashtable<SMILCompositor> SMILCompositorTable;
using SMILCompositorTable = nsTHashtable<SMILCompositor>;
} // namespace mozilla

View File

@ -52,7 +52,7 @@ class SMILInterval {
void FixBegin();
void FixEnd();
typedef nsTArray<RefPtr<SMILInstanceTime> > InstanceTimeList;
using InstanceTimeList = nsTArray<RefPtr<SMILInstanceTime>>;
void AddDependentTime(SMILInstanceTime& aTime);
void RemoveDependentTime(const SMILInstanceTime& aTime);

View File

@ -188,7 +188,7 @@ class SMILTimeContainer {
*/
bool GetNextMilestoneInParentTime(SMILMilestone& aNextMilestone) const;
typedef nsTArray<RefPtr<mozilla::dom::SVGAnimationElement> > AnimElemArray;
using AnimElemArray = nsTArray<RefPtr<dom::SVGAnimationElement>>;
/*
* Removes and returns the timebase elements from the start of the list of

View File

@ -39,9 +39,9 @@ class Event;
class SMILTimeValueSpec {
public:
typedef mozilla::dom::Element Element;
typedef mozilla::dom::Event Event;
typedef mozilla::dom::IDTracker IDTracker;
using Element = dom::Element;
using Event = dom::Event;
using IDTracker = dom::IDTracker;
SMILTimeValueSpec(SMILTimedElement& aOwner, bool aIsBegin);
~SMILTimeValueSpec();

View File

@ -42,7 +42,7 @@ class SMILTimedElement {
SMILTimedElement();
~SMILTimedElement();
typedef mozilla::dom::Element Element;
using Element = dom::Element;
/*
* Sets the owning animation element which this class uses to convert between
@ -344,15 +344,15 @@ class SMILTimedElement {
void Traverse(nsCycleCollectionTraversalCallback* aCallback);
void Unlink();
typedef bool (*RemovalTestFunction)(SMILInstanceTime* aInstance);
using RemovalTestFunction = bool (*)(SMILInstanceTime* aInstance);
protected:
// Typedefs
typedef nsTArray<UniquePtr<SMILTimeValueSpec>> TimeValueSpecList;
typedef nsTArray<RefPtr<SMILInstanceTime>> InstanceTimeList;
typedef nsTArray<UniquePtr<SMILInterval>> IntervalList;
typedef nsPtrHashKey<SMILTimeValueSpec> TimeValueSpecPtrKey;
typedef nsTHashtable<TimeValueSpecPtrKey> TimeValueSpecHashSet;
using TimeValueSpecList = nsTArray<UniquePtr<SMILTimeValueSpec>>;
using InstanceTimeList = nsTArray<RefPtr<SMILInstanceTime>>;
using IntervalList = nsTArray<UniquePtr<SMILInterval>>;
using TimeValueSpecPtrKey = nsPtrHashKey<SMILTimeValueSpec>;
using TimeValueSpecHashSet = nsTHashtable<TimeValueSpecPtrKey>;
// Helper classes
class InstanceTimeComparator {

View File

@ -23,7 +23,7 @@ namespace mozilla {
// For an overview of how this class is related to other SMIL time classes see
// the documentation in SMILTimeValue.h
//
typedef int64_t SMILTime;
using SMILTime = int64_t;
} // namespace mozilla

View File

@ -38,7 +38,7 @@ class SVGElement;
class DOMSVGPoint final : public nsISVGPoint {
friend class AutoChangePointNotifier;
typedef mozilla::gfx::Point Point;
using Point = gfx::Point;
public:
/**

View File

@ -22,7 +22,7 @@ class EventChainPreVisitor;
namespace dom {
typedef SVGGraphicsElement SVGAElementBase;
using SVGAElementBase = SVGGraphicsElement;
class SVGAElement final : public SVGAElementBase, public Link {
protected:

View File

@ -27,7 +27,7 @@ class SVGElement;
class SVGAnimatedBoolean {
public:
typedef mozilla::dom::SVGElement SVGElement;
using SVGElement = dom::SVGElement;
void Init(uint8_t aAttrEnum = 0xff, bool aValue = false) {
mAnimVal = mBaseVal = aValue;
@ -44,7 +44,7 @@ class SVGAnimatedBoolean {
void SetAnimValue(bool aValue, SVGElement* aSVGElement);
bool GetAnimValue() const { return mAnimVal; }
already_AddRefed<mozilla::dom::DOMSVGAnimatedBoolean> ToDOMAnimatedBoolean(
already_AddRefed<dom::DOMSVGAnimatedBoolean> ToDOMAnimatedBoolean(
SVGElement* aSVGElement);
UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement);

View File

@ -24,7 +24,7 @@ class SVGElement;
class SVGAnimatedClass {
public:
typedef mozilla::dom::SVGElement SVGElement;
using SVGElement = dom::SVGElement;
void Init() { mAnimVal = nullptr; }
@ -36,10 +36,10 @@ class SVGAnimatedClass {
void GetAnimValue(nsAString& aResult, const SVGElement* aSVGElement) const;
bool IsAnimated() const { return !!mAnimVal; }
already_AddRefed<mozilla::dom::DOMSVGAnimatedString> ToDOMAnimatedString(
already_AddRefed<dom::DOMSVGAnimatedString> ToDOMAnimatedString(
SVGElement* aSVGElement);
mozilla::UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement);
UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement);
private:
UniquePtr<nsString> mAnimVal;
@ -58,9 +58,8 @@ class SVGAnimatedClass {
// SMILAttr methods
virtual nsresult ValueFromString(
const nsAString& aStr,
const mozilla::dom::SVGAnimationElement* aSrcElement, SMILValue& aValue,
bool& aPreventCachingOfSandwich) const override;
const nsAString& aStr, const dom::SVGAnimationElement* aSrcElement,
SMILValue& aValue, bool& aPreventCachingOfSandwich) const override;
virtual SMILValue GetBaseValue() const override;
virtual void ClearAnimValue() override;
virtual nsresult SetAnimValue(const SMILValue& aValue) override;

View File

@ -34,7 +34,7 @@ struct SVGEnumMapping {
class SVGAnimatedEnumeration {
public:
typedef mozilla::dom::SVGElement SVGElement;
using SVGElement = dom::SVGElement;
void Init(uint8_t aAttrEnum, uint16_t aValue) {
mAnimVal = mBaseVal = uint8_t(aValue);
@ -54,10 +54,10 @@ class SVGAnimatedEnumeration {
uint16_t GetAnimValue() const { return mAnimVal; }
bool IsExplicitlySet() const { return mIsAnimated || mIsBaseSet; }
already_AddRefed<mozilla::dom::DOMSVGAnimatedEnumeration> ToDOMAnimatedEnum(
already_AddRefed<dom::DOMSVGAnimatedEnumeration> ToDOMAnimatedEnum(
SVGElement* aSVGElement);
mozilla::UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement);
UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement);
private:
SVGEnumValue mAnimVal;
@ -71,15 +71,14 @@ class SVGAnimatedEnumeration {
public:
// DOM wrapper class for the (DOM)SVGAnimatedEnumeration interface where the
// wrapped class is SVGAnimatedEnumeration.
struct DOMAnimatedEnum final
: public mozilla::dom::DOMSVGAnimatedEnumeration {
struct DOMAnimatedEnum final : public dom::DOMSVGAnimatedEnumeration {
DOMAnimatedEnum(SVGAnimatedEnumeration* aVal, SVGElement* aSVGElement)
: mozilla::dom::DOMSVGAnimatedEnumeration(aSVGElement), mVal(aVal) {}
: dom::DOMSVGAnimatedEnumeration(aSVGElement), mVal(aVal) {}
virtual ~DOMAnimatedEnum();
SVGAnimatedEnumeration* mVal; // kept alive because it belongs to content
using mozilla::dom::DOMSVGAnimatedEnumeration::SetBaseVal;
using dom::DOMSVGAnimatedEnumeration::SetBaseVal;
virtual uint16_t BaseVal() override { return mVal->GetBaseValue(); }
virtual void SetBaseVal(uint16_t aBaseVal, ErrorResult& aRv) override {
mVal->SetBaseValue(aBaseVal, mSVGElement, aRv);
@ -106,9 +105,8 @@ class SVGAnimatedEnumeration {
// SMILAttr methods
virtual nsresult ValueFromString(
const nsAString& aStr,
const mozilla::dom::SVGAnimationElement* aSrcElement, SMILValue& aValue,
bool& aPreventCachingOfSandwich) const override;
const nsAString& aStr, const dom::SVGAnimationElement* aSrcElement,
SMILValue& aValue, bool& aPreventCachingOfSandwich) const override;
virtual SMILValue GetBaseValue() const override;
virtual void ClearAnimValue() override;
virtual nsresult SetAnimValue(const SMILValue& aValue) override;

View File

@ -25,7 +25,7 @@ class SVGAnimationElement;
class SVGAnimatedInteger {
public:
typedef mozilla::dom::SVGElement SVGElement;
using SVGElement = dom::SVGElement;
void Init(uint8_t aAttrEnum = 0xff, int32_t aValue = 0) {
mAnimVal = mBaseVal = aValue;
@ -50,9 +50,9 @@ class SVGAnimatedInteger {
// usable, and represents the default base value of the attribute.
bool IsExplicitlySet() const { return mIsAnimated || mIsBaseSet; }
already_AddRefed<mozilla::dom::DOMSVGAnimatedInteger> ToDOMAnimatedInteger(
already_AddRefed<dom::DOMSVGAnimatedInteger> ToDOMAnimatedInteger(
SVGElement* aSVGElement);
mozilla::UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement);
UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement);
private:
int32_t mAnimVal;
@ -62,9 +62,9 @@ class SVGAnimatedInteger {
bool mIsBaseSet;
public:
struct DOMAnimatedInteger final : public mozilla::dom::DOMSVGAnimatedInteger {
struct DOMAnimatedInteger final : public dom::DOMSVGAnimatedInteger {
DOMAnimatedInteger(SVGAnimatedInteger* aVal, SVGElement* aSVGElement)
: mozilla::dom::DOMSVGAnimatedInteger(aSVGElement), mVal(aVal) {}
: dom::DOMSVGAnimatedInteger(aSVGElement), mVal(aVal) {}
virtual ~DOMAnimatedInteger();
SVGAnimatedInteger* mVal; // kept alive because it belongs to content
@ -95,9 +95,8 @@ class SVGAnimatedInteger {
// SMILAttr methods
virtual nsresult ValueFromString(
const nsAString& aStr,
const mozilla::dom::SVGAnimationElement* aSrcElement, SMILValue& aValue,
bool& aPreventCachingOfSandwich) const override;
const nsAString& aStr, const dom::SVGAnimationElement* aSrcElement,
SMILValue& aValue, bool& aPreventCachingOfSandwich) const override;
virtual SMILValue GetBaseValue() const override;
virtual void ClearAnimValue() override;
virtual nsresult SetAnimValue(const SMILValue& aValue) override;

View File

@ -25,7 +25,7 @@ class SVGElement;
class SVGAnimatedIntegerPair {
public:
typedef mozilla::dom::SVGElement SVGElement;
using SVGElement = dom::SVGElement;
enum PairIndex { eFirst, eSecond };
@ -59,9 +59,9 @@ class SVGAnimatedIntegerPair {
// usable, and represents the default base value of the attribute.
bool IsExplicitlySet() const { return mIsAnimated || mIsBaseSet; }
already_AddRefed<mozilla::dom::DOMSVGAnimatedInteger> ToDOMAnimatedInteger(
already_AddRefed<dom::DOMSVGAnimatedInteger> ToDOMAnimatedInteger(
PairIndex aIndex, SVGElement* aSVGElement);
mozilla::UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement);
UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement);
private:
int32_t mAnimVal[2];
@ -71,12 +71,10 @@ class SVGAnimatedIntegerPair {
bool mIsBaseSet;
public:
struct DOMAnimatedInteger final : public mozilla::dom::DOMSVGAnimatedInteger {
struct DOMAnimatedInteger final : public dom::DOMSVGAnimatedInteger {
DOMAnimatedInteger(SVGAnimatedIntegerPair* aVal, PairIndex aIndex,
SVGElement* aSVGElement)
: mozilla::dom::DOMSVGAnimatedInteger(aSVGElement),
mVal(aVal),
mIndex(aIndex) {}
: dom::DOMSVGAnimatedInteger(aSVGElement), mVal(aVal), mIndex(aIndex) {}
virtual ~DOMAnimatedInteger();
SVGAnimatedIntegerPair* mVal; // kept alive because it belongs to content
@ -108,9 +106,8 @@ class SVGAnimatedIntegerPair {
// SMILAttr methods
virtual nsresult ValueFromString(
const nsAString& aStr,
const mozilla::dom::SVGAnimationElement* aSrcElement, SMILValue& aValue,
bool& aPreventCachingOfSandwich) const override;
const nsAString& aStr, const dom::SVGAnimationElement* aSrcElement,
SMILValue& aValue, bool& aPreventCachingOfSandwich) const override;
virtual SMILValue GetBaseValue() const override;
virtual void ClearAnimValue() override;
virtual nsresult SetAnimValue(const SMILValue& aValue) override;

View File

@ -50,9 +50,6 @@ class UserSpaceMetricsWithSize : public UserSpaceMetrics {
class SVGElementMetrics : public UserSpaceMetrics {
public:
typedef mozilla::dom::SVGElement SVGElement;
typedef mozilla::dom::SVGViewportElement SVGViewportElement;
explicit SVGElementMetrics(SVGElement* aSVGElement,
SVGViewportElement* aCtx = nullptr);
@ -82,18 +79,17 @@ class NonSVGFrameUserSpaceMetrics : public UserSpaceMetricsWithSize {
} // namespace dom
class SVGAnimatedLength {
friend class mozilla::dom::DOMSVGAnimatedLength;
friend class mozilla::dom::DOMSVGLength;
typedef mozilla::dom::DOMSVGLength DOMSVGLength;
typedef mozilla::dom::SVGElement SVGElement;
typedef mozilla::dom::SVGViewportElement SVGViewportElement;
typedef mozilla::dom::UserSpaceMetrics UserSpaceMetrics;
friend class dom::DOMSVGAnimatedLength;
friend class dom::DOMSVGLength;
using DOMSVGLength = dom::DOMSVGLength;
using SVGElement = dom::SVGElement;
using SVGViewportElement = dom::SVGViewportElement;
using UserSpaceMetrics = dom::UserSpaceMetrics;
public:
void Init(uint8_t aCtxType = mozilla::SVGContentUtils::XY,
uint8_t aAttrEnum = 0xff, float aValue = 0,
uint8_t aUnitType =
mozilla::dom::SVGLength_Binding::SVG_LENGTHTYPE_NUMBER) {
void Init(uint8_t aCtxType = SVGContentUtils::XY, uint8_t aAttrEnum = 0xff,
float aValue = 0,
uint8_t aUnitType = dom::SVGLength_Binding::SVG_LENGTHTYPE_NUMBER) {
mAnimVal = mBaseVal = aValue;
mSpecifiedUnitType = aUnitType;
mAttrEnum = aAttrEnum;
@ -137,7 +133,7 @@ class SVGAnimatedLength {
uint8_t GetSpecifiedUnitType() const { return mSpecifiedUnitType; }
bool IsPercentage() const {
return mSpecifiedUnitType ==
mozilla::dom::SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE;
dom::SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE;
}
float GetAnimValInSpecifiedUnits() const { return mAnimVal; }
float GetBaseValInSpecifiedUnits() const { return mBaseVal; }
@ -154,10 +150,10 @@ class SVGAnimatedLength {
// usable, and represents the default base value of the attribute.
bool IsExplicitlySet() const { return mIsAnimated || mIsBaseSet; }
already_AddRefed<mozilla::dom::DOMSVGAnimatedLength> ToDOMAnimatedLength(
already_AddRefed<dom::DOMSVGAnimatedLength> ToDOMAnimatedLength(
SVGElement* aSVGElement);
mozilla::UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement);
UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement);
private:
float mAnimVal;
@ -208,9 +204,8 @@ class SVGAnimatedLength {
// SMILAttr methods
virtual nsresult ValueFromString(
const nsAString& aStr,
const mozilla::dom::SVGAnimationElement* aSrcElement, SMILValue& aValue,
bool& aPreventCachingOfSandwich) const override;
const nsAString& aStr, const dom::SVGAnimationElement* aSrcElement,
SMILValue& aValue, bool& aPreventCachingOfSandwich) const override;
virtual SMILValue GetBaseValue() const override;
virtual void ClearAnimValue() override;
virtual nsresult SetAnimValue(const SMILValue& aValue) override;

View File

@ -27,9 +27,7 @@ class SVGAnimationElement;
class SVGAnimatedNumber {
public:
typedef mozilla::SMILAttr SMILAttr;
typedef mozilla::SMILValue SMILValue;
typedef mozilla::dom::SVGElement SVGElement;
using SVGElement = dom::SVGElement;
void Init(uint8_t aAttrEnum = 0xff, float aValue = 0) {
mAnimVal = mBaseVal = aValue;
@ -53,9 +51,9 @@ class SVGAnimatedNumber {
// usable, and represents the default base value of the attribute.
bool IsExplicitlySet() const { return mIsAnimated || mIsBaseSet; }
already_AddRefed<mozilla::dom::DOMSVGAnimatedNumber> ToDOMAnimatedNumber(
already_AddRefed<dom::DOMSVGAnimatedNumber> ToDOMAnimatedNumber(
SVGElement* aSVGElement);
mozilla::UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement);
UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement);
private:
float mAnimVal;
@ -67,16 +65,16 @@ class SVGAnimatedNumber {
public:
// DOM wrapper class for the (DOM)SVGAnimatedNumber interface where the
// wrapped class is SVGAnimatedNumber.
struct DOMAnimatedNumber final : public mozilla::dom::DOMSVGAnimatedNumber {
struct DOMAnimatedNumber final : public dom::DOMSVGAnimatedNumber {
DOMAnimatedNumber(SVGAnimatedNumber* aVal, SVGElement* aSVGElement)
: mozilla::dom::DOMSVGAnimatedNumber(aSVGElement), mVal(aVal) {}
: dom::DOMSVGAnimatedNumber(aSVGElement), mVal(aVal) {}
virtual ~DOMAnimatedNumber();
SVGAnimatedNumber* mVal; // kept alive because it belongs to content
virtual float BaseVal() override { return mVal->GetBaseValue(); }
virtual void SetBaseVal(float aValue) override {
MOZ_ASSERT(mozilla::IsFinite(aValue));
MOZ_ASSERT(IsFinite(aValue));
mVal->SetBaseValue(aValue, mSVGElement);
}
@ -101,9 +99,8 @@ class SVGAnimatedNumber {
// SMILAttr methods
virtual nsresult ValueFromString(
const nsAString& aStr,
const mozilla::dom::SVGAnimationElement* aSrcElement, SMILValue& aValue,
bool& aPreventCachingOfSandwich) const override;
const nsAString& aStr, const dom::SVGAnimationElement* aSrcElement,
SMILValue& aValue, bool& aPreventCachingOfSandwich) const override;
virtual SMILValue GetBaseValue() const override;
virtual void ClearAnimValue() override;
virtual nsresult SetAnimValue(const SMILValue& aValue) override;

View File

@ -27,7 +27,7 @@ class SVGElement;
class SVGAnimatedNumberPair {
public:
typedef mozilla::dom::SVGElement SVGElement;
using SVGElement = dom::SVGElement;
enum PairIndex { eFirst, eSecond };
@ -60,9 +60,9 @@ class SVGAnimatedNumberPair {
// usable, and represents the default base value of the attribute.
bool IsExplicitlySet() const { return mIsAnimated || mIsBaseSet; }
already_AddRefed<mozilla::dom::DOMSVGAnimatedNumber> ToDOMAnimatedNumber(
already_AddRefed<dom::DOMSVGAnimatedNumber> ToDOMAnimatedNumber(
PairIndex aIndex, SVGElement* aSVGElement);
mozilla::UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement);
UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement);
private:
float mAnimVal[2];
@ -74,12 +74,10 @@ class SVGAnimatedNumberPair {
public:
// DOM wrapper class for the (DOM)SVGAnimatedNumber interface where the
// wrapped class is SVGAnimatedNumberPair.
struct DOMAnimatedNumber final : public mozilla::dom::DOMSVGAnimatedNumber {
struct DOMAnimatedNumber final : public dom::DOMSVGAnimatedNumber {
DOMAnimatedNumber(SVGAnimatedNumberPair* aVal, PairIndex aIndex,
SVGElement* aSVGElement)
: mozilla::dom::DOMSVGAnimatedNumber(aSVGElement),
mVal(aVal),
mIndex(aIndex) {}
: dom::DOMSVGAnimatedNumber(aSVGElement), mVal(aVal), mIndex(aIndex) {}
virtual ~DOMAnimatedNumber();
SVGAnimatedNumberPair* mVal; // kept alive because it belongs to content
@ -87,7 +85,7 @@ class SVGAnimatedNumberPair {
virtual float BaseVal() override { return mVal->GetBaseValue(mIndex); }
virtual void SetBaseVal(float aValue) override {
MOZ_ASSERT(mozilla::IsFinite(aValue));
MOZ_ASSERT(IsFinite(aValue));
mVal->SetBaseValue(aValue, mIndex, mSVGElement);
}
@ -112,9 +110,8 @@ class SVGAnimatedNumberPair {
// SMILAttr methods
virtual nsresult ValueFromString(
const nsAString& aStr,
const mozilla::dom::SVGAnimationElement* aSrcElement, SMILValue& aValue,
bool& aPreventCachingOfSandwich) const override;
const nsAString& aStr, const dom::SVGAnimationElement* aSrcElement,
SMILValue& aValue, bool& aPreventCachingOfSandwich) const override;
virtual SMILValue GetBaseValue() const override;
virtual void ClearAnimValue() override;
virtual nsresult SetAnimValue(const SMILValue& aValue) override;

View File

@ -32,9 +32,9 @@ class SVGElement;
class SVGAnimatedOrient {
friend class AutoChangeOrientNotifier;
friend class mozilla::dom::DOMSVGAngle;
friend class mozilla::dom::DOMSVGAnimatedAngle;
typedef mozilla::dom::SVGElement SVGElement;
friend class dom::DOMSVGAngle;
friend class dom::DOMSVGAnimatedAngle;
using SVGElement = dom::SVGElement;
public:
void Init() {
@ -110,7 +110,7 @@ class SVGAnimatedOrient {
SVGAnimatedOrient* mVal; // kept alive because it belongs to content
using mozilla::dom::DOMSVGAnimatedEnumeration::SetBaseVal;
using dom::DOMSVGAnimatedEnumeration::SetBaseVal;
uint16_t BaseVal() override { return Sanitize(mVal->mBaseType); }
void SetBaseVal(uint16_t aBaseVal, ErrorResult& aRv) override {
mVal->SetBaseType(aBaseVal, mSVGElement, aRv);

View File

@ -69,7 +69,7 @@ class SVGAnimatedPreserveAspectRatio final {
bool IsAnimated() const { return mIsAnimated; }
bool IsExplicitlySet() const { return mIsAnimated || mIsBaseSet; }
already_AddRefed<mozilla::dom::DOMSVGAnimatedPreserveAspectRatio>
already_AddRefed<dom::DOMSVGAnimatedPreserveAspectRatio>
ToDOMAnimatedPreserveAspectRatio(dom::SVGElement* aSVGElement);
UniquePtr<SMILAttr> ToSMILAttr(dom::SVGElement* aSVGElement);

View File

@ -22,7 +22,7 @@ class SVGElement;
class SVGAnimatedString {
public:
typedef mozilla::dom::SVGElement SVGElement;
using SVGElement = dom::SVGElement;
void Init(uint8_t aAttrEnum) {
mAnimVal = nullptr;
@ -46,10 +46,10 @@ class SVGAnimatedString {
// usable, and represents the default base value of the attribute.
bool IsExplicitlySet() const { return !!mAnimVal || mIsBaseSet; }
already_AddRefed<mozilla::dom::DOMSVGAnimatedString> ToDOMAnimatedString(
already_AddRefed<dom::DOMSVGAnimatedString> ToDOMAnimatedString(
SVGElement* aSVGElement);
mozilla::UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement);
UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement);
private:
UniquePtr<nsString> mAnimVal;
@ -59,12 +59,12 @@ class SVGAnimatedString {
public:
// DOM wrapper class for the (DOM)SVGAnimatedString interface where the
// wrapped class is SVGAnimatedString.
struct DOMAnimatedString final : public mozilla::dom::DOMSVGAnimatedString {
struct DOMAnimatedString final : public dom::DOMSVGAnimatedString {
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMAnimatedString)
DOMAnimatedString(SVGAnimatedString* aVal, SVGElement* aSVGElement)
: mozilla::dom::DOMSVGAnimatedString(aSVGElement), mVal(aVal) {}
: dom::DOMSVGAnimatedString(aSVGElement), mVal(aVal) {}
SVGAnimatedString* mVal; // kept alive because it belongs to content
@ -97,9 +97,8 @@ class SVGAnimatedString {
// SMILAttr methods
virtual nsresult ValueFromString(
const nsAString& aStr,
const mozilla::dom::SVGAnimationElement* aSrcElement, SMILValue& aValue,
bool& aPreventCachingOfSandwich) const override;
const nsAString& aStr, const dom::SVGAnimationElement* aSrcElement,
SMILValue& aValue, bool& aPreventCachingOfSandwich) const override;
virtual SMILValue GetBaseValue() const override;
virtual void ClearAnimValue() override;
virtual nsresult SetAnimValue(const SMILValue& aValue) override;

View File

@ -107,7 +107,7 @@ class SVGAnimatedTransformList {
return mCreatedOrRemovedOnLastChange;
}
mozilla::UniquePtr<SMILAttr> ToSMILAttr(dom::SVGElement* aSVGElement);
UniquePtr<SMILAttr> ToSMILAttr(dom::SVGElement* aSVGElement);
private:
// mAnimVal is a pointer to allow us to determine if we're being animated or

View File

@ -40,7 +40,7 @@ struct SVGViewBox {
class SVGAnimatedViewBox {
public:
typedef mozilla::dom::SVGElement SVGElement;
using SVGElement = dom::SVGElement;
void Init();
@ -76,14 +76,14 @@ class SVGAnimatedViewBox {
bool aDoSetAttr);
void GetBaseValueString(nsAString& aValue) const;
already_AddRefed<mozilla::dom::SVGAnimatedRect> ToSVGAnimatedRect(
already_AddRefed<dom::SVGAnimatedRect> ToSVGAnimatedRect(
SVGElement* aSVGElement);
already_AddRefed<dom::SVGRect> ToDOMBaseVal(SVGElement* aSVGElement);
already_AddRefed<dom::SVGRect> ToDOMAnimVal(SVGElement* aSVGElement);
mozilla::UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement);
UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement);
private:
SVGViewBox mBaseVal;
@ -104,15 +104,14 @@ class SVGAnimatedViewBox {
// SMILAttr methods
virtual nsresult ValueFromString(
const nsAString& aStr,
const mozilla::dom::SVGAnimationElement* aSrcElement, SMILValue& aValue,
bool& aPreventCachingOfSandwich) const override;
const nsAString& aStr, const dom::SVGAnimationElement* aSrcElement,
SMILValue& aValue, bool& aPreventCachingOfSandwich) const override;
virtual SMILValue GetBaseValue() const override;
virtual void ClearAnimValue() override;
virtual nsresult SetAnimValue(const SMILValue& aValue) override;
};
static SVGAttrTearoffTable<SVGAnimatedViewBox, mozilla::dom::SVGAnimatedRect>
static SVGAttrTearoffTable<SVGAnimatedViewBox, dom::SVGAnimatedRect>
sSVGAnimatedRectTearoffTable;
};

View File

@ -16,7 +16,7 @@
namespace mozilla {
namespace dom {
typedef SVGElement SVGAnimationElementBase;
using SVGAnimationElementBase = SVGElement;
class SVGAnimationElement : public SVGAnimationElementBase, public SVGTests {
protected:

View File

@ -19,7 +19,7 @@ class ComputedStyle;
namespace dom {
typedef SVGGeometryElement SVGCircleElementBase;
using SVGCircleElementBase = SVGGeometryElement;
class SVGCircleElement final : public SVGCircleElementBase {
protected:

View File

@ -18,7 +18,7 @@ class SVGClipPathFrame;
namespace dom {
typedef SVGTransformableElement SVGClipPathElementBase;
using SVGClipPathElementBase = SVGTransformableElement;
class SVGClipPathElement final : public SVGClipPathElementBase {
friend class mozilla::SVGClipPathFrame;

View File

@ -25,7 +25,7 @@ namespace dom {
class DOMSVGAnimatedNumberList;
typedef SVGFEUnstyledElement SVGComponentTransferFunctionElementBase;
using SVGComponentTransferFunctionElementBase = SVGFEUnstyledElement;
class SVGComponentTransferFunctionElement
: public SVGComponentTransferFunctionElementBase {
@ -37,7 +37,7 @@ class SVGComponentTransferFunctionElement
virtual ~SVGComponentTransferFunctionElement() = default;
public:
typedef gfx::ComponentTransferAttributes ComponentTransferAttributes;
using ComponentTransferAttributes = gfx::ComponentTransferAttributes;
// interfaces:
NS_DECLARE_STATIC_IID_ACCESSOR(

View File

@ -75,10 +75,10 @@ enum SVGTransformTypes {
*/
class SVGContentUtils {
public:
typedef mozilla::gfx::Float Float;
typedef mozilla::gfx::Matrix Matrix;
typedef mozilla::gfx::Rect Rect;
typedef mozilla::gfx::StrokeOptions StrokeOptions;
using Float = gfx::Float;
using Matrix = gfx::Matrix;
using Rect = gfx::Rect;
using StrokeOptions = gfx::StrokeOptions;
/*
* Get the outer SVG element of an nsIContent

View File

@ -16,7 +16,7 @@ nsresult NS_NewSVGDescElement(
namespace mozilla {
namespace dom {
typedef SVGElement SVGDescElementBase;
using SVGDescElementBase = SVGElement;
class SVGDescElement final : public SVGDescElementBase {
protected:

View File

@ -62,7 +62,7 @@ class DOMSVGStringList;
class SVGSVGElement;
class SVGViewportElement;
typedef nsStyledElement SVGElementBase;
using SVGElementBase = nsStyledElement;
class SVGElement : public SVGElementBase // nsIContent
{

View File

@ -19,7 +19,7 @@ class ComputedStyle;
namespace dom {
typedef SVGGeometryElement SVGEllipseElementBase;
using SVGEllipseElementBase = SVGGeometryElement;
class SVGEllipseElement final : public SVGEllipseElementBase {
protected:

View File

@ -15,7 +15,7 @@ nsresult NS_NewSVGFEBlendElement(
namespace mozilla {
namespace dom {
typedef SVGFE SVGFEBlendElementBase;
using SVGFEBlendElementBase = SVGFE;
class SVGFEBlendElement : public SVGFEBlendElementBase {
friend nsresult(::NS_NewSVGFEBlendElement(

View File

@ -19,7 +19,7 @@ namespace dom {
class DOMSVGAnimatedNumberList;
typedef SVGFE SVGFEColorMatrixElementBase;
using SVGFEColorMatrixElementBase = SVGFE;
class SVGFEColorMatrixElement : public SVGFEColorMatrixElementBase {
friend nsresult(::NS_NewSVGFEColorMatrixElement(

View File

@ -15,7 +15,7 @@ nsresult NS_NewSVGFEComponentTransferElement(
namespace mozilla {
namespace dom {
typedef SVGFE SVGFEComponentTransferElementBase;
using SVGFEComponentTransferElementBase = SVGFE;
class SVGFEComponentTransferElement : public SVGFEComponentTransferElementBase {
friend nsresult(::NS_NewSVGFEComponentTransferElement(

View File

@ -17,7 +17,7 @@ nsresult NS_NewSVGFECompositeElement(
namespace mozilla {
namespace dom {
typedef SVGFE SVGFECompositeElementBase;
using SVGFECompositeElementBase = SVGFE;
class SVGFECompositeElement : public SVGFECompositeElementBase {
friend nsresult(::NS_NewSVGFECompositeElement(

View File

@ -26,7 +26,7 @@ namespace dom {
class DOMSVGAnimatedNumberList;
class DOMSVGAnimatedBoolean;
typedef SVGFE SVGFEConvolveMatrixElementBase;
using SVGFEConvolveMatrixElementBase = SVGFE;
class SVGFEConvolveMatrixElement : public SVGFEConvolveMatrixElementBase {
friend nsresult(::NS_NewSVGFEConvolveMatrixElement(

View File

@ -15,7 +15,7 @@ nsresult NS_NewSVGFEDiffuseLightingElement(
namespace mozilla {
namespace dom {
typedef SVGFELightingElement SVGFEDiffuseLightingElementBase;
using SVGFEDiffuseLightingElementBase = SVGFELightingElement;
class SVGFEDiffuseLightingElement : public SVGFEDiffuseLightingElementBase {
friend nsresult(::NS_NewSVGFEDiffuseLightingElement(

View File

@ -16,7 +16,7 @@ nsresult NS_NewSVGFEDisplacementMapElement(
namespace mozilla {
namespace dom {
typedef SVGFE SVGFEDisplacementMapElementBase;
using SVGFEDisplacementMapElementBase = SVGFE;
class SVGFEDisplacementMapElement : public SVGFEDisplacementMapElementBase {
protected:

View File

@ -16,7 +16,7 @@ nsresult NS_NewSVGFEDistantLightElement(
namespace mozilla {
namespace dom {
typedef SVGFELightElement SVGFEDistantLightElementBase;
using SVGFEDistantLightElementBase = SVGFELightElement;
class SVGFEDistantLightElement : public SVGFEDistantLightElementBase {
friend nsresult(::NS_NewSVGFEDistantLightElement(

View File

@ -18,7 +18,7 @@ nsresult NS_NewSVGFEDropShadowElement(
namespace mozilla {
namespace dom {
typedef SVGFE SVGFEDropShadowElementBase;
using SVGFEDropShadowElementBase = SVGFE;
class SVGFEDropShadowElement : public SVGFEDropShadowElementBase {
friend nsresult(::NS_NewSVGFEDropShadowElement(

View File

@ -15,7 +15,7 @@ nsresult NS_NewSVGFEFloodElement(
namespace mozilla {
namespace dom {
typedef SVGFE SVGFEFloodElementBase;
using SVGFEFloodElementBase = SVGFE;
class SVGFEFloodElement : public SVGFEFloodElementBase {
friend nsresult(::NS_NewSVGFEFloodElement(

View File

@ -17,7 +17,7 @@ nsresult NS_NewSVGFEGaussianBlurElement(
namespace mozilla {
namespace dom {
typedef SVGFE SVGFEGaussianBlurElementBase;
using SVGFEGaussianBlurElementBase = SVGFE;
class SVGFEGaussianBlurElement : public SVGFEGaussianBlurElementBase {
friend nsresult(::NS_NewSVGFEGaussianBlurElement(

View File

@ -18,7 +18,7 @@ class SVGFEImageFrame;
namespace dom {
typedef SVGFE SVGFEImageElementBase;
using SVGFEImageElementBase = SVGFE;
class SVGFEImageElement final : public SVGFEImageElementBase,
public nsImageLoadingContent {

View File

@ -15,7 +15,7 @@ nsresult NS_NewSVGFEMergeElement(
namespace mozilla {
namespace dom {
typedef SVGFE SVGFEMergeElementBase;
using SVGFEMergeElementBase = SVGFE;
class SVGFEMergeElement : public SVGFEMergeElementBase {
friend nsresult(::NS_NewSVGFEMergeElement(

View File

@ -15,7 +15,7 @@ nsresult NS_NewSVGFEMergeNodeElement(
namespace mozilla {
namespace dom {
typedef SVGFEUnstyledElement SVGFEMergeNodeElementBase;
using SVGFEMergeNodeElementBase = SVGFEUnstyledElement;
class SVGFEMergeNodeElement : public SVGFEMergeNodeElementBase {
friend nsresult(::NS_NewSVGFEMergeNodeElement(

View File

@ -18,7 +18,7 @@ nsresult NS_NewSVGFEMorphologyElement(
namespace mozilla {
namespace dom {
typedef SVGFE SVGFEMorphologyElementBase;
using SVGFEMorphologyElementBase = SVGFE;
class SVGFEMorphologyElement : public SVGFEMorphologyElementBase {
friend nsresult(::NS_NewSVGFEMorphologyElement(

View File

@ -17,7 +17,7 @@ nsresult NS_NewSVGFEOffsetElement(
namespace mozilla {
namespace dom {
typedef SVGFE SVGFEOffsetElementBase;
using SVGFEOffsetElementBase = SVGFE;
class SVGFEOffsetElement : public SVGFEOffsetElementBase {
friend nsresult(::NS_NewSVGFEOffsetElement(

View File

@ -16,7 +16,7 @@ nsresult NS_NewSVGFEPointLightElement(
namespace mozilla {
namespace dom {
typedef SVGFELightElement SVGFEPointLightElementBase;
using SVGFEPointLightElementBase = SVGFELightElement;
class SVGFEPointLightElement : public SVGFEPointLightElementBase {
friend nsresult(::NS_NewSVGFEPointLightElement(

View File

@ -17,7 +17,7 @@ namespace dom {
//---------------------SpecularLighting------------------------
typedef SVGFELightingElement SVGFESpecularLightingElementBase;
using SVGFESpecularLightingElementBase = SVGFELightingElement;
class SVGFESpecularLightingElement : public SVGFESpecularLightingElementBase {
friend nsresult(::NS_NewSVGFESpecularLightingElement(

View File

@ -16,7 +16,7 @@ nsresult NS_NewSVGFESpotLightElement(
namespace mozilla {
namespace dom {
typedef SVGFELightElement SVGFESpotLightElementBase;
using SVGFESpotLightElementBase = SVGFELightElement;
class SVGFESpotLightElement : public SVGFESpotLightElementBase {
friend nsresult(::NS_NewSVGFESpotLightElement(

View File

@ -15,7 +15,7 @@ nsresult NS_NewSVGFETileElement(
namespace mozilla {
namespace dom {
typedef SVGFE SVGFETileElementBase;
using SVGFETileElementBase = SVGFE;
class SVGFETileElement : public SVGFETileElementBase {
friend nsresult(::NS_NewSVGFETileElement(

View File

@ -19,7 +19,7 @@ nsresult NS_NewSVGFETurbulenceElement(
namespace mozilla {
namespace dom {
typedef SVGFE SVGFETurbulenceElementBase;
using SVGFETurbulenceElementBase = SVGFE;
class SVGFETurbulenceElement : public SVGFETurbulenceElementBase {
friend nsresult(::NS_NewSVGFETurbulenceElement(

View File

@ -22,7 +22,7 @@ class SVGFilterInstance;
namespace dom {
class DOMSVGAnimatedLength;
typedef SVGElement SVGFilterElementBase;
using SVGFilterElementBase = SVGElement;
class SVGFilterElement : public SVGFilterElementBase {
friend class mozilla::SVGFilterFrame;

View File

@ -29,7 +29,7 @@ struct SVGStringInfo {
SVGElement* mElement;
};
typedef SVGElement SVGFEBase;
using SVGFEBase = SVGElement;
#define NS_SVG_FE_CID \
{ \
@ -47,18 +47,18 @@ class SVGFE : public SVGFEBase {
friend class mozilla::SVGFilterInstance;
protected:
typedef mozilla::gfx::SourceSurface SourceSurface;
typedef mozilla::gfx::Size Size;
typedef mozilla::gfx::IntRect IntRect;
typedef mozilla::gfx::ColorSpace ColorSpace;
typedef mozilla::gfx::FilterPrimitiveDescription FilterPrimitiveDescription;
using SourceSurface = mozilla::gfx::SourceSurface;
using Size = mozilla::gfx::Size;
using IntRect = mozilla::gfx::IntRect;
using ColorSpace = mozilla::gfx::ColorSpace;
using FilterPrimitiveDescription = mozilla::gfx::FilterPrimitiveDescription;
explicit SVGFE(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
: SVGFEBase(std::move(aNodeInfo)) {}
virtual ~SVGFE() = default;
public:
typedef mozilla::gfx::PrimitiveAttributes PrimitiveAttributes;
using PrimitiveAttributes = mozilla::gfx::PrimitiveAttributes;
ColorSpace GetInputColorSpace(int32_t aInputIndex,
ColorSpace aUnchangedInputColorSpace) {
@ -126,11 +126,11 @@ class SVGFE : public SVGFEBase {
operator nsISupports*() { return static_cast<nsIContent*>(this); }
// WebIDL
already_AddRefed<mozilla::dom::DOMSVGAnimatedLength> X();
already_AddRefed<mozilla::dom::DOMSVGAnimatedLength> Y();
already_AddRefed<mozilla::dom::DOMSVGAnimatedLength> Width();
already_AddRefed<mozilla::dom::DOMSVGAnimatedLength> Height();
already_AddRefed<mozilla::dom::DOMSVGAnimatedString> Result();
already_AddRefed<DOMSVGAnimatedLength> X();
already_AddRefed<DOMSVGAnimatedLength> Y();
already_AddRefed<DOMSVGAnimatedLength> Width();
already_AddRefed<DOMSVGAnimatedLength> Height();
already_AddRefed<DOMSVGAnimatedString> Result();
protected:
virtual bool OperatesOnSRGB(int32_t aInputIndex, bool aInputIsAlreadySRGB) {
@ -155,7 +155,7 @@ class SVGFE : public SVGFEBase {
NS_DEFINE_STATIC_IID_ACCESSOR(SVGFE, NS_SVG_FE_CID)
typedef SVGElement SVGFEUnstyledElementBase;
using SVGFEUnstyledElementBase = SVGElement;
class SVGFEUnstyledElement : public SVGFEUnstyledElementBase {
protected:
@ -175,7 +175,7 @@ class SVGFEUnstyledElement : public SVGFEUnstyledElementBase {
//------------------------------------------------------------
typedef SVGFE SVGFELightingElementBase;
using SVGFELightingElementBase = SVGFE;
class SVGFELightingElement : public SVGFELightingElementBase {
protected:
@ -233,7 +233,7 @@ class SVGFELightingElement : public SVGFELightingElementBase {
static StringInfo sStringInfo[2];
};
typedef SVGFEUnstyledElement SVGFELightElementBase;
using SVGFELightElementBase = SVGFEUnstyledElement;
class SVGFELightElement : public SVGFELightElementBase {
protected:
@ -242,7 +242,7 @@ class SVGFELightElement : public SVGFELightElementBase {
: SVGFELightElementBase(std::move(aNodeInfo)) {}
public:
typedef gfx::PrimitiveAttributes PrimitiveAttributes;
using PrimitiveAttributes = gfx::PrimitiveAttributes;
virtual mozilla::gfx::LightType ComputeLightAttributes(
SVGFilterInstance* aInstance, nsTArray<float>& aFloatAttributes) = 0;

View File

@ -33,20 +33,20 @@ namespace dom {
class DOMSVGAnimatedNumber;
typedef mozilla::dom::SVGGraphicsElement SVGGeometryElementBase;
using SVGGeometryElementBase = mozilla::dom::SVGGraphicsElement;
class SVGGeometryElement : public SVGGeometryElementBase {
protected:
typedef mozilla::gfx::CapStyle CapStyle;
typedef mozilla::gfx::DrawTarget DrawTarget;
typedef mozilla::gfx::FillRule FillRule;
typedef mozilla::gfx::Float Float;
typedef mozilla::gfx::Matrix Matrix;
typedef mozilla::gfx::Path Path;
typedef mozilla::gfx::Point Point;
typedef mozilla::gfx::PathBuilder PathBuilder;
typedef mozilla::gfx::Rect Rect;
typedef mozilla::gfx::StrokeOptions StrokeOptions;
using CapStyle = mozilla::gfx::CapStyle;
using DrawTarget = mozilla::gfx::DrawTarget;
using FillRule = mozilla::gfx::FillRule;
using Float = mozilla::gfx::Float;
using Matrix = mozilla::gfx::Matrix;
using Path = mozilla::gfx::Path;
using Point = mozilla::gfx::Point;
using PathBuilder = mozilla::gfx::PathBuilder;
using Rect = mozilla::gfx::Rect;
using StrokeOptions = mozilla::gfx::StrokeOptions;
public:
explicit SVGGeometryElement(

View File

@ -30,7 +30,7 @@ class DOMSVGAnimatedTransformList;
//--------------------- Gradients------------------------
typedef SVGElement SVGGradientElementBase;
using SVGGradientElementBase = SVGElement;
class SVGGradientElement : public SVGGradientElementBase {
friend class mozilla::SVGGradientFrame;
@ -78,7 +78,7 @@ class SVGGradientElement : public SVGGradientElementBase {
//---------------------Linear Gradients------------------------
typedef SVGGradientElement SVGLinearGradientElementBase;
using SVGLinearGradientElementBase = SVGGradientElement;
class SVGLinearGradientElement : public SVGLinearGradientElementBase {
friend class mozilla::SVGLinearGradientFrame;
@ -111,7 +111,7 @@ class SVGLinearGradientElement : public SVGLinearGradientElementBase {
//-------------------------- Radial Gradients ----------------------------
typedef SVGGradientElement SVGRadialGradientElementBase;
using SVGRadialGradientElementBase = SVGGradientElement;
class SVGRadialGradientElement : public SVGRadialGradientElementBase {
friend class mozilla::SVGRadialGradientFrame;

View File

@ -13,7 +13,7 @@
namespace mozilla {
namespace dom {
typedef SVGTransformableElement SVGGraphicsElementBase;
using SVGGraphicsElementBase = SVGTransformableElement;
class SVGGraphicsElement : public SVGGraphicsElementBase, public SVGTests {
protected:

View File

@ -22,7 +22,7 @@ class SVGImageFrame;
namespace dom {
class DOMSVGAnimatedPreserveAspectRatio;
typedef SVGGeometryElement SVGImageElementBase;
using SVGImageElementBase = SVGGeometryElement;
class SVGImageElement : public SVGImageElementBase,
public nsImageLoadingContent {

View File

@ -16,7 +16,7 @@ nsresult NS_NewSVGLineElement(
namespace mozilla {
namespace dom {
typedef SVGGeometryElement SVGLineElementBase;
using SVGLineElementBase = SVGGeometryElement;
class SVGLineElement final : public SVGLineElementBase {
protected:

View File

@ -19,7 +19,7 @@ namespace mozilla {
namespace dom {
class SVGPathElement;
typedef SVGElement SVGMPathElementBase;
using SVGMPathElementBase = SVGElement;
class SVGMPathElement final : public SVGMPathElementBase,
public nsStubMutationObserver {

View File

@ -32,7 +32,7 @@ namespace dom {
// Non-Exposed Marker Orientation Types
static const uint16_t SVG_MARKER_ORIENT_AUTO_START_REVERSE = 3;
typedef SVGElement SVGMarkerElementBase;
using SVGMarkerElementBase = SVGElement;
class SVGMarkerElement : public SVGMarkerElementBase {
friend class mozilla::SVGMarkerFrame;

View File

@ -21,7 +21,7 @@ namespace dom {
//--------------------- Masks ------------------------
typedef SVGElement SVGMaskElementBase;
using SVGMaskElementBase = SVGElement;
class SVGMaskElement final : public SVGMaskElementBase {
friend class mozilla::SVGMaskFrame;

View File

@ -16,7 +16,7 @@ nsresult NS_NewSVGMetadataElement(
namespace mozilla {
namespace dom {
typedef SVGElement SVGMetadataElementBase;
using SVGMetadataElementBase = SVGElement;
class SVGMetadataElement final : public SVGMetadataElementBase {
protected:

View File

@ -33,7 +33,7 @@ class SVGMPathElement;
// by the <animateMotion> element.
//
class SVGMotionSMILAnimationFunction final : public SMILAnimationFunction {
typedef mozilla::gfx::Path Path;
using Path = mozilla::gfx::Path;
public:
SVGMotionSMILAnimationFunction();

View File

@ -26,9 +26,9 @@ class SVGElement;
}
class SVGMotionSMILPathUtils {
typedef mozilla::gfx::DrawTarget DrawTarget;
typedef mozilla::gfx::Path Path;
typedef mozilla::gfx::PathBuilder PathBuilder;
using DrawTarget = mozilla::gfx::DrawTarget;
using Path = mozilla::gfx::Path;
using PathBuilder = mozilla::gfx::PathBuilder;
public:
// Class to assist in generating a Path, based on

View File

@ -34,7 +34,7 @@ enum RotateType {
* many ways as if there were, for simplicity.
*/
class SVGMotionSMILType : public SMILType {
typedef mozilla::gfx::Path Path;
using Path = mozilla::gfx::Path;
public:
// Singleton for SMILValue objects to hold onto.

View File

@ -87,15 +87,15 @@ class SVGPathData {
// SVGPathDataParser will not keep wrappers in sync, so consumers
// are responsible for that!
typedef gfx::DrawTarget DrawTarget;
typedef gfx::Path Path;
typedef gfx::PathBuilder PathBuilder;
typedef gfx::FillRule FillRule;
typedef gfx::Float Float;
typedef gfx::CapStyle CapStyle;
using DrawTarget = gfx::DrawTarget;
using Path = gfx::Path;
using PathBuilder = gfx::PathBuilder;
using FillRule = gfx::FillRule;
using Float = gfx::Float;
using CapStyle = gfx::CapStyle;
public:
typedef const float* const_iterator;
using const_iterator = const float*;
SVGPathData() = default;
~SVGPathData() = default;

View File

@ -54,7 +54,7 @@ class SVGPathDataParser : public SVGDataParser {
};
class SVGArcConverter {
typedef mozilla::gfx::Point Point;
using Point = mozilla::gfx::Point;
public:
SVGArcConverter(const Point& from, const Point& to, const Point& radii,

View File

@ -22,10 +22,10 @@ namespace dom {
class nsISVGPoint;
typedef SVGGeometryElement SVGPathElementBase;
using SVGPathElementBase = SVGGeometryElement;
class SVGPathElement final : public SVGPathElementBase {
typedef mozilla::gfx::Path Path;
using Path = mozilla::gfx::Path;
protected:
friend nsresult(::NS_NewSVGPathElement(

View File

@ -27,7 +27,7 @@ namespace mozilla {
* last path segment (if any).
*/
struct SVGPathTraversalState {
typedef gfx::Point Point;
using Point = gfx::Point;
enum TraversalMode { eUpdateAll, eUpdateOnlyStartAndCurrentPos };

View File

@ -25,7 +25,7 @@ class SVGPatternFrame;
namespace dom {
class DOMSVGAnimatedTransformList;
typedef SVGElement SVGPatternElementBase;
using SVGPatternElementBase = SVGElement;
class SVGPatternElement final : public SVGPatternElementBase {
friend class mozilla::SVGPatternFrame;

View File

@ -20,7 +20,7 @@ namespace mozilla {
* The DOM wrapper class for this class is DOMSVGPoint.
*/
class SVGPoint {
typedef mozilla::gfx::Point Point;
using Point = mozilla::gfx::Point;
public:
SVGPoint() : mX(0.0f), mY(0.0f) {}

View File

@ -16,7 +16,7 @@ namespace dom {
class DOMSVGPointList;
typedef SVGGeometryElement SVGPolyElementBase;
using SVGPolyElementBase = SVGGeometryElement;
class SVGPolyElement : public SVGPolyElementBase {
protected:

View File

@ -16,7 +16,7 @@ nsresult NS_NewSVGPolygonElement(
namespace mozilla {
namespace dom {
typedef SVGPolyElement SVGPolygonElementBase;
using SVGPolygonElementBase = SVGPolyElement;
class SVGPolygonElement final : public SVGPolygonElementBase {
protected:

View File

@ -15,7 +15,7 @@ nsresult NS_NewSVGPolylineElement(
namespace mozilla {
namespace dom {
typedef SVGPolyElement SVGPolylineElementBase;
using SVGPolylineElementBase = SVGPolyElement;
class SVGPolylineElement final : public SVGPolylineElementBase {
protected:

View File

@ -19,7 +19,7 @@ class ComputedStyle;
namespace dom {
typedef SVGGeometryElement SVGRectElementBase;
using SVGRectElementBase = SVGGeometryElement;
class SVGRectElement final : public SVGRectElementBase {
protected:

View File

@ -69,7 +69,7 @@ class DOMSVGTranslatePoint final : public nsISVGPoint {
~DOMSVGTranslatePoint() = default;
};
typedef SVGViewportElement SVGSVGElementBase;
using SVGSVGElementBase = SVGViewportElement;
class SVGSVGElement final : public SVGSVGElementBase {
friend class mozilla::SVGFragmentIdentifier;

View File

@ -19,7 +19,7 @@ nsresult NS_NewSVGScriptElement(
namespace mozilla {
namespace dom {
typedef SVGElement SVGScriptElementBase;
using SVGScriptElementBase = SVGElement;
class SVGScriptElement final : public SVGScriptElementBase,
public ScriptElement {

View File

@ -16,7 +16,7 @@ nsresult NS_NewSVGStopElement(
namespace mozilla {
namespace dom {
typedef SVGElement SVGStopElementBase;
using SVGStopElementBase = SVGElement;
class SVGStopElement final : public SVGStopElementBase {
protected:

View File

@ -18,7 +18,7 @@ nsresult NS_NewSVGStyleElement(
namespace mozilla {
namespace dom {
typedef SVGElement SVGStyleElementBase;
using SVGStyleElementBase = SVGElement;
class SVGStyleElement final : public SVGStyleElementBase,
public nsStubMutationObserver,

View File

@ -16,7 +16,7 @@ nsresult NS_NewSVGSwitchElement(
namespace mozilla {
namespace dom {
typedef SVGGraphicsElement SVGSwitchElementBase;
using SVGSwitchElementBase = SVGGraphicsElement;
class SVGSwitchElement final : public SVGSwitchElementBase {
protected:

View File

@ -15,7 +15,7 @@ nsresult NS_NewSVGSymbolElement(
namespace mozilla {
namespace dom {
typedef SVGViewportElement SVGSymbolElementBase;
using SVGSymbolElementBase = SVGViewportElement;
class SVGSymbolElement final : public SVGSymbolElementBase {
protected:

View File

@ -15,7 +15,7 @@ nsresult NS_NewSVGTSpanElement(
namespace mozilla {
namespace dom {
typedef SVGTextPositioningElement SVGTSpanElementBase;
using SVGTSpanElementBase = SVGTextPositioningElement;
class SVGTSpanElement final : public SVGTSpanElementBase {
protected:

View File

@ -39,7 +39,7 @@ class SVGTests : public nsISupports {
SVGTests();
friend class dom::DOMSVGStringList;
typedef mozilla::SVGStringList SVGStringList;
using SVGStringList = mozilla::SVGStringList;
/**
* Compare the language name(s) in a systemLanguage attribute to the

View File

@ -22,7 +22,7 @@ struct DOMPointInit;
class nsISVGPoint;
class SVGRect;
typedef SVGGraphicsElement SVGTextContentElementBase;
using SVGTextContentElementBase = SVGGraphicsElement;
class SVGTextContentElement : public SVGTextContentElementBase {
friend class mozilla::SVGTextFrame;

View File

@ -15,7 +15,7 @@ nsresult NS_NewSVGTextElement(
namespace mozilla {
namespace dom {
typedef SVGTextPositioningElement SVGTextElementBase;
using SVGTextElementBase = SVGTextPositioningElement;
class SVGTextElement final : public SVGTextElementBase {
protected:

View File

@ -26,7 +26,7 @@ namespace dom {
static const uint16_t TEXTPATH_SIDETYPE_LEFT = 1;
static const uint16_t TEXTPATH_SIDETYPE_RIGHT = 2;
typedef SVGTextContentElement SVGTextPathElementBase;
using SVGTextPathElementBase = SVGTextContentElement;
class SVGTextPathElement final : public SVGTextPathElementBase {
friend class mozilla::SVGTextFrame;

View File

@ -17,7 +17,7 @@ class SVGAnimatedLengthList;
namespace dom {
class DOMSVGAnimatedLengthList;
class DOMSVGAnimatedNumberList;
typedef SVGTextContentElement SVGTextPositioningElementBase;
using SVGTextPositioningElementBase = SVGTextContentElement;
class SVGTextPositioningElement : public SVGTextPositioningElementBase {
public:

View File

@ -16,7 +16,7 @@ nsresult NS_NewSVGTitleElement(
namespace mozilla {
namespace dom {
typedef SVGElement SVGTitleElementBase;
using SVGTitleElementBase = SVGElement;
class SVGTitleElement final : public SVGTitleElementBase,
public nsStubMutationObserver {

View File

@ -31,7 +31,7 @@ struct URLExtraData;
namespace dom {
typedef SVGGraphicsElement SVGUseElementBase;
using SVGUseElementBase = SVGGraphicsElement;
class SVGUseElement final : public SVGUseElementBase,
public nsStubMutationObserver {

View File

@ -23,7 +23,7 @@ class SVGOuterSVGFrame;
namespace dom {
class SVGViewportElement;
typedef SVGElement SVGViewElementBase;
using SVGViewElementBase = SVGElement;
class SVGViewElement : public SVGViewElementBase {
protected:

View File

@ -19,9 +19,9 @@ class gfxContext;
namespace mozilla {
class MOZ_STACK_CLASS CSSClipPathInstance {
typedef gfx::DrawTarget DrawTarget;
typedef gfx::Path Path;
typedef gfx::Rect Rect;
using DrawTarget = gfx::DrawTarget;
using Path = gfx::Path;
using Rect = gfx::Rect;
public:
static void ApplyBasicShapeOrPathClip(gfxContext& aContext, nsIFrame* aFrame,

View File

@ -23,10 +23,10 @@ namespace mozilla {
* FilterPrimitiveDescription connected to the filter graph.
*/
class CSSFilterInstance {
typedef gfx::sRGBColor sRGBColor;
typedef gfx::FilterPrimitiveDescription FilterPrimitiveDescription;
typedef gfx::IntPoint IntPoint;
typedef gfx::Size Size;
using sRGBColor = gfx::sRGBColor;
using FilterPrimitiveDescription = gfx::FilterPrimitiveDescription;
using IntPoint = gfx::IntPoint;
using Size = gfx::Size;
public:
/**

View File

@ -49,13 +49,13 @@ class UserSpaceMetrics;
* http://www.w3.org/TR/SVG11/filters.html#FilterEffectsRegion
*/
class FilterInstance {
typedef gfx::IntRect IntRect;
typedef gfx::SourceSurface SourceSurface;
typedef gfx::DrawTarget DrawTarget;
typedef gfx::FilterPrimitiveDescription FilterPrimitiveDescription;
typedef gfx::FilterDescription FilterDescription;
typedef dom::UserSpaceMetrics UserSpaceMetrics;
typedef image::imgDrawingParams imgDrawingParams;
using IntRect = gfx::IntRect;
using SourceSurface = gfx::SourceSurface;
using DrawTarget = gfx::DrawTarget;
using FilterPrimitiveDescription = gfx::FilterPrimitiveDescription;
using FilterDescription = gfx::FilterDescription;
using UserSpaceMetrics = dom::UserSpaceMetrics;
using imgDrawingParams = image::imgDrawingParams;
public:
/**

View File

@ -46,7 +46,7 @@ struct imgDrawingParams;
*/
class ISVGDisplayableFrame : public nsQueryFrame {
public:
typedef image::imgDrawingParams imgDrawingParams;
using imgDrawingParams = image::imgDrawingParams;
NS_DECL_QUERYFRAME_TARGET(ISVGDisplayableFrame)

View File

@ -27,9 +27,9 @@ class SVGClipPathFrame final : public SVGContainerFrame {
friend nsIFrame* ::NS_NewSVGClipPathFrame(mozilla::PresShell* aPresShell,
ComputedStyle* aStyle);
typedef gfx::Matrix Matrix;
typedef gfx::SourceSurface SourceSurface;
typedef image::imgDrawingParams imgDrawingParams;
using Matrix = gfx::Matrix;
using SourceSurface = gfx::SourceSurface;
using imgDrawingParams = image::imgDrawingParams;
protected:
explicit SVGClipPathFrame(ComputedStyle* aStyle, nsPresContext* aPresContext)

View File

@ -53,9 +53,9 @@ class SVGDocument;
*/
class SVGContextPaint : public RefCounted<SVGContextPaint> {
protected:
typedef mozilla::gfx::DrawTarget DrawTarget;
typedef mozilla::gfx::Float Float;
typedef mozilla::image::imgDrawingParams imgDrawingParams;
using DrawTarget = mozilla::gfx::DrawTarget;
using Float = mozilla::gfx::Float;
using imgDrawingParams = mozilla::image::imgDrawingParams;
SVGContextPaint() : mDashOffset(0.0f), mStrokeWidth(0.0f) {}
@ -144,7 +144,7 @@ class MOZ_RAII AutoSetRestoreSVGContextPaint {
*/
struct SVGContextPaintImpl : public SVGContextPaint {
protected:
typedef mozilla::gfx::DrawTarget DrawTarget;
using DrawTarget = mozilla::gfx::DrawTarget;
public:
DrawMode Init(const DrawTarget* aDrawTarget, const gfxMatrix& aContextMatrix,
@ -230,7 +230,7 @@ struct SVGContextPaintImpl : public SVGContextPaint {
* support context colors and not paint servers.
*/
class SVGEmbeddingContextPaint : public SVGContextPaint {
typedef gfx::DeviceColor DeviceColor;
using DeviceColor = gfx::DeviceColor;
public:
SVGEmbeddingContextPaint() : mFillOpacity(1.0f), mStrokeOpacity(1.0f) {}

View File

@ -63,12 +63,12 @@ class SVGFilterElement;
* "filter space point" = (20, 20)
*/
class SVGFilterInstance {
typedef gfx::Point3D Point3D;
typedef gfx::IntRect IntRect;
typedef gfx::SourceSurface SourceSurface;
typedef gfx::FilterPrimitiveDescription FilterPrimitiveDescription;
typedef dom::SVGFE SVGFE;
typedef dom::UserSpaceMetrics UserSpaceMetrics;
using Point3D = gfx::Point3D;
using IntRect = gfx::IntRect;
using SourceSurface = gfx::SourceSurface;
using FilterPrimitiveDescription = gfx::FilterPrimitiveDescription;
using SVGFE = dom::SVGFE;
using UserSpaceMetrics = dom::UserSpaceMetrics;
public:
/**

View File

@ -16,7 +16,7 @@ namespace mozilla {
class SVGFilterPaintCallback {
public:
typedef image::imgDrawingParams imgDrawingParams;
using imgDrawingParams = image::imgDrawingParams;
/**
* Paint the frame contents.

Some files were not shown because too many files have changed in this diff Show More