зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1515187 - Part 4 Rename nsSVGElement to SVGElement and put it in the mozilla:dom namespace r=dholbert
--HG-- rename : dom/svg/nsSVGElement.cpp => dom/svg/SVGElement.cpp rename : dom/svg/nsSVGElement.h => dom/svg/SVGElement.h
This commit is contained in:
Родитель
f561d97124
Коммит
3d04ba9c9e
|
@ -83,7 +83,7 @@
|
|||
#ifdef MOZ_XUL
|
||||
#include "nsXULElement.h"
|
||||
#endif /* MOZ_XUL */
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "nsFrameSelection.h"
|
||||
#ifdef DEBUG
|
||||
#include "nsRange.h"
|
||||
|
@ -213,7 +213,7 @@ nsAtom* nsIContent::DoGetID() const {
|
|||
|
||||
const nsAttrValue* Element::GetSVGAnimatedClass() const {
|
||||
MOZ_ASSERT(MayHaveClass() && IsSVGElement(), "Unexpected call");
|
||||
return static_cast<const nsSVGElement*>(this)->GetAnimatedClassName();
|
||||
return static_cast<const SVGElement*>(this)->GetAnimatedClassName();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -5493,7 +5493,7 @@ already_AddRefed<Attr> nsIDocument::CreateAttributeNS(
|
|||
|
||||
void nsIDocument::ResolveScheduledSVGPresAttrs() {
|
||||
for (auto iter = mLazySVGPresElements.Iter(); !iter.Done(); iter.Next()) {
|
||||
nsSVGElement* svg = iter.Get()->GetKey();
|
||||
SVGElement* svg = iter.Get()->GetKey();
|
||||
svg->UpdateContentDeclarationBlock();
|
||||
}
|
||||
mLazySVGPresElements.Clear();
|
||||
|
|
|
@ -113,7 +113,6 @@ class nsPresContext;
|
|||
class nsRange;
|
||||
class nsSimpleContentList;
|
||||
class nsSMILAnimationController;
|
||||
class nsSVGElement;
|
||||
class nsTextNode;
|
||||
class nsUnblockOnloadEvent;
|
||||
class nsWindowSizes;
|
||||
|
@ -189,6 +188,7 @@ class Selection;
|
|||
class ServiceWorkerDescriptor;
|
||||
class StyleSheetList;
|
||||
class SVGDocument;
|
||||
class SVGElement;
|
||||
class SVGSVGElement;
|
||||
class SVGUseElement;
|
||||
class Touch;
|
||||
|
@ -447,6 +447,7 @@ class nsIDocument : public nsINode,
|
|||
typedef mozilla::FullscreenRequest FullscreenRequest;
|
||||
typedef mozilla::net::ReferrerPolicy ReferrerPolicyEnum;
|
||||
typedef mozilla::dom::Element Element;
|
||||
typedef mozilla::dom::SVGElement SVGElement;
|
||||
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOCUMENT_IID)
|
||||
|
||||
|
@ -1253,13 +1254,13 @@ class nsIDocument : public nsINode,
|
|||
* These are weak pointers, please manually unschedule them when an element
|
||||
* is removed.
|
||||
*/
|
||||
void ScheduleSVGForPresAttrEvaluation(nsSVGElement* aSVG) {
|
||||
void ScheduleSVGForPresAttrEvaluation(SVGElement* aSVG) {
|
||||
mLazySVGPresElements.PutEntry(aSVG);
|
||||
}
|
||||
|
||||
// Unschedule an element scheduled by ScheduleFrameRequestCallback (e.g. for
|
||||
// when it is destroyed)
|
||||
void UnscheduleSVGForPresAttrEvaluation(nsSVGElement* aSVG) {
|
||||
void UnscheduleSVGForPresAttrEvaluation(SVGElement* aSVG) {
|
||||
mLazySVGPresElements.RemoveEntry(aSVG);
|
||||
}
|
||||
|
||||
|
@ -4307,7 +4308,7 @@ class nsIDocument : public nsINode,
|
|||
// We lazily calculate declaration blocks for SVG elements with mapped
|
||||
// attributes in Servo mode. This list contains all elements which need lazy
|
||||
// resolution.
|
||||
nsTHashtable<nsPtrHashKey<nsSVGElement>> mLazySVGPresElements;
|
||||
nsTHashtable<nsPtrHashKey<SVGElement>> mLazySVGPresElements;
|
||||
|
||||
// Restyle root for servo's style system.
|
||||
//
|
||||
|
|
|
@ -794,10 +794,6 @@ DOMInterfaces = {
|
|||
'concrete': False,
|
||||
},
|
||||
|
||||
'SVGElement': {
|
||||
'nativeType': 'nsSVGElement',
|
||||
},
|
||||
|
||||
'SVGFEFuncAElement': {
|
||||
'headerFile': 'mozilla/dom/SVGComponentTransferFunctionElement.h',
|
||||
},
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
var gMappedAttrList =
|
||||
{
|
||||
// NOTE: The list here should match the MappedAttributeEntry arrays in
|
||||
// nsSVGElement.cpp
|
||||
// SVGElement.cpp
|
||||
|
||||
// PresentationAttributes-FillStroke
|
||||
fill: new AdditiveAttribute("fill", "XML", "rect"),
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "DOMSVGAnimatedLengthList.h"
|
||||
#include "DOMSVGLengthList.h"
|
||||
#include "SVGAnimatedLengthList.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsSVGAttrTearoffTable.h"
|
||||
#include "mozilla/dom/SVGAnimatedLengthListBinding.h"
|
||||
|
@ -53,7 +53,7 @@ already_AddRefed<DOMSVGLengthList> DOMSVGAnimatedLengthList::AnimVal() {
|
|||
|
||||
/* static */ already_AddRefed<DOMSVGAnimatedLengthList>
|
||||
DOMSVGAnimatedLengthList::GetDOMWrapper(SVGAnimatedLengthList* aList,
|
||||
nsSVGElement* aElement,
|
||||
dom::SVGElement* aElement,
|
||||
uint8_t aAttrEnum, uint8_t aAxis) {
|
||||
RefPtr<DOMSVGAnimatedLengthList> wrapper =
|
||||
SVGAnimatedLengthListTearoffTable().GetTearoff(aList);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -122,8 +122,8 @@ class DOMSVGAnimatedLengthList final : public nsWrapperCache {
|
|||
* DOMSVGAnimatedLengthList being returned.
|
||||
*/
|
||||
static already_AddRefed<DOMSVGAnimatedLengthList> GetDOMWrapper(
|
||||
SVGAnimatedLengthList* aList, nsSVGElement* aElement, uint8_t aAttrEnum,
|
||||
uint8_t aAxis);
|
||||
SVGAnimatedLengthList* aList, dom::SVGElement* aElement,
|
||||
uint8_t aAttrEnum, uint8_t aAxis);
|
||||
|
||||
/**
|
||||
* This method returns the DOMSVGAnimatedLengthList wrapper for an internal
|
||||
|
@ -155,7 +155,7 @@ class DOMSVGAnimatedLengthList final : public nsWrapperCache {
|
|||
bool IsAnimating() const;
|
||||
|
||||
// WebIDL
|
||||
nsSVGElement* GetParentObject() const { return mElement; }
|
||||
dom::SVGElement* GetParentObject() const { return mElement; }
|
||||
virtual JSObject* WrapObject(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aGivenProto) override;
|
||||
// These aren't weak refs because mBaseVal and mAnimVal are weak
|
||||
|
@ -167,7 +167,7 @@ class DOMSVGAnimatedLengthList final : public nsWrapperCache {
|
|||
* Only our static GetDOMWrapper() factory method may create objects of our
|
||||
* type.
|
||||
*/
|
||||
DOMSVGAnimatedLengthList(nsSVGElement* aElement, uint8_t aAttrEnum,
|
||||
DOMSVGAnimatedLengthList(dom::SVGElement* aElement, uint8_t aAttrEnum,
|
||||
uint8_t aAxis)
|
||||
: mBaseVal(nullptr),
|
||||
mAnimVal(nullptr),
|
||||
|
@ -189,7 +189,7 @@ class DOMSVGAnimatedLengthList final : public nsWrapperCache {
|
|||
|
||||
// Strong ref to our element to keep it alive. We hold this not only for
|
||||
// ourself, but also for our base/animVal and all of their items.
|
||||
RefPtr<nsSVGElement> mElement;
|
||||
RefPtr<dom::SVGElement> mElement;
|
||||
|
||||
uint8_t mAttrEnum;
|
||||
uint8_t mAxis;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "DOMSVGAnimatedNumberList.h"
|
||||
#include "DOMSVGNumberList.h"
|
||||
#include "SVGAnimatedNumberList.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsSVGAttrTearoffTable.h"
|
||||
#include "mozilla/dom/SVGAnimatedNumberListBinding.h"
|
||||
|
@ -59,7 +59,7 @@ already_AddRefed<DOMSVGNumberList> DOMSVGAnimatedNumberList::AnimVal() {
|
|||
|
||||
/* static */ already_AddRefed<DOMSVGAnimatedNumberList>
|
||||
DOMSVGAnimatedNumberList::GetDOMWrapper(SVGAnimatedNumberList* aList,
|
||||
nsSVGElement* aElement,
|
||||
dom::SVGElement* aElement,
|
||||
uint8_t aAttrEnum) {
|
||||
RefPtr<DOMSVGAnimatedNumberList> wrapper =
|
||||
SVGAnimatedNumberListTearoffTable().GetTearoff(aList);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "nsWrapperCache.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
|
@ -54,7 +54,8 @@ class DOMSVGAnimatedNumberList final : public nsISupports,
|
|||
* DOMSVGAnimatedNumberList being returned.
|
||||
*/
|
||||
static already_AddRefed<DOMSVGAnimatedNumberList> GetDOMWrapper(
|
||||
SVGAnimatedNumberList* aList, nsSVGElement* aElement, uint8_t aAttrEnum);
|
||||
SVGAnimatedNumberList* aList, dom::SVGElement* aElement,
|
||||
uint8_t aAttrEnum);
|
||||
|
||||
/**
|
||||
* This method returns the DOMSVGAnimatedNumberList wrapper for an internal
|
||||
|
@ -86,7 +87,7 @@ class DOMSVGAnimatedNumberList final : public nsISupports,
|
|||
bool IsAnimating() const;
|
||||
|
||||
// WebIDL
|
||||
nsSVGElement* GetParentObject() const { return mElement; }
|
||||
dom::SVGElement* GetParentObject() const { return mElement; }
|
||||
virtual JSObject* WrapObject(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aGivenProto) override;
|
||||
// These aren't weak refs because mBaseVal and mAnimVal are weak
|
||||
|
@ -98,7 +99,7 @@ class DOMSVGAnimatedNumberList final : public nsISupports,
|
|||
* Only our static GetDOMWrapper() factory method may create objects of our
|
||||
* type.
|
||||
*/
|
||||
DOMSVGAnimatedNumberList(nsSVGElement* aElement, uint8_t aAttrEnum)
|
||||
DOMSVGAnimatedNumberList(dom::SVGElement* aElement, uint8_t aAttrEnum)
|
||||
: mBaseVal(nullptr),
|
||||
mAnimVal(nullptr),
|
||||
mElement(aElement),
|
||||
|
@ -118,7 +119,7 @@ class DOMSVGAnimatedNumberList final : public nsISupports,
|
|||
|
||||
// Strong ref to our element to keep it alive. We hold this not only for
|
||||
// ourself, but also for our base/animVal and all of their items.
|
||||
RefPtr<nsSVGElement> mElement;
|
||||
RefPtr<dom::SVGElement> mElement;
|
||||
|
||||
uint8_t mAttrEnum;
|
||||
};
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "DOMSVGAnimatedLengthList.h"
|
||||
#include "SVGLength.h"
|
||||
#include "SVGAnimatedLengthList.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "nsSVGLength2.h"
|
||||
#include "nsError.h"
|
||||
#include "nsMathUtils.h"
|
||||
|
@ -116,7 +116,7 @@ DOMSVGLength::DOMSVGLength()
|
|||
mValue(0.0f),
|
||||
mVal(nullptr) {}
|
||||
|
||||
DOMSVGLength::DOMSVGLength(nsSVGLength2* aVal, nsSVGElement* aSVGElement,
|
||||
DOMSVGLength::DOMSVGLength(nsSVGLength2* aVal, SVGElement* aSVGElement,
|
||||
bool aAnimVal)
|
||||
: mList(nullptr),
|
||||
mListIndex(0),
|
||||
|
@ -148,8 +148,9 @@ void DOMSVGLength::CleanupWeakRefs() {
|
|||
|
||||
DOMSVGLength::~DOMSVGLength() { CleanupWeakRefs(); }
|
||||
|
||||
already_AddRefed<DOMSVGLength> DOMSVGLength::GetTearOff(
|
||||
nsSVGLength2* aVal, nsSVGElement* aSVGElement, bool aAnimVal) {
|
||||
already_AddRefed<DOMSVGLength> DOMSVGLength::GetTearOff(nsSVGLength2* aVal,
|
||||
SVGElement* aSVGElement,
|
||||
bool aAnimVal) {
|
||||
auto& table =
|
||||
aAnimVal ? sAnimSVGLengthTearOffTable : sBaseSVGLengthTearOffTable;
|
||||
RefPtr<DOMSVGLength> domLength = table.GetTearoff(aVal);
|
||||
|
|
|
@ -15,8 +15,6 @@
|
|||
#include "mozilla/Attributes.h"
|
||||
#include "nsWrapperCache.h"
|
||||
|
||||
class nsSVGElement;
|
||||
|
||||
// We make DOMSVGLength a pseudo-interface to allow us to QI to it in order to
|
||||
// check that the objects that scripts pass to DOMSVGLengthList methods are our
|
||||
// *native* length objects.
|
||||
|
@ -35,6 +33,10 @@ namespace mozilla {
|
|||
|
||||
class ErrorResult;
|
||||
|
||||
namespace dom {
|
||||
class SVGElement;
|
||||
}
|
||||
|
||||
/**
|
||||
* Class DOMSVGLength
|
||||
*
|
||||
|
@ -84,7 +86,7 @@ class DOMSVGLength final : public nsISupports, public nsWrapperCache {
|
|||
* Ctor for creating the object returned by
|
||||
* nsSVGLength2::ToDOMBaseVal/ToDOMAnimVal
|
||||
*/
|
||||
DOMSVGLength(nsSVGLength2* aVal, nsSVGElement* aSVGElement, bool aAnimVal);
|
||||
DOMSVGLength(nsSVGLength2* aVal, dom::SVGElement* aSVGElement, bool aAnimVal);
|
||||
|
||||
~DOMSVGLength();
|
||||
|
||||
|
@ -106,7 +108,7 @@ class DOMSVGLength final : public nsISupports, public nsWrapperCache {
|
|||
DOMSVGLength();
|
||||
|
||||
static already_AddRefed<DOMSVGLength> GetTearOff(nsSVGLength2* aVal,
|
||||
nsSVGElement* aSVGElement,
|
||||
dom::SVGElement* aSVGElement,
|
||||
bool aAnimVal);
|
||||
|
||||
/**
|
||||
|
@ -180,7 +182,7 @@ class DOMSVGLength final : public nsISupports, public nsWrapperCache {
|
|||
JS::Handle<JSObject*> aGivenProto) override;
|
||||
|
||||
private:
|
||||
nsSVGElement* Element() const { return mList->Element(); }
|
||||
dom::SVGElement* Element() const { return mList->Element(); }
|
||||
|
||||
uint8_t AttrEnum() const { return mAttrEnum; }
|
||||
|
||||
|
@ -228,7 +230,7 @@ class DOMSVGLength final : public nsISupports, public nsWrapperCache {
|
|||
|
||||
// The following members are only used when we have an nsSVGLength2
|
||||
nsSVGLength2* mVal; // kept alive because it belongs to mSVGElement
|
||||
RefPtr<nsSVGElement> mSVGElement;
|
||||
RefPtr<dom::SVGElement> mSVGElement;
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(DOMSVGLength, MOZILLA_DOMSVGLENGTH_IID)
|
||||
|
|
|
@ -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 "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "DOMSVGLengthList.h"
|
||||
#include "DOMSVGLength.h"
|
||||
#include "nsError.h"
|
||||
|
|
|
@ -15,12 +15,14 @@
|
|||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
|
||||
class nsSVGElement;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class DOMSVGLength;
|
||||
|
||||
namespace dom {
|
||||
class SVGElement;
|
||||
}
|
||||
|
||||
/**
|
||||
* Class DOMSVGLengthList
|
||||
*
|
||||
|
@ -123,7 +125,7 @@ class DOMSVGLengthList final : public nsISupports, public nsWrapperCache {
|
|||
uint32_t Length() const { return NumberOfItems(); }
|
||||
|
||||
private:
|
||||
nsSVGElement* Element() const { return mAList->mElement; }
|
||||
dom::SVGElement* Element() const { return mAList->mElement; }
|
||||
|
||||
uint8_t AttrEnum() const { return mAList->mAttrEnum; }
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "DOMSVGNumberList.h"
|
||||
#include "DOMSVGAnimatedNumberList.h"
|
||||
#include "SVGAnimatedNumberList.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "nsError.h"
|
||||
#include "nsContentUtils.h" // for NS_ENSURE_FINITE
|
||||
#include "mozilla/dom/SVGNumberBinding.h"
|
||||
|
|
|
@ -14,12 +14,14 @@
|
|||
#include "mozilla/ErrorResult.h"
|
||||
#include "nsWrapperCache.h"
|
||||
|
||||
class nsSVGElement;
|
||||
|
||||
#define MOZ_SVG_LIST_INDEX_BIT_COUNT 27 // supports > 134 million list items
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
namespace dom {
|
||||
class SVGElement;
|
||||
}
|
||||
|
||||
/**
|
||||
* Class DOMSVGNumber
|
||||
*
|
||||
|
@ -117,7 +119,7 @@ class DOMSVGNumber final : public nsISupports, public nsWrapperCache {
|
|||
void SetValue(float aValue, ErrorResult& aRv);
|
||||
|
||||
private:
|
||||
nsSVGElement* Element() { return mList->Element(); }
|
||||
dom::SVGElement* Element() { return mList->Element(); }
|
||||
|
||||
uint8_t AttrEnum() const { return mAttrEnum; }
|
||||
|
||||
|
|
|
@ -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 "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "DOMSVGNumberList.h"
|
||||
#include "DOMSVGNumber.h"
|
||||
#include "nsError.h"
|
||||
|
|
|
@ -15,12 +15,14 @@
|
|||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
|
||||
class nsSVGElement;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class DOMSVGNumber;
|
||||
|
||||
namespace dom {
|
||||
class SVGElement;
|
||||
}
|
||||
|
||||
/**
|
||||
* Class DOMSVGNumberList
|
||||
*
|
||||
|
@ -123,7 +125,7 @@ class DOMSVGNumberList final : public nsISupports, public nsWrapperCache {
|
|||
uint32_t Length() const { return NumberOfItems(); }
|
||||
|
||||
private:
|
||||
nsSVGElement* Element() const { return mAList->mElement; }
|
||||
dom::SVGElement* Element() const { return mAList->mElement; }
|
||||
|
||||
uint8_t AttrEnum() const { return mAList->mAttrEnum; }
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "DOMSVGPathSeg.h"
|
||||
#include "DOMSVGPathSegList.h"
|
||||
#include "SVGAnimatedPathSegList.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "nsError.h"
|
||||
|
||||
// See the architecture comment in DOMSVGPathSegList.h.
|
||||
|
|
|
@ -13,12 +13,14 @@
|
|||
#include "SVGPathSegUtils.h"
|
||||
#include "mozilla/dom/SVGPathSegBinding.h"
|
||||
|
||||
class nsSVGElement;
|
||||
|
||||
#define MOZ_SVG_LIST_INDEX_BIT_COUNT 31
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
namespace dom {
|
||||
class SVGElement;
|
||||
}
|
||||
|
||||
#define CHECK_ARG_COUNT_IN_SYNC(segType) \
|
||||
MOZ_ASSERT( \
|
||||
ArrayLength(mArgs) == \
|
||||
|
@ -171,7 +173,7 @@ class DOMSVGPathSeg : public nsWrapperCache {
|
|||
}
|
||||
}
|
||||
|
||||
nsSVGElement* Element() { return mList->Element(); }
|
||||
dom::SVGElement* Element() { return mList->Element(); }
|
||||
|
||||
/**
|
||||
* Get a reference to the internal SVGPathSeg list item that this DOM wrapper
|
||||
|
|
|
@ -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 "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "DOMSVGPathSegList.h"
|
||||
#include "DOMSVGPathSeg.h"
|
||||
#include "nsError.h"
|
||||
|
@ -75,7 +75,7 @@ class MOZ_RAII AutoChangePathSegListNotifier {
|
|||
};
|
||||
|
||||
/* static */ already_AddRefed<DOMSVGPathSegList>
|
||||
DOMSVGPathSegList::GetDOMWrapper(void* aList, nsSVGElement* aElement,
|
||||
DOMSVGPathSegList::GetDOMWrapper(void* aList, SVGElement* aElement,
|
||||
bool aIsAnimValList) {
|
||||
RefPtr<DOMSVGPathSegList> wrapper =
|
||||
SVGPathSegListTearoffTable().GetTearoff(aList);
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "nsCOMPtr.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsDebug.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "nsTArray.h"
|
||||
#include "SVGPathData.h" // IWYU pragma: keep
|
||||
#include "mozilla/Attributes.h"
|
||||
|
@ -77,7 +77,7 @@ class DOMSVGPathSegList final : public nsISupports, public nsWrapperCache {
|
|||
* clearly SVGPathData* and a SVGPathData** are not the same type.
|
||||
*/
|
||||
static already_AddRefed<DOMSVGPathSegList> GetDOMWrapper(
|
||||
void* aList, nsSVGElement* aElement, bool aIsAnimValList);
|
||||
void* aList, dom::SVGElement* aElement, bool aIsAnimValList);
|
||||
|
||||
/**
|
||||
* This method returns the DOMSVGPathSegList wrapper for an internal
|
||||
|
@ -156,14 +156,14 @@ class DOMSVGPathSegList final : public nsISupports, public nsWrapperCache {
|
|||
* Only our static GetDOMWrapper() factory method may create objects of our
|
||||
* type.
|
||||
*/
|
||||
DOMSVGPathSegList(nsSVGElement* aElement, bool aIsAnimValList)
|
||||
DOMSVGPathSegList(dom::SVGElement* aElement, bool aIsAnimValList)
|
||||
: mElement(aElement), mIsAnimValList(aIsAnimValList) {
|
||||
InternalListWillChangeTo(InternalList()); // Sync mItems
|
||||
}
|
||||
|
||||
~DOMSVGPathSegList();
|
||||
|
||||
nsSVGElement* Element() const { return mElement.get(); }
|
||||
dom::SVGElement* Element() const { return mElement.get(); }
|
||||
|
||||
/// Used to determine if this list is the baseVal or animVal list.
|
||||
bool IsAnimValList() const { return mIsAnimValList; }
|
||||
|
@ -221,7 +221,7 @@ class DOMSVGPathSegList final : public nsISupports, public nsWrapperCache {
|
|||
|
||||
// Strong ref to our element to keep it alive. We hold this not only for
|
||||
// ourself, but also for our DOMSVGPathSeg items too.
|
||||
RefPtr<nsSVGElement> mElement;
|
||||
RefPtr<dom::SVGElement> mElement;
|
||||
|
||||
bool mIsAnimValList;
|
||||
};
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "DOMSVGPointList.h"
|
||||
#include "SVGPoint.h"
|
||||
#include "gfx2DGlue.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "nsError.h"
|
||||
#include "mozilla/dom/SVGMatrix.h"
|
||||
|
||||
|
|
|
@ -15,11 +15,10 @@
|
|||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/FloatingPoint.h"
|
||||
|
||||
class nsSVGElement;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
namespace dom {
|
||||
class SVGElement;
|
||||
class SVGMatrix;
|
||||
} // namespace dom
|
||||
|
||||
|
@ -88,7 +87,7 @@ class DOMSVGPoint final : public nsISVGPoint {
|
|||
virtual DOMSVGPoint* Copy() override { return new DOMSVGPoint(this); }
|
||||
|
||||
protected:
|
||||
nsSVGElement* Element() { return mList->Element(); }
|
||||
dom::SVGElement* Element() { return mList->Element(); }
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -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 "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "DOMSVGPointList.h"
|
||||
#include "DOMSVGPoint.h"
|
||||
#include "nsError.h"
|
||||
|
@ -92,7 +92,7 @@ class MOZ_RAII AutoChangePointListNotifier {
|
|||
};
|
||||
|
||||
/* static */ already_AddRefed<DOMSVGPointList> DOMSVGPointList::GetDOMWrapper(
|
||||
void* aList, nsSVGElement* aElement, bool aIsAnimValList) {
|
||||
void* aList, SVGElement* aElement, bool aIsAnimValList) {
|
||||
RefPtr<DOMSVGPointList> wrapper =
|
||||
SVGPointListTearoffTable().GetTearoff(aList);
|
||||
if (!wrapper) {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "nsCOMPtr.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsDebug.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "nsTArray.h"
|
||||
#include "SVGPointList.h" // IWYU pragma: keep
|
||||
#include "mozilla/Attributes.h"
|
||||
|
@ -78,9 +78,8 @@ class DOMSVGPointList final : public nsISupports, public nsWrapperCache {
|
|||
* use the addresses of these members as the key for the hash table, and
|
||||
* clearly SVGPointList* and a SVGPointList** are not the same type.
|
||||
*/
|
||||
static already_AddRefed<DOMSVGPointList> GetDOMWrapper(void* aList,
|
||||
nsSVGElement* aElement,
|
||||
bool aIsAnimValList);
|
||||
static already_AddRefed<DOMSVGPointList> GetDOMWrapper(
|
||||
void* aList, dom::SVGElement* aElement, bool aIsAnimValList);
|
||||
|
||||
/**
|
||||
* This method returns the DOMSVGPointList wrapper for an internal
|
||||
|
@ -159,14 +158,14 @@ class DOMSVGPointList final : public nsISupports, public nsWrapperCache {
|
|||
* Only our static GetDOMWrapper() factory method may create objects of our
|
||||
* type.
|
||||
*/
|
||||
DOMSVGPointList(nsSVGElement* aElement, bool aIsAnimValList)
|
||||
DOMSVGPointList(dom::SVGElement* aElement, bool aIsAnimValList)
|
||||
: mElement(aElement), mIsAnimValList(aIsAnimValList) {
|
||||
InternalListWillChangeTo(InternalList()); // Sync mItems
|
||||
}
|
||||
|
||||
~DOMSVGPointList();
|
||||
|
||||
nsSVGElement* Element() const { return mElement.get(); }
|
||||
dom::SVGElement* Element() const { return mElement.get(); }
|
||||
|
||||
/// Used to determine if this list is the baseVal or animVal list.
|
||||
bool IsAnimValList() const { return mIsAnimValList; }
|
||||
|
@ -195,7 +194,7 @@ class DOMSVGPointList final : public nsISupports, public nsWrapperCache {
|
|||
|
||||
// Strong ref to our element to keep it alive. We hold this not only for
|
||||
// ourself, but also for our nsISVGPoint items too.
|
||||
RefPtr<nsSVGElement> mElement;
|
||||
RefPtr<dom::SVGElement> mElement;
|
||||
|
||||
bool mIsAnimValList;
|
||||
};
|
||||
|
|
|
@ -65,7 +65,7 @@ class MOZ_RAII AutoChangeStringListNotifier {
|
|||
};
|
||||
|
||||
/* static */ already_AddRefed<DOMSVGStringList> DOMSVGStringList::GetDOMWrapper(
|
||||
SVGStringList* aList, nsSVGElement* aElement,
|
||||
SVGStringList* aList, SVGElement* aElement,
|
||||
bool aIsConditionalProcessingAttribute, uint8_t aAttrEnum) {
|
||||
RefPtr<DOMSVGStringList> wrapper =
|
||||
SVGStringListTearoffTable().GetTearoff(aList);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -50,7 +50,7 @@ class DOMSVGStringList final : public nsISupports, public nsWrapperCache {
|
|||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGStringList)
|
||||
|
||||
nsSVGElement* GetParentObject() const { return mElement; }
|
||||
dom::SVGElement* GetParentObject() const { return mElement; }
|
||||
virtual JSObject* WrapObject(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aGivenProto) override;
|
||||
|
||||
|
@ -80,7 +80,7 @@ class DOMSVGStringList final : public nsISupports, public nsWrapperCache {
|
|||
* result in a new DOMSVGStringList being returned.
|
||||
*/
|
||||
static already_AddRefed<DOMSVGStringList> GetDOMWrapper(
|
||||
SVGStringList* aList, nsSVGElement* aElement,
|
||||
SVGStringList* aList, dom::SVGElement* aElement,
|
||||
bool aIsConditionalProcessingAttribute, uint8_t aAttrEnum);
|
||||
|
||||
private:
|
||||
|
@ -88,7 +88,7 @@ class DOMSVGStringList final : public nsISupports, public nsWrapperCache {
|
|||
* Only our static GetDOMWrapper() factory method may create objects of our
|
||||
* type.
|
||||
*/
|
||||
DOMSVGStringList(nsSVGElement* aElement,
|
||||
DOMSVGStringList(dom::SVGElement* aElement,
|
||||
bool aIsConditionalProcessingAttribute, uint8_t aAttrEnum)
|
||||
: mElement(aElement),
|
||||
mAttrEnum(aAttrEnum),
|
||||
|
@ -99,7 +99,7 @@ class DOMSVGStringList final : public nsISupports, public nsWrapperCache {
|
|||
SVGStringList& InternalList() const;
|
||||
|
||||
// Strong ref to our element to keep it alive.
|
||||
RefPtr<nsSVGElement> mElement;
|
||||
RefPtr<dom::SVGElement> mElement;
|
||||
|
||||
uint8_t mAttrEnum;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "mozilla/dom/SVGTransform.h"
|
||||
#include "mozilla/dom/SVGMatrix.h"
|
||||
#include "nsSVGAnimatedTransformList.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "mozilla/dom/SVGTransformListBinding.h"
|
||||
#include "nsError.h"
|
||||
#include <algorithm>
|
||||
|
|
|
@ -15,11 +15,10 @@
|
|||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
|
||||
class nsSVGElement;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
namespace dom {
|
||||
class SVGElement;
|
||||
class SVGMatrix;
|
||||
class SVGTransform;
|
||||
} // namespace dom
|
||||
|
@ -120,7 +119,7 @@ class DOMSVGTransformList final : public nsISupports, public nsWrapperCache {
|
|||
uint32_t Length() const { return NumberOfItems(); }
|
||||
|
||||
private:
|
||||
nsSVGElement* Element() const { return mAList->mElement; }
|
||||
dom::SVGElement* Element() const { return mAList->mElement; }
|
||||
|
||||
/// Used to determine if this list is the baseVal or animVal list.
|
||||
bool IsAnimValList() const {
|
||||
|
|
|
@ -27,7 +27,7 @@ JSObject* SVGAElement::WrapNode(JSContext* aCx,
|
|||
return SVGAElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
nsSVGElement::StringInfo SVGAElement::sStringInfo[3] = {
|
||||
SVGElement::StringInfo SVGAElement::sStringInfo[3] = {
|
||||
{nsGkAtoms::href, kNameSpaceID_None, true},
|
||||
{nsGkAtoms::href, kNameSpaceID_XLink, true},
|
||||
{nsGkAtoms::target, kNameSpaceID_None, true}};
|
||||
|
@ -341,9 +341,9 @@ nsresult SVGAElement::AfterSetAttr(int32_t aNameSpaceID, nsAtom* aName,
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
nsSVGElement::StringAttributesInfo SVGAElement::GetStringInfo() {
|
||||
SVGElement::StringAttributesInfo SVGAElement::GetStringInfo() {
|
||||
return StringAttributesInfo(mStringAttributes, sStringInfo,
|
||||
ArrayLength(sStringInfo));
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#define mozilla_dom_SVGAngle_h
|
||||
|
||||
#include "nsWrapperCache.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsSVGAngle;
|
||||
|
@ -23,11 +23,11 @@ class SVGAngle final : public nsWrapperCache {
|
|||
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(SVGAngle)
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(SVGAngle)
|
||||
|
||||
SVGAngle(nsSVGAngle* aVal, nsSVGElement* aSVGElement, AngleType aType)
|
||||
SVGAngle(nsSVGAngle* aVal, SVGElement* aSVGElement, AngleType aType)
|
||||
: mVal(aVal), mSVGElement(aSVGElement), mType(aType) {}
|
||||
|
||||
// WebIDL
|
||||
nsSVGElement* GetParentObject() { return mSVGElement; }
|
||||
SVGElement* GetParentObject() { return mSVGElement; }
|
||||
virtual JSObject* WrapObject(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aGivenProto) override;
|
||||
uint16_t UnitType() const;
|
||||
|
@ -45,7 +45,7 @@ class SVGAngle final : public nsWrapperCache {
|
|||
|
||||
nsSVGAngle* mVal; // if mType is CreatedValue, we own the angle. Otherwise,
|
||||
// the element does.
|
||||
RefPtr<nsSVGElement> mSVGElement;
|
||||
RefPtr<SVGElement> mSVGElement;
|
||||
AngleType mType;
|
||||
};
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ class SVGAnimateMotionElement final : public SVGAnimationElement {
|
|||
virtual bool GetTargetAttributeName(int32_t* aNamespaceID,
|
||||
nsAtom** aLocalName) const override;
|
||||
|
||||
// nsSVGElement
|
||||
// SVGElement
|
||||
virtual nsStaticAtom* GetPathDataAttrName() const override {
|
||||
return nsGkAtoms::path;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#define mozilla_dom_SVGAnimatedAngle_h
|
||||
|
||||
#include "nsWrapperCache.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsSVGAngle;
|
||||
|
@ -23,11 +23,11 @@ class SVGAnimatedAngle final : public nsWrapperCache {
|
|||
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(SVGAnimatedAngle)
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(SVGAnimatedAngle)
|
||||
|
||||
SVGAnimatedAngle(nsSVGAngle* aVal, nsSVGElement* aSVGElement)
|
||||
SVGAnimatedAngle(nsSVGAngle* aVal, SVGElement* aSVGElement)
|
||||
: mVal(aVal), mSVGElement(aSVGElement) {}
|
||||
|
||||
// WebIDL
|
||||
nsSVGElement* GetParentObject() { return mSVGElement; }
|
||||
SVGElement* GetParentObject() { return mSVGElement; }
|
||||
virtual JSObject* WrapObject(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aGivenProto) override;
|
||||
already_AddRefed<SVGAngle> BaseVal();
|
||||
|
@ -37,7 +37,7 @@ class SVGAnimatedAngle final : public nsWrapperCache {
|
|||
~SVGAnimatedAngle();
|
||||
|
||||
nsSVGAngle* mVal; // kept alive because it belongs to content
|
||||
RefPtr<nsSVGElement> mSVGElement;
|
||||
RefPtr<SVGElement> mSVGElement;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#define mozilla_dom_SVGAnimatedBoolean_h
|
||||
|
||||
#include "nsWrapperCache.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsSVGBoolean.h"
|
||||
|
||||
|
@ -19,11 +19,11 @@ class SVGAnimatedBoolean final : public nsWrapperCache {
|
|||
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(SVGAnimatedBoolean)
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(SVGAnimatedBoolean)
|
||||
|
||||
SVGAnimatedBoolean(nsSVGBoolean* aVal, nsSVGElement* aSVGElement)
|
||||
SVGAnimatedBoolean(nsSVGBoolean* aVal, SVGElement* aSVGElement)
|
||||
: mVal(aVal), mSVGElement(aSVGElement) {}
|
||||
|
||||
// WebIDL
|
||||
nsSVGElement* GetParentObject() const { return mSVGElement; }
|
||||
SVGElement* GetParentObject() const { return mSVGElement; }
|
||||
virtual JSObject* WrapObject(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aGivenProto) override;
|
||||
bool BaseVal() const { return mVal->GetBaseValue(); }
|
||||
|
@ -37,7 +37,7 @@ class SVGAnimatedBoolean final : public nsWrapperCache {
|
|||
~SVGAnimatedBoolean();
|
||||
|
||||
nsSVGBoolean* mVal; // kept alive because it belongs to content
|
||||
RefPtr<nsSVGElement> mSVGElement;
|
||||
RefPtr<SVGElement> mSVGElement;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include "nsWrapperCache.h"
|
||||
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
@ -19,7 +19,7 @@ class SVGAnimatedEnumeration : public nsISupports, public nsWrapperCache {
|
|||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SVGAnimatedEnumeration)
|
||||
|
||||
nsSVGElement* GetParentObject() const { return mSVGElement; }
|
||||
SVGElement* GetParentObject() const { return mSVGElement; }
|
||||
|
||||
JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
|
||||
|
||||
|
@ -28,11 +28,11 @@ class SVGAnimatedEnumeration : public nsISupports, public nsWrapperCache {
|
|||
virtual uint16_t AnimVal() = 0;
|
||||
|
||||
protected:
|
||||
explicit SVGAnimatedEnumeration(nsSVGElement* aSVGElement)
|
||||
explicit SVGAnimatedEnumeration(SVGElement* aSVGElement)
|
||||
: mSVGElement(aSVGElement) {}
|
||||
virtual ~SVGAnimatedEnumeration(){};
|
||||
|
||||
RefPtr<nsSVGElement> mSVGElement;
|
||||
RefPtr<SVGElement> mSVGElement;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include "nsWrapperCache.h"
|
||||
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
@ -19,7 +19,7 @@ class SVGAnimatedInteger : public nsISupports, public nsWrapperCache {
|
|||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SVGAnimatedInteger)
|
||||
|
||||
nsSVGElement* GetParentObject() const { return mSVGElement; }
|
||||
SVGElement* GetParentObject() const { return mSVGElement; }
|
||||
|
||||
JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
|
||||
|
||||
|
@ -28,11 +28,11 @@ class SVGAnimatedInteger : public nsISupports, public nsWrapperCache {
|
|||
virtual int32_t AnimVal() = 0;
|
||||
|
||||
protected:
|
||||
explicit SVGAnimatedInteger(nsSVGElement* aSVGElement)
|
||||
explicit SVGAnimatedInteger(SVGElement* aSVGElement)
|
||||
: mSVGElement(aSVGElement) {}
|
||||
virtual ~SVGAnimatedInteger(){};
|
||||
|
||||
RefPtr<nsSVGElement> mSVGElement;
|
||||
RefPtr<SVGElement> mSVGElement;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#define mozilla_dom_SVGAnimatedLength_h
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
|
||||
class nsSVGLength2;
|
||||
|
||||
|
@ -23,11 +23,11 @@ class SVGAnimatedLength final : public nsWrapperCache {
|
|||
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(SVGAnimatedLength)
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(SVGAnimatedLength)
|
||||
|
||||
SVGAnimatedLength(nsSVGLength2* aVal, nsSVGElement* aSVGElement)
|
||||
SVGAnimatedLength(nsSVGLength2* aVal, SVGElement* aSVGElement)
|
||||
: mVal(aVal), mSVGElement(aSVGElement) {}
|
||||
|
||||
// WebIDL
|
||||
nsSVGElement* GetParentObject() { return mSVGElement; }
|
||||
SVGElement* GetParentObject() { return mSVGElement; }
|
||||
virtual JSObject* WrapObject(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aGivenProto) override;
|
||||
already_AddRefed<DOMSVGLength> BaseVal();
|
||||
|
@ -37,7 +37,7 @@ class SVGAnimatedLength final : public nsWrapperCache {
|
|||
~SVGAnimatedLength();
|
||||
|
||||
nsSVGLength2* mVal; // kept alive because it belongs to content
|
||||
RefPtr<nsSVGElement> mSVGElement;
|
||||
RefPtr<SVGElement> mSVGElement;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "DOMSVGAnimatedLengthList.h"
|
||||
#include "mozilla/Move.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "nsSVGAttrTearoffTable.h"
|
||||
#include "nsSMILValue.h"
|
||||
#include "SVGLengthListSMILType.h"
|
||||
|
@ -37,7 +37,7 @@ nsresult SVGAnimatedLengthList::SetBaseValueString(const nsAString &aValue) {
|
|||
}
|
||||
|
||||
// We don't need to call DidChange* here - we're only called by
|
||||
// nsSVGElement::ParseAttribute under Element::SetAttr,
|
||||
// SVGElement::ParseAttribute under Element::SetAttr,
|
||||
// which takes care of notifying.
|
||||
|
||||
rv = mBaseVal.CopyFrom(newBaseValue);
|
||||
|
@ -61,7 +61,7 @@ void SVGAnimatedLengthList::ClearBaseValue(uint32_t aAttrEnum) {
|
|||
}
|
||||
|
||||
nsresult SVGAnimatedLengthList::SetAnimValue(const SVGLengthList &aNewAnimValue,
|
||||
nsSVGElement *aElement,
|
||||
SVGElement *aElement,
|
||||
uint32_t aAttrEnum) {
|
||||
DOMSVGAnimatedLengthList *domWrapper =
|
||||
DOMSVGAnimatedLengthList::GetDOMWrapperIfExists(this);
|
||||
|
@ -98,7 +98,7 @@ nsresult SVGAnimatedLengthList::SetAnimValue(const SVGLengthList &aNewAnimValue,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
void SVGAnimatedLengthList::ClearAnimValue(nsSVGElement *aElement,
|
||||
void SVGAnimatedLengthList::ClearAnimValue(SVGElement *aElement,
|
||||
uint32_t aAttrEnum) {
|
||||
DOMSVGAnimatedLengthList *domWrapper =
|
||||
DOMSVGAnimatedLengthList::GetDOMWrapperIfExists(this);
|
||||
|
@ -115,7 +115,7 @@ void SVGAnimatedLengthList::ClearAnimValue(nsSVGElement *aElement,
|
|||
}
|
||||
|
||||
UniquePtr<nsISMILAttr> SVGAnimatedLengthList::ToSMILAttr(
|
||||
nsSVGElement *aSVGElement, uint8_t aAttrEnum, uint8_t aAxis,
|
||||
SVGElement *aSVGElement, uint8_t aAttrEnum, uint8_t aAxis,
|
||||
bool aCanZeroPadList) {
|
||||
return MakeUnique<SMILAnimatedLengthList>(this, aSVGElement, aAttrEnum, aAxis,
|
||||
aCanZeroPadList);
|
||||
|
|
|
@ -14,12 +14,12 @@
|
|||
#include "SVGLengthList.h"
|
||||
|
||||
class nsSMILValue;
|
||||
class nsSVGElement;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
namespace dom {
|
||||
class SVGAnimationElement;
|
||||
class SVGElement;
|
||||
} // namespace dom
|
||||
|
||||
/**
|
||||
|
@ -61,14 +61,14 @@ class SVGAnimatedLengthList {
|
|||
return mAnimVal ? *mAnimVal : mBaseVal;
|
||||
}
|
||||
|
||||
nsresult SetAnimValue(const SVGLengthList& aValue, nsSVGElement* aElement,
|
||||
nsresult SetAnimValue(const SVGLengthList& aValue, dom::SVGElement* aElement,
|
||||
uint32_t aAttrEnum);
|
||||
|
||||
void ClearAnimValue(nsSVGElement* aElement, uint32_t aAttrEnum);
|
||||
void ClearAnimValue(dom::SVGElement* aElement, uint32_t aAttrEnum);
|
||||
|
||||
bool IsAnimating() const { return !!mAnimVal; }
|
||||
|
||||
UniquePtr<nsISMILAttr> ToSMILAttr(nsSVGElement* aSVGElement,
|
||||
UniquePtr<nsISMILAttr> ToSMILAttr(dom::SVGElement* aSVGElement,
|
||||
uint8_t aAttrEnum, uint8_t aAxis,
|
||||
bool aCanZeroPadList);
|
||||
|
||||
|
@ -84,7 +84,7 @@ class SVGAnimatedLengthList {
|
|||
struct SMILAnimatedLengthList : public nsISMILAttr {
|
||||
public:
|
||||
SMILAnimatedLengthList(SVGAnimatedLengthList* aVal,
|
||||
nsSVGElement* aSVGElement, uint8_t aAttrEnum,
|
||||
dom::SVGElement* aSVGElement, uint8_t aAttrEnum,
|
||||
uint8_t aAxis, bool aCanZeroPadList)
|
||||
: mVal(aVal),
|
||||
mElement(aSVGElement),
|
||||
|
@ -96,7 +96,7 @@ class SVGAnimatedLengthList {
|
|||
// as the Compositing step, and DOM elements don't get a chance to
|
||||
// die during that.
|
||||
SVGAnimatedLengthList* mVal;
|
||||
nsSVGElement* mElement;
|
||||
dom::SVGElement* mElement;
|
||||
uint8_t mAttrEnum;
|
||||
uint8_t mAxis;
|
||||
bool mCanZeroPadList; // See SVGLengthListAndInfo::CanZeroPadList
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "nsISupports.h"
|
||||
#include "nsWrapperCache.h"
|
||||
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
@ -20,7 +20,7 @@ class SVGAnimatedNumber : public nsISupports, public nsWrapperCache {
|
|||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SVGAnimatedNumber)
|
||||
|
||||
nsSVGElement* GetParentObject() const { return mSVGElement; }
|
||||
SVGElement* GetParentObject() const { return mSVGElement; }
|
||||
|
||||
JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
|
||||
|
||||
|
@ -29,11 +29,11 @@ class SVGAnimatedNumber : public nsISupports, public nsWrapperCache {
|
|||
virtual float AnimVal() = 0;
|
||||
|
||||
protected:
|
||||
explicit SVGAnimatedNumber(nsSVGElement* aSVGElement)
|
||||
explicit SVGAnimatedNumber(SVGElement* aSVGElement)
|
||||
: mSVGElement(aSVGElement) {}
|
||||
virtual ~SVGAnimatedNumber(){};
|
||||
|
||||
RefPtr<nsSVGElement> mSVGElement;
|
||||
RefPtr<SVGElement> mSVGElement;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "DOMSVGAnimatedNumberList.h"
|
||||
#include "mozilla/Move.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "nsSVGAttrTearoffTable.h"
|
||||
#include "nsSMILValue.h"
|
||||
#include "SVGNumberListSMILType.h"
|
||||
|
@ -34,7 +34,7 @@ nsresult SVGAnimatedNumberList::SetBaseValueString(const nsAString &aValue) {
|
|||
}
|
||||
|
||||
// We don't need to call DidChange* here - we're only called by
|
||||
// nsSVGElement::ParseAttribute under Element::SetAttr,
|
||||
// SVGElement::ParseAttribute under Element::SetAttr,
|
||||
// which takes care of notifying.
|
||||
|
||||
mIsBaseSet = true;
|
||||
|
@ -60,7 +60,7 @@ void SVGAnimatedNumberList::ClearBaseValue(uint32_t aAttrEnum) {
|
|||
}
|
||||
|
||||
nsresult SVGAnimatedNumberList::SetAnimValue(const SVGNumberList &aNewAnimValue,
|
||||
nsSVGElement *aElement,
|
||||
SVGElement *aElement,
|
||||
uint32_t aAttrEnum) {
|
||||
DOMSVGAnimatedNumberList *domWrapper =
|
||||
DOMSVGAnimatedNumberList::GetDOMWrapperIfExists(this);
|
||||
|
@ -97,7 +97,7 @@ nsresult SVGAnimatedNumberList::SetAnimValue(const SVGNumberList &aNewAnimValue,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
void SVGAnimatedNumberList::ClearAnimValue(nsSVGElement *aElement,
|
||||
void SVGAnimatedNumberList::ClearAnimValue(SVGElement *aElement,
|
||||
uint32_t aAttrEnum) {
|
||||
DOMSVGAnimatedNumberList *domWrapper =
|
||||
DOMSVGAnimatedNumberList::GetDOMWrapperIfExists(this);
|
||||
|
@ -114,7 +114,7 @@ void SVGAnimatedNumberList::ClearAnimValue(nsSVGElement *aElement,
|
|||
}
|
||||
|
||||
UniquePtr<nsISMILAttr> SVGAnimatedNumberList::ToSMILAttr(
|
||||
nsSVGElement *aSVGElement, uint8_t aAttrEnum) {
|
||||
SVGElement *aSVGElement, uint8_t aAttrEnum) {
|
||||
return MakeUnique<SMILAnimatedNumberList>(this, aSVGElement, aAttrEnum);
|
||||
}
|
||||
|
||||
|
|
|
@ -14,12 +14,12 @@
|
|||
#include "SVGNumberList.h"
|
||||
|
||||
class nsSMILValue;
|
||||
class nsSVGElement;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
namespace dom {
|
||||
class SVGAnimationElement;
|
||||
class SVGElement;
|
||||
} // namespace dom
|
||||
|
||||
/**
|
||||
|
@ -61,10 +61,10 @@ class SVGAnimatedNumberList {
|
|||
return mAnimVal ? *mAnimVal : mBaseVal;
|
||||
}
|
||||
|
||||
nsresult SetAnimValue(const SVGNumberList& aValue, nsSVGElement* aElement,
|
||||
nsresult SetAnimValue(const SVGNumberList& aValue, dom::SVGElement* aElement,
|
||||
uint32_t aAttrEnum);
|
||||
|
||||
void ClearAnimValue(nsSVGElement* aElement, uint32_t aAttrEnum);
|
||||
void ClearAnimValue(dom::SVGElement* aElement, uint32_t aAttrEnum);
|
||||
|
||||
// Returns true if the animated value of this list has been explicitly
|
||||
// set (either by animation, or by taking on the base value which has been
|
||||
|
@ -75,7 +75,7 @@ class SVGAnimatedNumberList {
|
|||
|
||||
bool IsAnimating() const { return !!mAnimVal; }
|
||||
|
||||
UniquePtr<nsISMILAttr> ToSMILAttr(nsSVGElement* aSVGElement,
|
||||
UniquePtr<nsISMILAttr> ToSMILAttr(dom::SVGElement* aSVGElement,
|
||||
uint8_t aAttrEnum);
|
||||
|
||||
private:
|
||||
|
@ -91,14 +91,14 @@ class SVGAnimatedNumberList {
|
|||
struct SMILAnimatedNumberList : public nsISMILAttr {
|
||||
public:
|
||||
SMILAnimatedNumberList(SVGAnimatedNumberList* aVal,
|
||||
nsSVGElement* aSVGElement, uint8_t aAttrEnum)
|
||||
dom::SVGElement* aSVGElement, uint8_t aAttrEnum)
|
||||
: mVal(aVal), mElement(aSVGElement), mAttrEnum(aAttrEnum) {}
|
||||
|
||||
// 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.
|
||||
SVGAnimatedNumberList* mVal;
|
||||
nsSVGElement* mElement;
|
||||
dom::SVGElement* mElement;
|
||||
uint8_t mAttrEnum;
|
||||
|
||||
// nsISMILAttr methods
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "DOMSVGPathSegList.h"
|
||||
#include "mozilla/Move.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "nsSVGAttrTearoffTable.h"
|
||||
#include "nsSMILValue.h"
|
||||
#include "SVGPathSegListSMILType.h"
|
||||
|
@ -49,7 +49,7 @@ nsresult SVGAnimatedPathSegList::SetBaseValueString(const nsAString &aValue) {
|
|||
// Only now may we modify mBaseVal!
|
||||
|
||||
// We don't need to call DidChange* here - we're only called by
|
||||
// nsSVGElement::ParseAttribute under Element::SetAttr,
|
||||
// SVGElement::ParseAttribute under Element::SetAttr,
|
||||
// which takes care of notifying.
|
||||
|
||||
nsresult rv2 = mBaseVal.CopyFrom(newBaseValue);
|
||||
|
@ -89,7 +89,7 @@ void SVGAnimatedPathSegList::ClearBaseValue() {
|
|||
}
|
||||
|
||||
nsresult SVGAnimatedPathSegList::SetAnimValue(const SVGPathData &aNewAnimValue,
|
||||
nsSVGElement *aElement) {
|
||||
SVGElement *aElement) {
|
||||
// Note that a new animation may totally change the number of items in the
|
||||
// animVal list, either replacing what was essentially a mirror of the
|
||||
// baseVal list, or else replacing and overriding an existing animation.
|
||||
|
@ -121,7 +121,7 @@ nsresult SVGAnimatedPathSegList::SetAnimValue(const SVGPathData &aNewAnimValue,
|
|||
return rv;
|
||||
}
|
||||
|
||||
void SVGAnimatedPathSegList::ClearAnimValue(nsSVGElement *aElement) {
|
||||
void SVGAnimatedPathSegList::ClearAnimValue(SVGElement *aElement) {
|
||||
// We must send these notifications *before* changing mAnimVal! (See above.)
|
||||
|
||||
DOMSVGPathSegList *domWrapper =
|
||||
|
@ -141,7 +141,7 @@ bool SVGAnimatedPathSegList::IsRendered() const {
|
|||
}
|
||||
|
||||
UniquePtr<nsISMILAttr> SVGAnimatedPathSegList::ToSMILAttr(
|
||||
nsSVGElement *aElement) {
|
||||
SVGElement *aElement) {
|
||||
return MakeUnique<SMILAnimatedPathSegList>(this, aElement);
|
||||
}
|
||||
|
||||
|
|
|
@ -15,12 +15,12 @@
|
|||
#include "SVGPathData.h"
|
||||
|
||||
class nsSMILValue;
|
||||
class nsSVGElement;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
namespace dom {
|
||||
class SVGAnimationElement;
|
||||
class SVGElement;
|
||||
} // namespace dom
|
||||
|
||||
/**
|
||||
|
@ -65,9 +65,9 @@ class SVGAnimatedPathSegList final {
|
|||
return mAnimVal ? *mAnimVal : mBaseVal;
|
||||
}
|
||||
|
||||
nsresult SetAnimValue(const SVGPathData& aValue, nsSVGElement* aElement);
|
||||
nsresult SetAnimValue(const SVGPathData& aValue, dom::SVGElement* aElement);
|
||||
|
||||
void ClearAnimValue(nsSVGElement* aElement);
|
||||
void ClearAnimValue(dom::SVGElement* aElement);
|
||||
|
||||
/**
|
||||
* Empty paths are not rendered.
|
||||
|
@ -83,7 +83,7 @@ class SVGAnimatedPathSegList final {
|
|||
|
||||
bool IsAnimating() const { return !!mAnimVal; }
|
||||
|
||||
UniquePtr<nsISMILAttr> ToSMILAttr(nsSVGElement* aElement);
|
||||
UniquePtr<nsISMILAttr> ToSMILAttr(dom::SVGElement* aElement);
|
||||
|
||||
size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const;
|
||||
|
||||
|
@ -99,14 +99,14 @@ class SVGAnimatedPathSegList final {
|
|||
struct SMILAnimatedPathSegList : public nsISMILAttr {
|
||||
public:
|
||||
SMILAnimatedPathSegList(SVGAnimatedPathSegList* aVal,
|
||||
nsSVGElement* aElement)
|
||||
dom::SVGElement* aElement)
|
||||
: mVal(aVal), mElement(aElement) {}
|
||||
|
||||
// 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.
|
||||
SVGAnimatedPathSegList* mVal;
|
||||
nsSVGElement* mElement;
|
||||
dom::SVGElement* mElement;
|
||||
|
||||
// nsISMILAttr methods
|
||||
virtual nsresult ValueFromString(
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "DOMSVGPointList.h"
|
||||
#include "mozilla/Move.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "nsSVGAttrTearoffTable.h"
|
||||
#include "nsSMILValue.h"
|
||||
#include "SVGPointListSMILType.h"
|
||||
|
@ -49,7 +49,7 @@ nsresult SVGAnimatedPointList::SetBaseValueString(const nsAString &aValue) {
|
|||
// Only now may we modify mBaseVal!
|
||||
|
||||
// We don't need to call DidChange* here - we're only called by
|
||||
// nsSVGElement::ParseAttribute under Element::SetAttr,
|
||||
// SVGElement::ParseAttribute under Element::SetAttr,
|
||||
// which takes care of notifying.
|
||||
|
||||
nsresult rv2 = mBaseVal.CopyFrom(newBaseValue);
|
||||
|
@ -89,7 +89,7 @@ void SVGAnimatedPointList::ClearBaseValue() {
|
|||
}
|
||||
|
||||
nsresult SVGAnimatedPointList::SetAnimValue(const SVGPointList &aNewAnimValue,
|
||||
nsSVGElement *aElement) {
|
||||
SVGElement *aElement) {
|
||||
// Note that a new animation may totally change the number of items in the
|
||||
// animVal list, either replacing what was essentially a mirror of the
|
||||
// baseVal list, or else replacing and overriding an existing animation.
|
||||
|
@ -124,7 +124,7 @@ nsresult SVGAnimatedPointList::SetAnimValue(const SVGPointList &aNewAnimValue,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
void SVGAnimatedPointList::ClearAnimValue(nsSVGElement *aElement) {
|
||||
void SVGAnimatedPointList::ClearAnimValue(SVGElement *aElement) {
|
||||
// We must send these notifications *before* changing mAnimVal! (See above.)
|
||||
|
||||
DOMSVGPointList *domWrapper =
|
||||
|
@ -139,8 +139,7 @@ void SVGAnimatedPointList::ClearAnimValue(nsSVGElement *aElement) {
|
|||
aElement->DidAnimatePointList();
|
||||
}
|
||||
|
||||
UniquePtr<nsISMILAttr> SVGAnimatedPointList::ToSMILAttr(
|
||||
nsSVGElement *aElement) {
|
||||
UniquePtr<nsISMILAttr> SVGAnimatedPointList::ToSMILAttr(SVGElement *aElement) {
|
||||
return MakeUnique<SMILAnimatedPointList>(this, aElement);
|
||||
}
|
||||
|
||||
|
|
|
@ -14,12 +14,12 @@
|
|||
#include "SVGPointList.h"
|
||||
|
||||
class nsSMILValue;
|
||||
class nsSVGElement;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
namespace dom {
|
||||
class SVGAnimationElement;
|
||||
class SVGElement;
|
||||
} // namespace dom
|
||||
|
||||
/**
|
||||
|
@ -64,9 +64,9 @@ class SVGAnimatedPointList {
|
|||
return mAnimVal ? *mAnimVal : mBaseVal;
|
||||
}
|
||||
|
||||
nsresult SetAnimValue(const SVGPointList& aValue, nsSVGElement* aElement);
|
||||
nsresult SetAnimValue(const SVGPointList& aValue, dom::SVGElement* aElement);
|
||||
|
||||
void ClearAnimValue(nsSVGElement* aElement);
|
||||
void ClearAnimValue(dom::SVGElement* aElement);
|
||||
|
||||
/**
|
||||
* Needed for correct DOM wrapper construction since GetAnimValue may
|
||||
|
@ -77,7 +77,7 @@ class SVGAnimatedPointList {
|
|||
|
||||
bool IsAnimating() const { return !!mAnimVal; }
|
||||
|
||||
UniquePtr<nsISMILAttr> ToSMILAttr(nsSVGElement* aElement);
|
||||
UniquePtr<nsISMILAttr> ToSMILAttr(dom::SVGElement* aElement);
|
||||
|
||||
private:
|
||||
// mAnimVal is a pointer to allow us to determine if we're being animated or
|
||||
|
@ -90,14 +90,14 @@ class SVGAnimatedPointList {
|
|||
|
||||
struct SMILAnimatedPointList : public nsISMILAttr {
|
||||
public:
|
||||
SMILAnimatedPointList(SVGAnimatedPointList* aVal, nsSVGElement* aElement)
|
||||
SMILAnimatedPointList(SVGAnimatedPointList* aVal, dom::SVGElement* aElement)
|
||||
: mVal(aVal), mElement(aElement) {}
|
||||
|
||||
// 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.
|
||||
SVGAnimatedPointList* mVal;
|
||||
nsSVGElement* mElement;
|
||||
dom::SVGElement* mElement;
|
||||
|
||||
// nsISMILAttr methods
|
||||
virtual nsresult ValueFromString(
|
||||
|
|
|
@ -79,8 +79,7 @@ DOMSVGAnimatedPreserveAspectRatio::AnimVal() {
|
|||
}
|
||||
|
||||
nsresult SVGAnimatedPreserveAspectRatio::SetBaseValueString(
|
||||
const nsAString& aValueAsString, nsSVGElement* aSVGElement,
|
||||
bool aDoSetAttr) {
|
||||
const nsAString& aValueAsString, SVGElement* aSVGElement, bool aDoSetAttr) {
|
||||
SVGPreserveAspectRatio val;
|
||||
nsresult res = SVGPreserveAspectRatio::FromString(aValueAsString, &val);
|
||||
if (NS_FAILED(res)) {
|
||||
|
@ -113,7 +112,7 @@ void SVGAnimatedPreserveAspectRatio::GetBaseValueString(
|
|||
}
|
||||
|
||||
void SVGAnimatedPreserveAspectRatio::SetBaseValue(
|
||||
const SVGPreserveAspectRatio& aValue, nsSVGElement* aSVGElement) {
|
||||
const SVGPreserveAspectRatio& aValue, SVGElement* aSVGElement) {
|
||||
if (mIsBaseSet && mBaseVal == aValue) {
|
||||
return;
|
||||
}
|
||||
|
@ -141,7 +140,7 @@ static uint64_t PackPreserveAspectRatio(const SVGPreserveAspectRatio& par) {
|
|||
}
|
||||
|
||||
void SVGAnimatedPreserveAspectRatio::SetAnimValue(uint64_t aPackedValue,
|
||||
nsSVGElement* aSVGElement) {
|
||||
SVGElement* aSVGElement) {
|
||||
if (mIsAnimated && PackPreserveAspectRatio(mAnimVal) == aPackedValue) {
|
||||
return;
|
||||
}
|
||||
|
@ -153,7 +152,7 @@ void SVGAnimatedPreserveAspectRatio::SetAnimValue(uint64_t aPackedValue,
|
|||
|
||||
already_AddRefed<DOMSVGAnimatedPreserveAspectRatio>
|
||||
SVGAnimatedPreserveAspectRatio::ToDOMAnimatedPreserveAspectRatio(
|
||||
nsSVGElement* aSVGElement) {
|
||||
SVGElement* aSVGElement) {
|
||||
RefPtr<DOMSVGAnimatedPreserveAspectRatio> domAnimatedPAspectRatio =
|
||||
sSVGAnimatedPAspectRatioTearoffTable.GetTearoff(this);
|
||||
if (!domAnimatedPAspectRatio) {
|
||||
|
@ -170,7 +169,7 @@ DOMSVGAnimatedPreserveAspectRatio::~DOMSVGAnimatedPreserveAspectRatio() {
|
|||
}
|
||||
|
||||
UniquePtr<nsISMILAttr> SVGAnimatedPreserveAspectRatio::ToSMILAttr(
|
||||
nsSVGElement* aSVGElement) {
|
||||
SVGElement* aSVGElement) {
|
||||
return MakeUnique<SMILPreserveAspectRatio>(this, aSVGElement);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsError.h"
|
||||
#include "nsISMILAttr.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "SVGPreserveAspectRatio.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/UniquePtr.h"
|
||||
|
@ -36,12 +36,12 @@ class SVGAnimatedPreserveAspectRatio final {
|
|||
}
|
||||
|
||||
nsresult SetBaseValueString(const nsAString& aValue,
|
||||
nsSVGElement* aSVGElement, bool aDoSetAttr);
|
||||
dom::SVGElement* aSVGElement, bool aDoSetAttr);
|
||||
void GetBaseValueString(nsAString& aValue) const;
|
||||
|
||||
void SetBaseValue(const SVGPreserveAspectRatio& aValue,
|
||||
nsSVGElement* aSVGElement);
|
||||
nsresult SetBaseAlign(uint16_t aAlign, nsSVGElement* aSVGElement) {
|
||||
dom::SVGElement* aSVGElement);
|
||||
nsresult SetBaseAlign(uint16_t aAlign, dom::SVGElement* aSVGElement) {
|
||||
if (aAlign < SVG_ALIGN_MIN_VALID || aAlign > SVG_ALIGN_MAX_VALID) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ class SVGAnimatedPreserveAspectRatio final {
|
|||
return NS_OK;
|
||||
}
|
||||
nsresult SetBaseMeetOrSlice(uint16_t aMeetOrSlice,
|
||||
nsSVGElement* aSVGElement) {
|
||||
dom::SVGElement* aSVGElement) {
|
||||
if (aMeetOrSlice < SVG_MEETORSLICE_MIN_VALID ||
|
||||
aMeetOrSlice > SVG_MEETORSLICE_MAX_VALID) {
|
||||
return NS_ERROR_FAILURE;
|
||||
|
@ -59,7 +59,7 @@ class SVGAnimatedPreserveAspectRatio final {
|
|||
aSVGElement);
|
||||
return NS_OK;
|
||||
}
|
||||
void SetAnimValue(uint64_t aPackedValue, nsSVGElement* aSVGElement);
|
||||
void SetAnimValue(uint64_t aPackedValue, dom::SVGElement* aSVGElement);
|
||||
|
||||
const SVGPreserveAspectRatio& GetBaseValue() const { return mBaseVal; }
|
||||
const SVGPreserveAspectRatio& GetAnimValue() const { return mAnimVal; }
|
||||
|
@ -67,8 +67,8 @@ class SVGAnimatedPreserveAspectRatio final {
|
|||
bool IsExplicitlySet() const { return mIsAnimated || mIsBaseSet; }
|
||||
|
||||
already_AddRefed<mozilla::dom::DOMSVGAnimatedPreserveAspectRatio>
|
||||
ToDOMAnimatedPreserveAspectRatio(nsSVGElement* aSVGElement);
|
||||
UniquePtr<nsISMILAttr> ToSMILAttr(nsSVGElement* aSVGElement);
|
||||
ToDOMAnimatedPreserveAspectRatio(dom::SVGElement* aSVGElement);
|
||||
UniquePtr<nsISMILAttr> ToSMILAttr(dom::SVGElement* aSVGElement);
|
||||
|
||||
private:
|
||||
SVGPreserveAspectRatio mAnimVal;
|
||||
|
@ -80,14 +80,14 @@ class SVGAnimatedPreserveAspectRatio final {
|
|||
struct SMILPreserveAspectRatio final : public nsISMILAttr {
|
||||
public:
|
||||
SMILPreserveAspectRatio(SVGAnimatedPreserveAspectRatio* aVal,
|
||||
nsSVGElement* aSVGElement)
|
||||
dom::SVGElement* aSVGElement)
|
||||
: mVal(aVal), mSVGElement(aSVGElement) {}
|
||||
|
||||
// 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.
|
||||
SVGAnimatedPreserveAspectRatio* mVal;
|
||||
nsSVGElement* mSVGElement;
|
||||
dom::SVGElement* mSVGElement;
|
||||
|
||||
// nsISMILAttr methods
|
||||
virtual nsresult ValueFromString(
|
||||
|
@ -109,11 +109,11 @@ class DOMSVGAnimatedPreserveAspectRatio final : public nsISupports,
|
|||
DOMSVGAnimatedPreserveAspectRatio)
|
||||
|
||||
DOMSVGAnimatedPreserveAspectRatio(SVGAnimatedPreserveAspectRatio* aVal,
|
||||
nsSVGElement* aSVGElement)
|
||||
dom::SVGElement* aSVGElement)
|
||||
: mVal(aVal), mSVGElement(aSVGElement) {}
|
||||
|
||||
// WebIDL
|
||||
nsSVGElement* GetParentObject() const { return mSVGElement; }
|
||||
dom::SVGElement* GetParentObject() const { return mSVGElement; }
|
||||
virtual JSObject* WrapObject(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aGivenProto) override;
|
||||
|
||||
|
@ -124,7 +124,7 @@ class DOMSVGAnimatedPreserveAspectRatio final : public nsISupports,
|
|||
protected:
|
||||
// kept alive because it belongs to content:
|
||||
SVGAnimatedPreserveAspectRatio* mVal;
|
||||
RefPtr<nsSVGElement> mSVGElement;
|
||||
RefPtr<dom::SVGElement> mSVGElement;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include "SVGAnimatedRect.h"
|
||||
#include "mozilla/dom/SVGAnimatedRectBinding.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "nsSVGViewBox.h"
|
||||
#include "SVGIRect.h"
|
||||
|
||||
|
@ -18,7 +18,7 @@ NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGAnimatedRect, mSVGElement)
|
|||
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(SVGAnimatedRect, AddRef)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(SVGAnimatedRect, Release)
|
||||
|
||||
SVGAnimatedRect::SVGAnimatedRect(nsSVGViewBox* aVal, nsSVGElement* aSVGElement)
|
||||
SVGAnimatedRect::SVGAnimatedRect(nsSVGViewBox* aVal, SVGElement* aSVGElement)
|
||||
: mVal(aVal), mSVGElement(aSVGElement) {}
|
||||
|
||||
SVGAnimatedRect::~SVGAnimatedRect() {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
#include "nsWrapperCache.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
|
||||
class nsSVGViewBox;
|
||||
|
||||
|
@ -24,9 +24,9 @@ class SVGAnimatedRect final : public nsWrapperCache {
|
|||
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(SVGAnimatedRect)
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(SVGAnimatedRect)
|
||||
|
||||
SVGAnimatedRect(nsSVGViewBox* aVal, nsSVGElement* aSVGElement);
|
||||
SVGAnimatedRect(nsSVGViewBox* aVal, SVGElement* aSVGElement);
|
||||
|
||||
nsSVGElement* GetParentObject() const { return mSVGElement; }
|
||||
SVGElement* GetParentObject() const { return mSVGElement; }
|
||||
|
||||
virtual JSObject* WrapObject(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aGivenProto) override;
|
||||
|
@ -39,7 +39,7 @@ class SVGAnimatedRect final : public nsWrapperCache {
|
|||
virtual ~SVGAnimatedRect();
|
||||
|
||||
nsSVGViewBox* mVal; // kept alive because it belongs to content
|
||||
RefPtr<nsSVGElement> mSVGElement;
|
||||
RefPtr<SVGElement> mSVGElement;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
|
@ -7,27 +7,27 @@
|
|||
#ifndef mozilla_dom_SVGAnimatedString_h
|
||||
#define mozilla_dom_SVGAnimatedString_h
|
||||
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class SVGAnimatedString : public nsISupports, public nsWrapperCache {
|
||||
public:
|
||||
explicit SVGAnimatedString(nsSVGElement* aSVGElement)
|
||||
explicit SVGAnimatedString(SVGElement* aSVGElement)
|
||||
: mSVGElement(aSVGElement) {}
|
||||
|
||||
virtual JSObject* WrapObject(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aGivenProto) override;
|
||||
|
||||
// WebIDL
|
||||
nsSVGElement* GetParentObject() const { return mSVGElement; }
|
||||
SVGElement* GetParentObject() const { return mSVGElement; }
|
||||
|
||||
virtual void GetBaseVal(nsAString& aResult) = 0;
|
||||
virtual void SetBaseVal(const nsAString& aValue) = 0;
|
||||
virtual void GetAnimVal(nsAString& aResult) = 0;
|
||||
|
||||
RefPtr<nsSVGElement> mSVGElement;
|
||||
RefPtr<SVGElement> mSVGElement;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
|
@ -47,7 +47,7 @@ already_AddRefed<DOMSVGTransformList> SVGAnimatedTransformList::AnimVal() {
|
|||
|
||||
/* static */ already_AddRefed<SVGAnimatedTransformList>
|
||||
SVGAnimatedTransformList::GetDOMWrapper(nsSVGAnimatedTransformList* aList,
|
||||
nsSVGElement* aElement) {
|
||||
SVGElement* aElement) {
|
||||
RefPtr<SVGAnimatedTransformList> wrapper =
|
||||
sSVGAnimatedTransformListTearoffTable.GetTearoff(aList);
|
||||
if (!wrapper) {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "nsAutoPtr.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "nsWrapperCache.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
|
@ -56,7 +56,7 @@ class SVGAnimatedTransformList final : public nsWrapperCache {
|
|||
* SVGAnimatedTransformList being returned.
|
||||
*/
|
||||
static already_AddRefed<SVGAnimatedTransformList> GetDOMWrapper(
|
||||
nsSVGAnimatedTransformList* aList, nsSVGElement* aElement);
|
||||
nsSVGAnimatedTransformList* aList, SVGElement* aElement);
|
||||
|
||||
/**
|
||||
* This method returns the SVGAnimatedTransformList wrapper for an internal
|
||||
|
@ -88,7 +88,7 @@ class SVGAnimatedTransformList final : public nsWrapperCache {
|
|||
bool IsAnimating() const;
|
||||
|
||||
// WebIDL
|
||||
nsSVGElement* GetParentObject() const { return mElement; }
|
||||
SVGElement* GetParentObject() const { return mElement; }
|
||||
virtual JSObject* WrapObject(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aGivenProto) override;
|
||||
// These aren't weak refs because mBaseVal and mAnimVal are weak
|
||||
|
@ -100,7 +100,7 @@ class SVGAnimatedTransformList final : public nsWrapperCache {
|
|||
* Only our static GetDOMWrapper() factory method may create objects of our
|
||||
* type.
|
||||
*/
|
||||
explicit SVGAnimatedTransformList(nsSVGElement* aElement)
|
||||
explicit SVGAnimatedTransformList(SVGElement* aElement)
|
||||
: mBaseVal(nullptr), mAnimVal(nullptr), mElement(aElement) {}
|
||||
|
||||
~SVGAnimatedTransformList();
|
||||
|
@ -117,7 +117,7 @@ class SVGAnimatedTransformList final : public nsWrapperCache {
|
|||
|
||||
// Strong ref to our element to keep it alive. We hold this not only for
|
||||
// ourself, but also for our base/animVal and all of their items.
|
||||
RefPtr<nsSVGElement> mElement;
|
||||
RefPtr<SVGElement> mElement;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
|
@ -87,13 +87,13 @@ nsSMILTimedElement& SVGAnimationElement::TimedElement() {
|
|||
return mTimedElement;
|
||||
}
|
||||
|
||||
nsSVGElement* SVGAnimationElement::GetTargetElement() {
|
||||
SVGElement* SVGAnimationElement::GetTargetElement() {
|
||||
FlushAnimations();
|
||||
|
||||
// We'll just call the other GetTargetElement method, and QI to the right type
|
||||
nsIContent* target = GetTargetElementContent();
|
||||
|
||||
return (target && target->IsSVGElement()) ? static_cast<nsSVGElement*>(target)
|
||||
return (target && target->IsSVGElement()) ? static_cast<SVGElement*>(target)
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,13 +11,13 @@
|
|||
#include "mozilla/dom/IDTracker.h"
|
||||
#include "mozilla/dom/SVGTests.h"
|
||||
#include "nsSMILTimedElement.h"
|
||||
#include "nsSVGElement.h"
|
||||
|
||||
typedef nsSVGElement SVGAnimationElementBase;
|
||||
#include "SVGElement.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
typedef SVGElement SVGAnimationElementBase;
|
||||
|
||||
enum nsSMILTargetAttrType {
|
||||
eSMILTargetAttrType_auto,
|
||||
eSMILTargetAttrType_CSS,
|
||||
|
@ -71,7 +71,7 @@ class SVGAnimationElement : public SVGAnimationElementBase, public SVGTests {
|
|||
void ActivateByHyperlink();
|
||||
|
||||
// WebIDL
|
||||
nsSVGElement* GetTargetElement();
|
||||
SVGElement* GetTargetElement();
|
||||
float GetStartTime(ErrorResult& rv);
|
||||
float GetCurrentTime();
|
||||
float GetSimpleDuration(ErrorResult& rv);
|
||||
|
@ -81,10 +81,10 @@ class SVGAnimationElement : public SVGAnimationElementBase, public SVGTests {
|
|||
void EndElementAt(float offset, ErrorResult& rv);
|
||||
|
||||
// SVGTests
|
||||
nsSVGElement* AsSVGElement() final { return this; }
|
||||
SVGElement* AsSVGElement() final { return this; }
|
||||
|
||||
protected:
|
||||
// nsSVGElement overrides
|
||||
// SVGElement overrides
|
||||
|
||||
void UpdateHrefTarget(const nsAString& aHrefStr);
|
||||
void AnimationTargetChanged();
|
||||
|
|
|
@ -22,7 +22,7 @@ JSObject* SVGCircleElement::WrapNode(JSContext* aCx,
|
|||
return SVGCircleElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
nsSVGElement::LengthInfo SVGCircleElement::sLengthInfo[3] = {
|
||||
SVGElement::LengthInfo SVGCircleElement::sLengthInfo[3] = {
|
||||
{nsGkAtoms::cx, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
|
||||
SVGContentUtils::X},
|
||||
{nsGkAtoms::cy, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
|
||||
|
@ -57,14 +57,14 @@ already_AddRefed<SVGAnimatedLength> SVGCircleElement::R() {
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
/* virtual */ bool SVGCircleElement::HasValidDimensions() const {
|
||||
return mLengthAttributes[ATTR_R].IsExplicitlySet() &&
|
||||
mLengthAttributes[ATTR_R].GetAnimValInSpecifiedUnits() > 0;
|
||||
}
|
||||
|
||||
nsSVGElement::LengthAttributesInfo SVGCircleElement::GetLengthInfo() {
|
||||
SVGElement::LengthAttributesInfo SVGCircleElement::GetLengthInfo() {
|
||||
return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
|
||||
ArrayLength(sLengthInfo));
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ JSObject* SVGClipPathElement::WrapNode(JSContext* aCx,
|
|||
return SVGClipPathElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
nsSVGElement::EnumInfo SVGClipPathElement::sEnumInfo[1] = {
|
||||
SVGElement::EnumInfo SVGClipPathElement::sEnumInfo[1] = {
|
||||
{nsGkAtoms::clipPathUnits, sSVGUnitTypesMap, SVG_UNIT_TYPE_USERSPACEONUSE}};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -37,7 +37,7 @@ already_AddRefed<SVGAnimatedEnumeration> SVGClipPathElement::ClipPathUnits() {
|
|||
return mEnumAttributes[CLIPPATHUNITS].ToDOMAnimatedEnum(this);
|
||||
}
|
||||
|
||||
nsSVGElement::EnumAttributesInfo SVGClipPathElement::GetEnumInfo() {
|
||||
SVGElement::EnumAttributesInfo SVGClipPathElement::GetEnumInfo() {
|
||||
return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ using namespace mozilla::gfx;
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
SVGSVGElement* SVGContentUtils::GetOuterSVGElement(nsSVGElement* aSVGElement) {
|
||||
SVGSVGElement* SVGContentUtils::GetOuterSVGElement(SVGElement* aSVGElement) {
|
||||
Element* element = nullptr;
|
||||
Element* ancestor = aSVGElement->GetParentElementCrossingShadowRoot();
|
||||
|
||||
|
@ -70,7 +70,7 @@ enum DashState {
|
|||
};
|
||||
|
||||
static DashState GetStrokeDashData(
|
||||
SVGContentUtils::AutoStrokeOptions* aStrokeOptions, nsSVGElement* aElement,
|
||||
SVGContentUtils::AutoStrokeOptions* aStrokeOptions, SVGElement* aElement,
|
||||
const nsStyleSVG* aStyleSVG, SVGContextPaint* aContextPaint) {
|
||||
size_t dashArrayLength;
|
||||
Float totalLengthOfDashes = 0.0, totalLengthOfGaps = 0.0;
|
||||
|
@ -165,7 +165,7 @@ static DashState GetStrokeDashData(
|
|||
}
|
||||
|
||||
void SVGContentUtils::GetStrokeOptions(AutoStrokeOptions* aStrokeOptions,
|
||||
nsSVGElement* aElement,
|
||||
SVGElement* aElement,
|
||||
ComputedStyle* aComputedStyle,
|
||||
SVGContextPaint* aContextPaint,
|
||||
StrokeOptionFlags aFlags) {
|
||||
|
@ -237,7 +237,7 @@ void SVGContentUtils::GetStrokeOptions(AutoStrokeOptions* aStrokeOptions,
|
|||
}
|
||||
}
|
||||
|
||||
Float SVGContentUtils::GetStrokeWidth(nsSVGElement* aElement,
|
||||
Float SVGContentUtils::GetStrokeWidth(SVGElement* aElement,
|
||||
ComputedStyle* aComputedStyle,
|
||||
SVGContextPaint* aContextPaint) {
|
||||
RefPtr<ComputedStyle> computedStyle;
|
||||
|
@ -378,16 +378,16 @@ SVGViewportElement* SVGContentUtils::GetNearestViewportElement(
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
static gfx::Matrix GetCTMInternal(nsSVGElement* aElement, bool aScreenCTM,
|
||||
static gfx::Matrix GetCTMInternal(SVGElement* aElement, bool aScreenCTM,
|
||||
bool aHaveRecursed) {
|
||||
gfxMatrix matrix = aElement->PrependLocalTransformsTo(
|
||||
gfxMatrix(), aHaveRecursed ? eAllTransforms : eUserSpaceToParent);
|
||||
nsSVGElement* element = aElement;
|
||||
SVGElement* element = aElement;
|
||||
nsIContent* ancestor = aElement->GetFlattenedTreeParent();
|
||||
|
||||
while (ancestor && ancestor->IsSVGElement() &&
|
||||
!ancestor->IsSVGElement(nsGkAtoms::foreignObject)) {
|
||||
element = static_cast<nsSVGElement*>(ancestor);
|
||||
element = static_cast<SVGElement*>(ancestor);
|
||||
matrix *= element->PrependLocalTransformsTo(gfxMatrix()); // i.e. *A*ppend
|
||||
if (!aScreenCTM && SVGContentUtils::EstablishesViewport(element)) {
|
||||
if (!element->NodeInfo()->Equals(nsGkAtoms::svg, kNameSpaceID_SVG) &&
|
||||
|
@ -422,7 +422,7 @@ static gfx::Matrix GetCTMInternal(nsSVGElement* aElement, bool aScreenCTM,
|
|||
}
|
||||
if (ancestor->IsSVGElement()) {
|
||||
return gfx::ToMatrix(matrix) *
|
||||
GetCTMInternal(static_cast<nsSVGElement*>(ancestor), true, true);
|
||||
GetCTMInternal(static_cast<SVGElement*>(ancestor), true, true);
|
||||
}
|
||||
|
||||
// XXX this does not take into account CSS transform, or that the non-SVG
|
||||
|
@ -445,7 +445,7 @@ static gfx::Matrix GetCTMInternal(nsSVGElement* aElement, bool aScreenCTM,
|
|||
return ToMatrix(matrix).PostTranslate(x, y);
|
||||
}
|
||||
|
||||
gfx::Matrix SVGContentUtils::GetCTM(nsSVGElement* aElement, bool aScreenCTM) {
|
||||
gfx::Matrix SVGContentUtils::GetCTM(SVGElement* aElement, bool aScreenCTM) {
|
||||
return GetCTMInternal(aElement, aScreenCTM, false);
|
||||
}
|
||||
|
||||
|
@ -763,7 +763,7 @@ bool SVGContentUtils::ParseInteger(const nsAString& aString, int32_t& aValue) {
|
|||
return ParseInteger(iter, end, aValue) && iter == end;
|
||||
}
|
||||
|
||||
float SVGContentUtils::CoordToFloat(nsSVGElement* aContent,
|
||||
float SVGContentUtils::CoordToFloat(SVGElement* aContent,
|
||||
const nsStyleCoord& aCoord) {
|
||||
switch (aCoord.GetUnit()) {
|
||||
case eStyleUnit_Factor:
|
||||
|
|
|
@ -22,7 +22,6 @@ class nsIDocument;
|
|||
class nsIFrame;
|
||||
class nsPresContext;
|
||||
class nsStyleCoord;
|
||||
class nsSVGElement;
|
||||
|
||||
namespace mozilla {
|
||||
class ComputedStyle;
|
||||
|
@ -32,6 +31,7 @@ class SVGContextPaint;
|
|||
class SVGPreserveAspectRatio;
|
||||
namespace dom {
|
||||
class Element;
|
||||
class SVGElement;
|
||||
class SVGSVGElement;
|
||||
class SVGViewportElement;
|
||||
} // namespace dom
|
||||
|
@ -81,7 +81,7 @@ class SVGContentUtils {
|
|||
/*
|
||||
* Get the outer SVG element of an nsIContent
|
||||
*/
|
||||
static dom::SVGSVGElement* GetOuterSVGElement(nsSVGElement* aSVGElement);
|
||||
static dom::SVGSVGElement* GetOuterSVGElement(dom::SVGElement* aSVGElement);
|
||||
|
||||
/**
|
||||
* Activates the animation element aContent as a result of navigation to the
|
||||
|
@ -148,7 +148,7 @@ class SVGContentUtils {
|
|||
* whether or not the stroke is dashed.
|
||||
*/
|
||||
static void GetStrokeOptions(AutoStrokeOptions* aStrokeOptions,
|
||||
nsSVGElement* aElement,
|
||||
dom::SVGElement* aElement,
|
||||
ComputedStyle* aComputedStyle,
|
||||
mozilla::SVGContextPaint* aContextPaint,
|
||||
StrokeOptionFlags aFlags = eAllStrokeOptions);
|
||||
|
@ -162,7 +162,7 @@ class SVGContentUtils {
|
|||
* and 'stroke-opacity' properties to, say, return zero if they are "none" or
|
||||
* "0", respectively.
|
||||
*/
|
||||
static Float GetStrokeWidth(nsSVGElement* aElement,
|
||||
static Float GetStrokeWidth(dom::SVGElement* aElement,
|
||||
ComputedStyle* aComputedStyle,
|
||||
mozilla::SVGContextPaint* aContextPaint);
|
||||
|
||||
|
@ -194,7 +194,7 @@ class SVGContentUtils {
|
|||
const char16_t** aParams,
|
||||
uint32_t aParamsLength);
|
||||
|
||||
static Matrix GetCTM(nsSVGElement* aElement, bool aScreenCTM);
|
||||
static Matrix GetCTM(dom::SVGElement* aElement, bool aScreenCTM);
|
||||
|
||||
/**
|
||||
* Gets the tight bounds-space stroke bounds of the non-scaling-stroked rect
|
||||
|
@ -321,7 +321,8 @@ class SVGContentUtils {
|
|||
* Factor (straight userspace), Coord (dimensioned), and Percent (of
|
||||
* aContent's SVG viewport)
|
||||
*/
|
||||
static float CoordToFloat(nsSVGElement* aContent, const nsStyleCoord& aCoord);
|
||||
static float CoordToFloat(dom::SVGElement* aContent,
|
||||
const nsStyleCoord& aCoord);
|
||||
/**
|
||||
* Parse the SVG path string
|
||||
* Returns a path
|
||||
|
|
|
@ -8,16 +8,16 @@
|
|||
#define mozilla_dom_SVGDescElement_h
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
|
||||
nsresult NS_NewSVGDescElement(
|
||||
nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
||||
|
||||
typedef nsSVGElement SVGDescElementBase;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
typedef SVGElement SVGDescElementBase;
|
||||
|
||||
class SVGDescElement final : public SVGDescElementBase {
|
||||
protected:
|
||||
friend nsresult(::NS_NewSVGDescElement(
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "nsString.h"
|
||||
#include "nsLiteralString.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "mozilla/StyleSheet.h"
|
||||
#include "mozilla/StyleSheetInlines.h"
|
||||
|
||||
|
|
|
@ -10,14 +10,13 @@
|
|||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/dom/XMLDocument.h"
|
||||
|
||||
class nsSVGElement;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class SVGContextPaint;
|
||||
|
||||
namespace dom {
|
||||
|
||||
class SVGElement;
|
||||
class SVGForeignObjectElement;
|
||||
|
||||
class SVGDocument final : public XMLDocument {
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -8,7 +8,7 @@
|
|||
#define __NS_SVGELEMENT_H__
|
||||
|
||||
/*
|
||||
nsSVGElement is the base class for all SVG content elements.
|
||||
SVGElement is the base class for all SVG content elements.
|
||||
It implements all the common DOM interfaces and handles attributes.
|
||||
*/
|
||||
|
||||
|
@ -38,15 +38,14 @@ class nsSVGNumberPair;
|
|||
class nsSVGString;
|
||||
class nsSVGViewBox;
|
||||
|
||||
struct nsSVGEnumMapping;
|
||||
|
||||
nsresult NS_NewSVGElement(mozilla::dom::Element** aResult,
|
||||
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
||||
|
||||
namespace mozilla {
|
||||
class DeclarationBlock;
|
||||
|
||||
namespace dom {
|
||||
class SVGSVGElement;
|
||||
class SVGViewportElement;
|
||||
|
||||
} // namespace dom
|
||||
|
||||
class SVGAnimatedNumberList;
|
||||
class SVGNumberList;
|
||||
class SVGAnimatedLengthList;
|
||||
|
@ -58,21 +57,21 @@ class nsSVGAnimatedTransformList;
|
|||
class SVGStringList;
|
||||
class DOMSVGStringList;
|
||||
|
||||
} // namespace mozilla
|
||||
namespace dom {
|
||||
class SVGSVGElement;
|
||||
class SVGViewportElement;
|
||||
|
||||
struct nsSVGEnumMapping;
|
||||
typedef nsStyledElement SVGElementBase;
|
||||
|
||||
typedef nsStyledElement nsSVGElementBase;
|
||||
|
||||
class nsSVGElement : public nsSVGElementBase // nsIContent
|
||||
class SVGElement : public SVGElementBase // nsIContent
|
||||
{
|
||||
protected:
|
||||
explicit nsSVGElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
||||
friend nsresult NS_NewSVGElement(
|
||||
mozilla::dom::Element** aResult,
|
||||
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
||||
explicit SVGElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
||||
friend nsresult(
|
||||
::NS_NewSVGElement(mozilla::dom::Element** aResult,
|
||||
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
|
||||
nsresult Init();
|
||||
virtual ~nsSVGElement();
|
||||
virtual ~SVGElement();
|
||||
|
||||
public:
|
||||
virtual nsresult Clone(mozilla::dom::NodeInfo*,
|
||||
|
@ -90,7 +89,7 @@ class nsSVGElement : public nsSVGElementBase // nsIContent
|
|||
typedef mozilla::SVGStringList SVGStringList;
|
||||
|
||||
// nsISupports
|
||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(nsSVGElement, nsSVGElementBase)
|
||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(SVGElement, SVGElementBase)
|
||||
|
||||
void DidAnimateClass();
|
||||
|
||||
|
@ -125,7 +124,7 @@ class nsSVGElement : public nsSVGElementBase // nsIContent
|
|||
static const MappedAttributeEntry sLightingEffectsMap[];
|
||||
static const MappedAttributeEntry sMaskMap[];
|
||||
|
||||
NS_IMPL_FROMNODE(nsSVGElement, kNameSpaceID_SVG)
|
||||
NS_IMPL_FROMNODE(SVGElement, kNameSpaceID_SVG)
|
||||
|
||||
// Gets the element that establishes the rectangular viewport against which
|
||||
// we should resolve percentage lengths (our "coordinate context"). Returns
|
||||
|
@ -157,7 +156,7 @@ class nsSVGElement : public nsSVGElementBase // nsIContent
|
|||
*/
|
||||
virtual gfxMatrix PrependLocalTransformsTo(
|
||||
const gfxMatrix& aMatrix,
|
||||
mozilla::SVGTransformTypes aWhich = mozilla::eAllTransforms) const;
|
||||
SVGTransformTypes aWhich = eAllTransforms) const;
|
||||
|
||||
// Setter for to set the current <animateMotion> transformation
|
||||
// Only visible for nsSVGGraphicElement, so it's a no-op here, and that
|
||||
|
@ -301,7 +300,7 @@ class nsSVGElement : public nsSVGElementBase // nsIContent
|
|||
|
||||
// WebIDL
|
||||
mozilla::dom::SVGSVGElement* GetOwnerSVGElement();
|
||||
nsSVGElement* GetViewportElement();
|
||||
SVGElement* GetViewportElement();
|
||||
already_AddRefed<mozilla::dom::SVGAnimatedString> ClassName();
|
||||
|
||||
void UpdateContentDeclarationBlock();
|
||||
|
@ -315,7 +314,7 @@ class nsSVGElement : public nsSVGElementBase // nsIContent
|
|||
// by SVG elements.
|
||||
// This is because we're not currently passing the correct value for aValue to
|
||||
// BeforeSetAttr since it would involve allocating extra SVG value types.
|
||||
// See the comment in nsSVGElement::WillChangeValue.
|
||||
// See the comment in SVGElement::WillChangeValue.
|
||||
nsresult BeforeSetAttr(int32_t aNamespaceID, nsAtom* aName,
|
||||
const nsAttrValueOrString* aValue, bool aNotify) final;
|
||||
virtual nsresult AfterSetAttr(int32_t aNamespaceID, nsAtom* aName,
|
||||
|
@ -479,7 +478,7 @@ class nsSVGElement : public nsSVGElementBase // nsIContent
|
|||
void Reset(uint8_t aAttrEnum);
|
||||
};
|
||||
|
||||
friend class nsSVGEnum;
|
||||
friend class ::nsSVGEnum;
|
||||
|
||||
struct EnumInfo {
|
||||
nsStaticAtom* const mName;
|
||||
|
@ -697,4 +696,7 @@ class nsSVGElement : public nsSVGElementBase // nsIContent
|
|||
NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER \
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_END
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // __NS_SVGELEMENT_H__
|
|
@ -23,7 +23,7 @@ JSObject* SVGEllipseElement::WrapNode(JSContext* aCx,
|
|||
return SVGEllipseElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
nsSVGElement::LengthInfo SVGEllipseElement::sLengthInfo[4] = {
|
||||
SVGElement::LengthInfo SVGEllipseElement::sLengthInfo[4] = {
|
||||
{nsGkAtoms::cx, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
|
||||
SVGContentUtils::X},
|
||||
{nsGkAtoms::cy, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
|
||||
|
@ -66,7 +66,7 @@ already_AddRefed<SVGAnimatedLength> SVGEllipseElement::Ry() {
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
/* virtual */ bool SVGEllipseElement::HasValidDimensions() const {
|
||||
return mLengthAttributes[RX].IsExplicitlySet() &&
|
||||
|
@ -75,7 +75,7 @@ already_AddRefed<SVGAnimatedLength> SVGEllipseElement::Ry() {
|
|||
mLengthAttributes[RY].GetAnimValInSpecifiedUnits() > 0;
|
||||
}
|
||||
|
||||
nsSVGElement::LengthAttributesInfo SVGEllipseElement::GetLengthInfo() {
|
||||
SVGElement::LengthAttributesInfo SVGEllipseElement::GetLengthInfo() {
|
||||
return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
|
||||
ArrayLength(sLengthInfo));
|
||||
}
|
||||
|
|
|
@ -39,10 +39,10 @@ nsSVGEnumMapping SVGFEBlendElement::sModeMap[] = {
|
|||
{nsGkAtoms::luminosity, SVG_FEBLEND_MODE_LUMINOSITY},
|
||||
{nullptr, 0}};
|
||||
|
||||
nsSVGElement::EnumInfo SVGFEBlendElement::sEnumInfo[1] = {
|
||||
SVGElement::EnumInfo SVGFEBlendElement::sEnumInfo[1] = {
|
||||
{nsGkAtoms::mode, sModeMap, SVG_FEBLEND_MODE_NORMAL}};
|
||||
|
||||
nsSVGElement::StringInfo SVGFEBlendElement::sStringInfo[3] = {
|
||||
SVGElement::StringInfo SVGFEBlendElement::sStringInfo[3] = {
|
||||
{nsGkAtoms::result, kNameSpaceID_None, true},
|
||||
{nsGkAtoms::in, kNameSpaceID_None, true},
|
||||
{nsGkAtoms::in2, kNameSpaceID_None, true}};
|
||||
|
@ -93,13 +93,13 @@ void SVGFEBlendElement::GetSourceImageNames(
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
nsSVGElement::EnumAttributesInfo SVGFEBlendElement::GetEnumInfo() {
|
||||
SVGElement::EnumAttributesInfo SVGFEBlendElement::GetEnumInfo() {
|
||||
return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
|
||||
}
|
||||
|
||||
nsSVGElement::StringAttributesInfo SVGFEBlendElement::GetStringInfo() {
|
||||
SVGElement::StringAttributesInfo SVGFEBlendElement::GetStringInfo() {
|
||||
return StringAttributesInfo(mStringAttributes, sStringInfo,
|
||||
ArrayLength(sStringInfo));
|
||||
}
|
||||
|
|
|
@ -30,14 +30,14 @@ nsSVGEnumMapping SVGFEColorMatrixElement::sTypeMap[] = {
|
|||
{nsGkAtoms::luminanceToAlpha, SVG_FECOLORMATRIX_TYPE_LUMINANCE_TO_ALPHA},
|
||||
{nullptr, 0}};
|
||||
|
||||
nsSVGElement::EnumInfo SVGFEColorMatrixElement::sEnumInfo[1] = {
|
||||
SVGElement::EnumInfo SVGFEColorMatrixElement::sEnumInfo[1] = {
|
||||
{nsGkAtoms::type, sTypeMap, SVG_FECOLORMATRIX_TYPE_MATRIX}};
|
||||
|
||||
nsSVGElement::StringInfo SVGFEColorMatrixElement::sStringInfo[2] = {
|
||||
SVGElement::StringInfo SVGFEColorMatrixElement::sStringInfo[2] = {
|
||||
{nsGkAtoms::result, kNameSpaceID_None, true},
|
||||
{nsGkAtoms::in, kNameSpaceID_None, true}};
|
||||
|
||||
nsSVGElement::NumberListInfo SVGFEColorMatrixElement::sNumberListInfo[1] = {
|
||||
SVGElement::NumberListInfo SVGFEColorMatrixElement::sNumberListInfo[1] = {
|
||||
{nsGkAtoms::values}};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -107,18 +107,18 @@ bool SVGFEColorMatrixElement::AttributeAffectsRendering(
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
nsSVGElement::EnumAttributesInfo SVGFEColorMatrixElement::GetEnumInfo() {
|
||||
SVGElement::EnumAttributesInfo SVGFEColorMatrixElement::GetEnumInfo() {
|
||||
return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
|
||||
}
|
||||
|
||||
nsSVGElement::StringAttributesInfo SVGFEColorMatrixElement::GetStringInfo() {
|
||||
SVGElement::StringAttributesInfo SVGFEColorMatrixElement::GetStringInfo() {
|
||||
return StringAttributesInfo(mStringAttributes, sStringInfo,
|
||||
ArrayLength(sStringInfo));
|
||||
}
|
||||
|
||||
nsSVGElement::NumberListAttributesInfo
|
||||
SVGElement::NumberListAttributesInfo
|
||||
SVGFEColorMatrixElement::GetNumberListInfo() {
|
||||
return NumberListAttributesInfo(mNumberListAttributes, sNumberListInfo,
|
||||
ArrayLength(sNumberListInfo));
|
||||
|
|
|
@ -23,7 +23,7 @@ JSObject* SVGFEComponentTransferElement::WrapNode(
|
|||
return SVGFEComponentTransferElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
nsSVGElement::StringInfo SVGFEComponentTransferElement::sStringInfo[2] = {
|
||||
SVGElement::StringInfo SVGFEComponentTransferElement::sStringInfo[2] = {
|
||||
{nsGkAtoms::result, kNameSpaceID_None, true},
|
||||
{nsGkAtoms::in, kNameSpaceID_None, true}};
|
||||
|
||||
|
@ -37,9 +37,9 @@ already_AddRefed<SVGAnimatedString> SVGFEComponentTransferElement::In1() {
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
nsSVGElement::StringAttributesInfo
|
||||
SVGElement::StringAttributesInfo
|
||||
SVGFEComponentTransferElement::GetStringInfo() {
|
||||
return StringAttributesInfo(mStringAttributes, sStringInfo,
|
||||
ArrayLength(sStringInfo));
|
||||
|
|
|
@ -19,7 +19,7 @@ JSObject* SVGFECompositeElement::WrapNode(JSContext* aCx,
|
|||
return SVGFECompositeElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
nsSVGElement::NumberInfo SVGFECompositeElement::sNumberInfo[4] = {
|
||||
SVGElement::NumberInfo SVGFECompositeElement::sNumberInfo[4] = {
|
||||
{nsGkAtoms::k1, 0, false},
|
||||
{nsGkAtoms::k2, 0, false},
|
||||
{nsGkAtoms::k3, 0, false},
|
||||
|
@ -34,10 +34,10 @@ nsSVGEnumMapping SVGFECompositeElement::sOperatorMap[] = {
|
|||
{nsGkAtoms::arithmetic, SVG_FECOMPOSITE_OPERATOR_ARITHMETIC},
|
||||
{nullptr, 0}};
|
||||
|
||||
nsSVGElement::EnumInfo SVGFECompositeElement::sEnumInfo[1] = {
|
||||
SVGElement::EnumInfo SVGFECompositeElement::sEnumInfo[1] = {
|
||||
{nsGkAtoms::_operator, sOperatorMap, SVG_FECOMPOSITE_OPERATOR_OVER}};
|
||||
|
||||
nsSVGElement::StringInfo SVGFECompositeElement::sStringInfo[3] = {
|
||||
SVGElement::StringInfo SVGFECompositeElement::sStringInfo[3] = {
|
||||
{nsGkAtoms::result, kNameSpaceID_None, true},
|
||||
{nsGkAtoms::in, kNameSpaceID_None, true},
|
||||
{nsGkAtoms::in2, kNameSpaceID_None, true}};
|
||||
|
@ -117,18 +117,18 @@ void SVGFECompositeElement::GetSourceImageNames(
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
nsSVGElement::NumberAttributesInfo SVGFECompositeElement::GetNumberInfo() {
|
||||
SVGElement::NumberAttributesInfo SVGFECompositeElement::GetNumberInfo() {
|
||||
return NumberAttributesInfo(mNumberAttributes, sNumberInfo,
|
||||
ArrayLength(sNumberInfo));
|
||||
}
|
||||
|
||||
nsSVGElement::EnumAttributesInfo SVGFECompositeElement::GetEnumInfo() {
|
||||
SVGElement::EnumAttributesInfo SVGFECompositeElement::GetEnumInfo() {
|
||||
return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
|
||||
}
|
||||
|
||||
nsSVGElement::StringAttributesInfo SVGFECompositeElement::GetStringInfo() {
|
||||
SVGElement::StringAttributesInfo SVGFECompositeElement::GetStringInfo() {
|
||||
return StringAttributesInfo(mStringAttributes, sStringInfo,
|
||||
ArrayLength(sStringInfo));
|
||||
}
|
||||
|
|
|
@ -24,19 +24,19 @@ JSObject* SVGFEConvolveMatrixElement::WrapNode(
|
|||
return SVGFEConvolveMatrixElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
nsSVGElement::NumberInfo SVGFEConvolveMatrixElement::sNumberInfo[2] = {
|
||||
SVGElement::NumberInfo SVGFEConvolveMatrixElement::sNumberInfo[2] = {
|
||||
{nsGkAtoms::divisor, 1, false}, {nsGkAtoms::bias, 0, false}};
|
||||
|
||||
nsSVGElement::NumberPairInfo SVGFEConvolveMatrixElement::sNumberPairInfo[1] = {
|
||||
SVGElement::NumberPairInfo SVGFEConvolveMatrixElement::sNumberPairInfo[1] = {
|
||||
{nsGkAtoms::kernelUnitLength, 0, 0}};
|
||||
|
||||
nsSVGElement::IntegerInfo SVGFEConvolveMatrixElement::sIntegerInfo[2] = {
|
||||
SVGElement::IntegerInfo SVGFEConvolveMatrixElement::sIntegerInfo[2] = {
|
||||
{nsGkAtoms::targetX, 0}, {nsGkAtoms::targetY, 0}};
|
||||
|
||||
nsSVGElement::IntegerPairInfo SVGFEConvolveMatrixElement::sIntegerPairInfo[1] =
|
||||
{{nsGkAtoms::order, 3, 3}};
|
||||
SVGElement::IntegerPairInfo SVGFEConvolveMatrixElement::sIntegerPairInfo[1] = {
|
||||
{nsGkAtoms::order, 3, 3}};
|
||||
|
||||
nsSVGElement::BooleanInfo SVGFEConvolveMatrixElement::sBooleanInfo[1] = {
|
||||
SVGElement::BooleanInfo SVGFEConvolveMatrixElement::sBooleanInfo[1] = {
|
||||
{nsGkAtoms::preserveAlpha, false}};
|
||||
|
||||
nsSVGEnumMapping SVGFEConvolveMatrixElement::sEdgeModeMap[] = {
|
||||
|
@ -45,14 +45,14 @@ nsSVGEnumMapping SVGFEConvolveMatrixElement::sEdgeModeMap[] = {
|
|||
{nsGkAtoms::none, SVG_EDGEMODE_NONE},
|
||||
{nullptr, 0}};
|
||||
|
||||
nsSVGElement::EnumInfo SVGFEConvolveMatrixElement::sEnumInfo[1] = {
|
||||
SVGElement::EnumInfo SVGFEConvolveMatrixElement::sEnumInfo[1] = {
|
||||
{nsGkAtoms::edgeMode, sEdgeModeMap, SVG_EDGEMODE_DUPLICATE}};
|
||||
|
||||
nsSVGElement::StringInfo SVGFEConvolveMatrixElement::sStringInfo[2] = {
|
||||
SVGElement::StringInfo SVGFEConvolveMatrixElement::sStringInfo[2] = {
|
||||
{nsGkAtoms::result, kNameSpaceID_None, true},
|
||||
{nsGkAtoms::in, kNameSpaceID_None, true}};
|
||||
|
||||
nsSVGElement::NumberListInfo SVGFEConvolveMatrixElement::sNumberListInfo[1] = {
|
||||
SVGElement::NumberListInfo SVGFEConvolveMatrixElement::sNumberListInfo[1] = {
|
||||
{nsGkAtoms::kernelMatrix}};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -221,47 +221,45 @@ bool SVGFEConvolveMatrixElement::AttributeAffectsRendering(
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
nsSVGElement::NumberAttributesInfo SVGFEConvolveMatrixElement::GetNumberInfo() {
|
||||
SVGElement::NumberAttributesInfo SVGFEConvolveMatrixElement::GetNumberInfo() {
|
||||
return NumberAttributesInfo(mNumberAttributes, sNumberInfo,
|
||||
ArrayLength(sNumberInfo));
|
||||
}
|
||||
|
||||
nsSVGElement::NumberPairAttributesInfo
|
||||
SVGElement::NumberPairAttributesInfo
|
||||
SVGFEConvolveMatrixElement::GetNumberPairInfo() {
|
||||
return NumberPairAttributesInfo(mNumberPairAttributes, sNumberPairInfo,
|
||||
ArrayLength(sNumberPairInfo));
|
||||
}
|
||||
|
||||
nsSVGElement::IntegerAttributesInfo
|
||||
SVGFEConvolveMatrixElement::GetIntegerInfo() {
|
||||
SVGElement::IntegerAttributesInfo SVGFEConvolveMatrixElement::GetIntegerInfo() {
|
||||
return IntegerAttributesInfo(mIntegerAttributes, sIntegerInfo,
|
||||
ArrayLength(sIntegerInfo));
|
||||
}
|
||||
|
||||
nsSVGElement::IntegerPairAttributesInfo
|
||||
SVGElement::IntegerPairAttributesInfo
|
||||
SVGFEConvolveMatrixElement::GetIntegerPairInfo() {
|
||||
return IntegerPairAttributesInfo(mIntegerPairAttributes, sIntegerPairInfo,
|
||||
ArrayLength(sIntegerPairInfo));
|
||||
}
|
||||
|
||||
nsSVGElement::BooleanAttributesInfo
|
||||
SVGFEConvolveMatrixElement::GetBooleanInfo() {
|
||||
SVGElement::BooleanAttributesInfo SVGFEConvolveMatrixElement::GetBooleanInfo() {
|
||||
return BooleanAttributesInfo(mBooleanAttributes, sBooleanInfo,
|
||||
ArrayLength(sBooleanInfo));
|
||||
}
|
||||
|
||||
nsSVGElement::EnumAttributesInfo SVGFEConvolveMatrixElement::GetEnumInfo() {
|
||||
SVGElement::EnumAttributesInfo SVGFEConvolveMatrixElement::GetEnumInfo() {
|
||||
return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
|
||||
}
|
||||
|
||||
nsSVGElement::StringAttributesInfo SVGFEConvolveMatrixElement::GetStringInfo() {
|
||||
SVGElement::StringAttributesInfo SVGFEConvolveMatrixElement::GetStringInfo() {
|
||||
return StringAttributesInfo(mStringAttributes, sStringInfo,
|
||||
ArrayLength(sStringInfo));
|
||||
}
|
||||
|
||||
nsSVGElement::NumberListAttributesInfo
|
||||
SVGElement::NumberListAttributesInfo
|
||||
SVGFEConvolveMatrixElement::GetNumberListInfo() {
|
||||
return NumberListAttributesInfo(mNumberListAttributes, sNumberListInfo,
|
||||
ArrayLength(sNumberListInfo));
|
||||
|
|
|
@ -21,7 +21,7 @@ JSObject* SVGFEDisplacementMapElement::WrapNode(
|
|||
return SVGFEDisplacementMapElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
nsSVGElement::NumberInfo SVGFEDisplacementMapElement::sNumberInfo[1] = {
|
||||
SVGElement::NumberInfo SVGFEDisplacementMapElement::sNumberInfo[1] = {
|
||||
{nsGkAtoms::scale, 0, false},
|
||||
};
|
||||
|
||||
|
@ -32,11 +32,11 @@ nsSVGEnumMapping SVGFEDisplacementMapElement::sChannelMap[] = {
|
|||
{nsGkAtoms::A, SVG_CHANNEL_A},
|
||||
{nullptr, 0}};
|
||||
|
||||
nsSVGElement::EnumInfo SVGFEDisplacementMapElement::sEnumInfo[2] = {
|
||||
SVGElement::EnumInfo SVGFEDisplacementMapElement::sEnumInfo[2] = {
|
||||
{nsGkAtoms::xChannelSelector, sChannelMap, SVG_CHANNEL_A},
|
||||
{nsGkAtoms::yChannelSelector, sChannelMap, SVG_CHANNEL_A}};
|
||||
|
||||
nsSVGElement::StringInfo SVGFEDisplacementMapElement::sStringInfo[3] = {
|
||||
SVGElement::StringInfo SVGFEDisplacementMapElement::sStringInfo[3] = {
|
||||
{nsGkAtoms::result, kNameSpaceID_None, true},
|
||||
{nsGkAtoms::in, kNameSpaceID_None, true},
|
||||
{nsGkAtoms::in2, kNameSpaceID_None, true}};
|
||||
|
@ -111,20 +111,18 @@ void SVGFEDisplacementMapElement::GetSourceImageNames(
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
nsSVGElement::NumberAttributesInfo
|
||||
SVGFEDisplacementMapElement::GetNumberInfo() {
|
||||
SVGElement::NumberAttributesInfo SVGFEDisplacementMapElement::GetNumberInfo() {
|
||||
return NumberAttributesInfo(mNumberAttributes, sNumberInfo,
|
||||
ArrayLength(sNumberInfo));
|
||||
}
|
||||
|
||||
nsSVGElement::EnumAttributesInfo SVGFEDisplacementMapElement::GetEnumInfo() {
|
||||
SVGElement::EnumAttributesInfo SVGFEDisplacementMapElement::GetEnumInfo() {
|
||||
return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
|
||||
}
|
||||
|
||||
nsSVGElement::StringAttributesInfo
|
||||
SVGFEDisplacementMapElement::GetStringInfo() {
|
||||
SVGElement::StringAttributesInfo SVGFEDisplacementMapElement::GetStringInfo() {
|
||||
return StringAttributesInfo(mStringAttributes, sStringInfo,
|
||||
ArrayLength(sStringInfo));
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ JSObject* SVGFEDistantLightElement::WrapNode(
|
|||
return SVGFEDistantLightElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
nsSVGElement::NumberInfo SVGFEDistantLightElement::sNumberInfo[2] = {
|
||||
SVGElement::NumberInfo SVGFEDistantLightElement::sNumberInfo[2] = {
|
||||
{nsGkAtoms::azimuth, 0, false}, {nsGkAtoms::elevation, 0, false}};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -58,9 +58,9 @@ already_AddRefed<SVGAnimatedNumber> SVGFEDistantLightElement::Elevation() {
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
nsSVGElement::NumberAttributesInfo SVGFEDistantLightElement::GetNumberInfo() {
|
||||
SVGElement::NumberAttributesInfo SVGFEDistantLightElement::GetNumberInfo() {
|
||||
return NumberAttributesInfo(mNumberAttributes, sNumberInfo,
|
||||
ArrayLength(sNumberInfo));
|
||||
}
|
||||
|
|
|
@ -21,13 +21,13 @@ JSObject* SVGFEDropShadowElement::WrapNode(JSContext* aCx,
|
|||
return SVGFEDropShadowElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
nsSVGElement::NumberInfo SVGFEDropShadowElement::sNumberInfo[2] = {
|
||||
SVGElement::NumberInfo SVGFEDropShadowElement::sNumberInfo[2] = {
|
||||
{nsGkAtoms::dx, 2, false}, {nsGkAtoms::dy, 2, false}};
|
||||
|
||||
nsSVGElement::NumberPairInfo SVGFEDropShadowElement::sNumberPairInfo[1] = {
|
||||
SVGElement::NumberPairInfo SVGFEDropShadowElement::sNumberPairInfo[1] = {
|
||||
{nsGkAtoms::stdDeviation, 2, 2}};
|
||||
|
||||
nsSVGElement::StringInfo SVGFEDropShadowElement::sStringInfo[2] = {
|
||||
SVGElement::StringInfo SVGFEDropShadowElement::sStringInfo[2] = {
|
||||
{nsGkAtoms::result, kNameSpaceID_None, true},
|
||||
{nsGkAtoms::in, kNameSpaceID_None, true}};
|
||||
|
||||
|
@ -128,20 +128,20 @@ SVGFEDropShadowElement::IsAttributeMapped(const nsAtom* name) const {
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
nsSVGElement::NumberAttributesInfo SVGFEDropShadowElement::GetNumberInfo() {
|
||||
SVGElement::NumberAttributesInfo SVGFEDropShadowElement::GetNumberInfo() {
|
||||
return NumberAttributesInfo(mNumberAttributes, sNumberInfo,
|
||||
ArrayLength(sNumberInfo));
|
||||
}
|
||||
|
||||
nsSVGElement::NumberPairAttributesInfo
|
||||
SVGElement::NumberPairAttributesInfo
|
||||
SVGFEDropShadowElement::GetNumberPairInfo() {
|
||||
return NumberPairAttributesInfo(mNumberPairAttributes, sNumberPairInfo,
|
||||
ArrayLength(sNumberPairInfo));
|
||||
}
|
||||
|
||||
nsSVGElement::StringAttributesInfo SVGFEDropShadowElement::GetStringInfo() {
|
||||
SVGElement::StringAttributesInfo SVGFEDropShadowElement::GetStringInfo() {
|
||||
return StringAttributesInfo(mStringAttributes, sStringInfo,
|
||||
ArrayLength(sStringInfo));
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ JSObject* SVGFEFloodElement::WrapNode(JSContext* aCx,
|
|||
return SVGFEFloodElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
nsSVGElement::StringInfo SVGFEFloodElement::sStringInfo[1] = {
|
||||
SVGElement::StringInfo SVGFEFloodElement::sStringInfo[1] = {
|
||||
{nsGkAtoms::result, kNameSpaceID_None, true}};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -60,9 +60,9 @@ SVGFEFloodElement::IsAttributeMapped(const nsAtom* name) const {
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
nsSVGElement::StringAttributesInfo SVGFEFloodElement::GetStringInfo() {
|
||||
SVGElement::StringAttributesInfo SVGFEFloodElement::GetStringInfo() {
|
||||
return StringAttributesInfo(mStringAttributes, sStringInfo,
|
||||
ArrayLength(sStringInfo));
|
||||
}
|
||||
|
|
|
@ -21,10 +21,10 @@ JSObject* SVGFEGaussianBlurElement::WrapNode(
|
|||
return SVGFEGaussianBlurElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
nsSVGElement::NumberPairInfo SVGFEGaussianBlurElement::sNumberPairInfo[1] = {
|
||||
SVGElement::NumberPairInfo SVGFEGaussianBlurElement::sNumberPairInfo[1] = {
|
||||
{nsGkAtoms::stdDeviation, 0, 0}};
|
||||
|
||||
nsSVGElement::StringInfo SVGFEGaussianBlurElement::sStringInfo[2] = {
|
||||
SVGElement::StringInfo SVGFEGaussianBlurElement::sStringInfo[2] = {
|
||||
{nsGkAtoms::result, kNameSpaceID_None, true},
|
||||
{nsGkAtoms::in, kNameSpaceID_None, true}};
|
||||
|
||||
|
@ -89,15 +89,15 @@ void SVGFEGaussianBlurElement::GetSourceImageNames(
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
nsSVGElement::NumberPairAttributesInfo
|
||||
SVGElement::NumberPairAttributesInfo
|
||||
SVGFEGaussianBlurElement::GetNumberPairInfo() {
|
||||
return NumberPairAttributesInfo(mNumberPairAttributes, sNumberPairInfo,
|
||||
ArrayLength(sNumberPairInfo));
|
||||
}
|
||||
|
||||
nsSVGElement::StringAttributesInfo SVGFEGaussianBlurElement::GetStringInfo() {
|
||||
SVGElement::StringAttributesInfo SVGFEGaussianBlurElement::GetStringInfo() {
|
||||
return StringAttributesInfo(mStringAttributes, sStringInfo,
|
||||
ArrayLength(sStringInfo));
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ JSObject* SVGFEImageElement::WrapNode(JSContext* aCx,
|
|||
return SVGFEImageElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
nsSVGElement::StringInfo SVGFEImageElement::sStringInfo[3] = {
|
||||
SVGElement::StringInfo SVGFEImageElement::sStringInfo[3] = {
|
||||
{nsGkAtoms::result, kNameSpaceID_None, true},
|
||||
{nsGkAtoms::href, kNameSpaceID_None, true},
|
||||
{nsGkAtoms::href, kNameSpaceID_XLink, true}};
|
||||
|
@ -282,7 +282,7 @@ bool SVGFEImageElement::OutputIsTainted(const nsTArray<bool>& aInputsAreTainted,
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
already_AddRefed<DOMSVGAnimatedPreserveAspectRatio>
|
||||
SVGFEImageElement::PreserveAspectRatio() {
|
||||
|
@ -293,7 +293,7 @@ SVGAnimatedPreserveAspectRatio* SVGFEImageElement::GetPreserveAspectRatio() {
|
|||
return &mPreserveAspectRatio;
|
||||
}
|
||||
|
||||
nsSVGElement::StringAttributesInfo SVGFEImageElement::GetStringInfo() {
|
||||
SVGElement::StringAttributesInfo SVGFEImageElement::GetStringInfo() {
|
||||
return StringAttributesInfo(mStringAttributes, sStringInfo,
|
||||
ArrayLength(sStringInfo));
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ JSObject* SVGFEMergeElement::WrapNode(JSContext* aCx,
|
|||
return SVGFEMergeElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
nsSVGElement::StringInfo SVGFEMergeElement::sStringInfo[1] = {
|
||||
SVGElement::StringInfo SVGFEMergeElement::sStringInfo[1] = {
|
||||
{nsGkAtoms::result, kNameSpaceID_None, true}};
|
||||
|
||||
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEMergeElement)
|
||||
|
@ -44,9 +44,9 @@ void SVGFEMergeElement::GetSourceImageNames(
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
nsSVGElement::StringAttributesInfo SVGFEMergeElement::GetStringInfo() {
|
||||
SVGElement::StringAttributesInfo SVGFEMergeElement::GetStringInfo() {
|
||||
return StringAttributesInfo(mStringAttributes, sStringInfo,
|
||||
ArrayLength(sStringInfo));
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ JSObject* SVGFEMergeNodeElement::WrapNode(JSContext* aCx,
|
|||
return SVGFEMergeNodeElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
nsSVGElement::StringInfo SVGFEMergeNodeElement::sStringInfo[1] = {
|
||||
SVGElement::StringInfo SVGFEMergeNodeElement::sStringInfo[1] = {
|
||||
{nsGkAtoms::in, kNameSpaceID_None, true}};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -38,9 +38,9 @@ already_AddRefed<SVGAnimatedString> SVGFEMergeNodeElement::In1() {
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
nsSVGElement::StringAttributesInfo SVGFEMergeNodeElement::GetStringInfo() {
|
||||
SVGElement::StringAttributesInfo SVGFEMergeNodeElement::GetStringInfo() {
|
||||
return StringAttributesInfo(mStringAttributes, sStringInfo,
|
||||
ArrayLength(sStringInfo));
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ JSObject* SVGFEMorphologyElement::WrapNode(JSContext* aCx,
|
|||
return SVGFEMorphologyElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
nsSVGElement::NumberPairInfo SVGFEMorphologyElement::sNumberPairInfo[1] = {
|
||||
SVGElement::NumberPairInfo SVGFEMorphologyElement::sNumberPairInfo[1] = {
|
||||
{nsGkAtoms::radius, 0, 0}};
|
||||
|
||||
nsSVGEnumMapping SVGFEMorphologyElement::sOperatorMap[] = {
|
||||
|
@ -28,10 +28,10 @@ nsSVGEnumMapping SVGFEMorphologyElement::sOperatorMap[] = {
|
|||
{nsGkAtoms::dilate, SVG_OPERATOR_DILATE},
|
||||
{nullptr, 0}};
|
||||
|
||||
nsSVGElement::EnumInfo SVGFEMorphologyElement::sEnumInfo[1] = {
|
||||
SVGElement::EnumInfo SVGFEMorphologyElement::sEnumInfo[1] = {
|
||||
{nsGkAtoms::_operator, sOperatorMap, SVG_OPERATOR_ERODE}};
|
||||
|
||||
nsSVGElement::StringInfo SVGFEMorphologyElement::sStringInfo[2] = {
|
||||
SVGElement::StringInfo SVGFEMorphologyElement::sStringInfo[2] = {
|
||||
{nsGkAtoms::result, kNameSpaceID_None, true},
|
||||
{nsGkAtoms::in, kNameSpaceID_None, true}};
|
||||
|
||||
|
@ -110,19 +110,19 @@ bool SVGFEMorphologyElement::AttributeAffectsRendering(
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
nsSVGElement::NumberPairAttributesInfo
|
||||
SVGElement::NumberPairAttributesInfo
|
||||
SVGFEMorphologyElement::GetNumberPairInfo() {
|
||||
return NumberPairAttributesInfo(mNumberPairAttributes, sNumberPairInfo,
|
||||
ArrayLength(sNumberPairInfo));
|
||||
}
|
||||
|
||||
nsSVGElement::EnumAttributesInfo SVGFEMorphologyElement::GetEnumInfo() {
|
||||
SVGElement::EnumAttributesInfo SVGFEMorphologyElement::GetEnumInfo() {
|
||||
return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
|
||||
}
|
||||
|
||||
nsSVGElement::StringAttributesInfo SVGFEMorphologyElement::GetStringInfo() {
|
||||
SVGElement::StringAttributesInfo SVGFEMorphologyElement::GetStringInfo() {
|
||||
return StringAttributesInfo(mStringAttributes, sStringInfo,
|
||||
ArrayLength(sStringInfo));
|
||||
}
|
||||
|
|
|
@ -20,10 +20,10 @@ JSObject* SVGFEOffsetElement::WrapNode(JSContext* aCx,
|
|||
return SVGFEOffsetElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
nsSVGElement::NumberInfo SVGFEOffsetElement::sNumberInfo[2] = {
|
||||
SVGElement::NumberInfo SVGFEOffsetElement::sNumberInfo[2] = {
|
||||
{nsGkAtoms::dx, 0, false}, {nsGkAtoms::dy, 0, false}};
|
||||
|
||||
nsSVGElement::StringInfo SVGFEOffsetElement::sStringInfo[2] = {
|
||||
SVGElement::StringInfo SVGFEOffsetElement::sStringInfo[2] = {
|
||||
{nsGkAtoms::result, kNameSpaceID_None, true},
|
||||
{nsGkAtoms::in, kNameSpaceID_None, true}};
|
||||
|
||||
|
@ -74,14 +74,14 @@ void SVGFEOffsetElement::GetSourceImageNames(
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
nsSVGElement::NumberAttributesInfo SVGFEOffsetElement::GetNumberInfo() {
|
||||
SVGElement::NumberAttributesInfo SVGFEOffsetElement::GetNumberInfo() {
|
||||
return NumberAttributesInfo(mNumberAttributes, sNumberInfo,
|
||||
ArrayLength(sNumberInfo));
|
||||
}
|
||||
|
||||
nsSVGElement::StringAttributesInfo SVGFEOffsetElement::GetStringInfo() {
|
||||
SVGElement::StringAttributesInfo SVGFEOffsetElement::GetStringInfo() {
|
||||
return StringAttributesInfo(mStringAttributes, sStringInfo,
|
||||
ArrayLength(sStringInfo));
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ JSObject* SVGFEPointLightElement::WrapNode(JSContext* aCx,
|
|||
return SVGFEPointLightElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
nsSVGElement::NumberInfo SVGFEPointLightElement::sNumberInfo[3] = {
|
||||
SVGElement::NumberInfo SVGFEPointLightElement::sNumberInfo[3] = {
|
||||
{nsGkAtoms::x, 0, false},
|
||||
{nsGkAtoms::y, 0, false},
|
||||
{nsGkAtoms::z, 0, false}};
|
||||
|
@ -67,9 +67,9 @@ already_AddRefed<SVGAnimatedNumber> SVGFEPointLightElement::Z() {
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
nsSVGElement::NumberAttributesInfo SVGFEPointLightElement::GetNumberInfo() {
|
||||
SVGElement::NumberAttributesInfo SVGFEPointLightElement::GetNumberInfo() {
|
||||
return NumberAttributesInfo(mNumberAttributes, sNumberInfo,
|
||||
ArrayLength(sNumberInfo));
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ SVGFESpecularLightingElement::KernelUnitLengthY() {
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
FilterPrimitiveDescription
|
||||
SVGFESpecularLightingElement::GetPrimitiveDescription(
|
||||
|
|
|
@ -20,7 +20,7 @@ JSObject* SVGFESpotLightElement::WrapNode(JSContext* aCx,
|
|||
return SVGFESpotLightElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
nsSVGElement::NumberInfo SVGFESpotLightElement::sNumberInfo[8] = {
|
||||
SVGElement::NumberInfo SVGFESpotLightElement::sNumberInfo[8] = {
|
||||
{nsGkAtoms::x, 0, false},
|
||||
{nsGkAtoms::y, 0, false},
|
||||
{nsGkAtoms::z, 0, false},
|
||||
|
@ -104,9 +104,9 @@ already_AddRefed<SVGAnimatedNumber> SVGFESpotLightElement::LimitingConeAngle() {
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
nsSVGElement::NumberAttributesInfo SVGFESpotLightElement::GetNumberInfo() {
|
||||
SVGElement::NumberAttributesInfo SVGFESpotLightElement::GetNumberInfo() {
|
||||
return NumberAttributesInfo(mNumberAttributes, sNumberInfo,
|
||||
ArrayLength(sNumberInfo));
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ JSObject* SVGFETileElement::WrapNode(JSContext* aCx,
|
|||
return SVGFETileElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
nsSVGElement::StringInfo SVGFETileElement::sStringInfo[2] = {
|
||||
SVGElement::StringInfo SVGFETileElement::sStringInfo[2] = {
|
||||
{nsGkAtoms::result, kNameSpaceID_None, true},
|
||||
{nsGkAtoms::in, kNameSpaceID_None, true}};
|
||||
|
||||
|
@ -39,7 +39,7 @@ void SVGFETileElement::GetSourceImageNames(
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
FilterPrimitiveDescription SVGFETileElement::GetPrimitiveDescription(
|
||||
nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
|
||||
|
@ -56,9 +56,9 @@ bool SVGFETileElement::AttributeAffectsRendering(int32_t aNameSpaceID,
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
nsSVGElement::StringAttributesInfo SVGFETileElement::GetStringInfo() {
|
||||
SVGElement::StringAttributesInfo SVGFETileElement::GetStringInfo() {
|
||||
return StringAttributesInfo(mStringAttributes, sStringInfo,
|
||||
ArrayLength(sStringInfo));
|
||||
}
|
||||
|
|
|
@ -27,13 +27,13 @@ JSObject* SVGFETurbulenceElement::WrapNode(JSContext* aCx,
|
|||
return SVGFETurbulenceElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
nsSVGElement::NumberInfo SVGFETurbulenceElement::sNumberInfo[1] = {
|
||||
SVGElement::NumberInfo SVGFETurbulenceElement::sNumberInfo[1] = {
|
||||
{nsGkAtoms::seed, 0, false}};
|
||||
|
||||
nsSVGElement::NumberPairInfo SVGFETurbulenceElement::sNumberPairInfo[1] = {
|
||||
SVGElement::NumberPairInfo SVGFETurbulenceElement::sNumberPairInfo[1] = {
|
||||
{nsGkAtoms::baseFrequency, 0, 0}};
|
||||
|
||||
nsSVGElement::IntegerInfo SVGFETurbulenceElement::sIntegerInfo[1] = {
|
||||
SVGElement::IntegerInfo SVGFETurbulenceElement::sIntegerInfo[1] = {
|
||||
{nsGkAtoms::numOctaves, 1}};
|
||||
|
||||
nsSVGEnumMapping SVGFETurbulenceElement::sTypeMap[] = {
|
||||
|
@ -46,11 +46,11 @@ nsSVGEnumMapping SVGFETurbulenceElement::sStitchTilesMap[] = {
|
|||
{nsGkAtoms::noStitch, SVG_STITCHTYPE_NOSTITCH},
|
||||
{nullptr, 0}};
|
||||
|
||||
nsSVGElement::EnumInfo SVGFETurbulenceElement::sEnumInfo[2] = {
|
||||
SVGElement::EnumInfo SVGFETurbulenceElement::sEnumInfo[2] = {
|
||||
{nsGkAtoms::type, sTypeMap, SVG_TURBULENCE_TYPE_TURBULENCE},
|
||||
{nsGkAtoms::stitchTiles, sStitchTilesMap, SVG_STITCHTYPE_NOSTITCH}};
|
||||
|
||||
nsSVGElement::StringInfo SVGFETurbulenceElement::sStringInfo[1] = {
|
||||
SVGElement::StringInfo SVGFETurbulenceElement::sStringInfo[1] = {
|
||||
{nsGkAtoms::result, kNameSpaceID_None, true}};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -152,29 +152,29 @@ bool SVGFETurbulenceElement::AttributeAffectsRendering(
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
nsSVGElement::NumberAttributesInfo SVGFETurbulenceElement::GetNumberInfo() {
|
||||
SVGElement::NumberAttributesInfo SVGFETurbulenceElement::GetNumberInfo() {
|
||||
return NumberAttributesInfo(mNumberAttributes, sNumberInfo,
|
||||
ArrayLength(sNumberInfo));
|
||||
}
|
||||
|
||||
nsSVGElement::NumberPairAttributesInfo
|
||||
SVGElement::NumberPairAttributesInfo
|
||||
SVGFETurbulenceElement::GetNumberPairInfo() {
|
||||
return NumberPairAttributesInfo(mNumberPairAttributes, sNumberPairInfo,
|
||||
ArrayLength(sNumberPairInfo));
|
||||
}
|
||||
|
||||
nsSVGElement::IntegerAttributesInfo SVGFETurbulenceElement::GetIntegerInfo() {
|
||||
SVGElement::IntegerAttributesInfo SVGFETurbulenceElement::GetIntegerInfo() {
|
||||
return IntegerAttributesInfo(mIntegerAttributes, sIntegerInfo,
|
||||
ArrayLength(sIntegerInfo));
|
||||
}
|
||||
|
||||
nsSVGElement::EnumAttributesInfo SVGFETurbulenceElement::GetEnumInfo() {
|
||||
SVGElement::EnumAttributesInfo SVGFETurbulenceElement::GetEnumInfo() {
|
||||
return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
|
||||
}
|
||||
|
||||
nsSVGElement::StringAttributesInfo SVGFETurbulenceElement::GetStringInfo() {
|
||||
SVGElement::StringAttributesInfo SVGFETurbulenceElement::GetStringInfo() {
|
||||
return StringAttributesInfo(mStringAttributes, sStringInfo,
|
||||
ArrayLength(sStringInfo));
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ JSObject* SVGFilterElement::WrapNode(JSContext* aCx,
|
|||
return SVGFilterElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
nsSVGElement::LengthInfo SVGFilterElement::sLengthInfo[4] = {
|
||||
SVGElement::LengthInfo SVGFilterElement::sLengthInfo[4] = {
|
||||
{nsGkAtoms::x, -10, SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE,
|
||||
SVGContentUtils::X},
|
||||
{nsGkAtoms::y, -10, SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE,
|
||||
|
@ -39,12 +39,12 @@ nsSVGElement::LengthInfo SVGFilterElement::sLengthInfo[4] = {
|
|||
SVGContentUtils::Y},
|
||||
};
|
||||
|
||||
nsSVGElement::EnumInfo SVGFilterElement::sEnumInfo[2] = {
|
||||
SVGElement::EnumInfo SVGFilterElement::sEnumInfo[2] = {
|
||||
{nsGkAtoms::filterUnits, sSVGUnitTypesMap, SVG_UNIT_TYPE_OBJECTBOUNDINGBOX},
|
||||
{nsGkAtoms::primitiveUnits, sSVGUnitTypesMap,
|
||||
SVG_UNIT_TYPE_USERSPACEONUSE}};
|
||||
|
||||
nsSVGElement::StringInfo SVGFilterElement::sStringInfo[2] = {
|
||||
SVGElement::StringInfo SVGFilterElement::sStringInfo[2] = {
|
||||
{nsGkAtoms::href, kNameSpaceID_None, true},
|
||||
{nsGkAtoms::href, kNameSpaceID_XLink, true}};
|
||||
|
||||
|
@ -108,7 +108,7 @@ SVGFilterElement::IsAttributeMapped(const nsAtom* name) const {
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
/* virtual */ bool SVGFilterElement::HasValidDimensions() const {
|
||||
return (!mLengthAttributes[ATTR_WIDTH].IsExplicitlySet() ||
|
||||
|
@ -117,16 +117,16 @@ SVGFilterElement::IsAttributeMapped(const nsAtom* name) const {
|
|||
mLengthAttributes[ATTR_HEIGHT].GetAnimValInSpecifiedUnits() > 0);
|
||||
}
|
||||
|
||||
nsSVGElement::LengthAttributesInfo SVGFilterElement::GetLengthInfo() {
|
||||
SVGElement::LengthAttributesInfo SVGFilterElement::GetLengthInfo() {
|
||||
return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
|
||||
ArrayLength(sLengthInfo));
|
||||
}
|
||||
|
||||
nsSVGElement::EnumAttributesInfo SVGFilterElement::GetEnumInfo() {
|
||||
SVGElement::EnumAttributesInfo SVGFilterElement::GetEnumInfo() {
|
||||
return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
|
||||
}
|
||||
|
||||
nsSVGElement::StringAttributesInfo SVGFilterElement::GetStringInfo() {
|
||||
SVGElement::StringAttributesInfo SVGFilterElement::GetStringInfo() {
|
||||
return StringAttributesInfo(mStringAttributes, sStringInfo,
|
||||
ArrayLength(sStringInfo));
|
||||
}
|
||||
|
|
|
@ -8,13 +8,11 @@
|
|||
#define mozilla_dom_SVGFilterElement_h
|
||||
|
||||
#include "nsSVGEnum.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "nsSVGIntegerPair.h"
|
||||
#include "nsSVGLength2.h"
|
||||
#include "nsSVGString.h"
|
||||
|
||||
typedef nsSVGElement SVGFilterElementBase;
|
||||
|
||||
class nsSVGFilterFrame;
|
||||
class nsSVGFilterInstance;
|
||||
|
||||
|
@ -25,6 +23,8 @@ namespace mozilla {
|
|||
namespace dom {
|
||||
class SVGAnimatedLength;
|
||||
|
||||
typedef SVGElement SVGFilterElementBase;
|
||||
|
||||
class SVGFilterElement : public SVGFilterElementBase {
|
||||
friend class ::nsSVGFilterFrame;
|
||||
friend class ::nsSVGFilterInstance;
|
||||
|
|
|
@ -22,7 +22,7 @@ JSObject* SVGForeignObjectElement::WrapNode(JSContext* aCx,
|
|||
return SVGForeignObjectElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
nsSVGElement::LengthInfo SVGForeignObjectElement::sLengthInfo[4] = {
|
||||
SVGElement::LengthInfo SVGForeignObjectElement::sLengthInfo[4] = {
|
||||
{nsGkAtoms::x, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
|
||||
SVGContentUtils::X},
|
||||
{nsGkAtoms::y, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
|
||||
|
@ -64,7 +64,7 @@ already_AddRefed<SVGAnimatedLength> SVGForeignObjectElement::Height() {
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
/* virtual */ gfxMatrix SVGForeignObjectElement::PrependLocalTransformsTo(
|
||||
const gfxMatrix& aMatrix, SVGTransformTypes aWhich) const {
|
||||
|
@ -112,9 +112,9 @@ SVGForeignObjectElement::IsAttributeMapped(const nsAtom* name) const {
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
nsSVGElement::LengthAttributesInfo SVGForeignObjectElement::GetLengthInfo() {
|
||||
SVGElement::LengthAttributesInfo SVGForeignObjectElement::GetLengthInfo() {
|
||||
return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
|
||||
ArrayLength(sLengthInfo));
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ class SVGForeignObjectElement final : public SVGGraphicsElement {
|
|||
JS::Handle<JSObject*> aGivenProto) override;
|
||||
|
||||
public:
|
||||
// nsSVGElement specializations:
|
||||
// SVGElement specializations:
|
||||
virtual gfxMatrix PrependLocalTransformsTo(
|
||||
const gfxMatrix& aMatrix,
|
||||
SVGTransformTypes aWhich = eAllTransforms) const override;
|
||||
|
|
|
@ -19,8 +19,8 @@ using namespace mozilla;
|
|||
using namespace mozilla::gfx;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
nsSVGElement::NumberInfo SVGGeometryElement::sNumberInfo = {
|
||||
nsGkAtoms::pathLength, 0, false};
|
||||
SVGElement::NumberInfo SVGGeometryElement::sNumberInfo = {nsGkAtoms::pathLength,
|
||||
0, false};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Implementation
|
||||
|
@ -29,7 +29,7 @@ SVGGeometryElement::SVGGeometryElement(
|
|||
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
|
||||
: SVGGeometryElementBase(std::move(aNodeInfo)) {}
|
||||
|
||||
nsSVGElement::NumberAttributesInfo SVGGeometryElement::GetNumberInfo() {
|
||||
SVGElement::NumberAttributesInfo SVGGeometryElement::GetNumberInfo() {
|
||||
return NumberAttributesInfo(&mPathLength, &sNumberInfo, 1);
|
||||
}
|
||||
|
||||
|
|
|
@ -213,7 +213,7 @@ class SVGGeometryElement : public SVGGeometryElementBase {
|
|||
ErrorResult& rv);
|
||||
|
||||
protected:
|
||||
// nsSVGElement method
|
||||
// SVGElement method
|
||||
virtual NumberAttributesInfo GetNumberInfo() override;
|
||||
|
||||
nsSVGNumber2 mPathLength;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "mozilla/dom/SVGUnitTypesBinding.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
|
||||
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(LinearGradient)
|
||||
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(RadialGradient)
|
||||
|
@ -34,12 +34,12 @@ nsSVGEnumMapping SVGGradientElement::sSpreadMethodMap[] = {
|
|||
{nsGkAtoms::repeat, SVG_SPREADMETHOD_REPEAT},
|
||||
{nullptr, 0}};
|
||||
|
||||
nsSVGElement::EnumInfo SVGGradientElement::sEnumInfo[2] = {
|
||||
SVGElement::EnumInfo SVGGradientElement::sEnumInfo[2] = {
|
||||
{nsGkAtoms::gradientUnits, sSVGUnitTypesMap,
|
||||
SVG_UNIT_TYPE_OBJECTBOUNDINGBOX},
|
||||
{nsGkAtoms::spreadMethod, sSpreadMethodMap, SVG_SPREADMETHOD_PAD}};
|
||||
|
||||
nsSVGElement::StringInfo SVGGradientElement::sStringInfo[2] = {
|
||||
SVGElement::StringInfo SVGGradientElement::sStringInfo[2] = {
|
||||
{nsGkAtoms::href, kNameSpaceID_None, true},
|
||||
{nsGkAtoms::href, kNameSpaceID_XLink, true}};
|
||||
|
||||
|
@ -51,13 +51,13 @@ SVGGradientElement::SVGGradientElement(
|
|||
: SVGGradientElementBase(std::move(aNodeInfo)) {}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
nsSVGElement::EnumAttributesInfo SVGGradientElement::GetEnumInfo() {
|
||||
SVGElement::EnumAttributesInfo SVGGradientElement::GetEnumInfo() {
|
||||
return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
|
||||
}
|
||||
|
||||
nsSVGElement::StringAttributesInfo SVGGradientElement::GetStringInfo() {
|
||||
SVGElement::StringAttributesInfo SVGGradientElement::GetStringInfo() {
|
||||
return StringAttributesInfo(mStringAttributes, sStringInfo,
|
||||
ArrayLength(sStringInfo));
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ JSObject* SVGLinearGradientElement::WrapNode(
|
|||
return SVGLinearGradientElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
nsSVGElement::LengthInfo SVGLinearGradientElement::sLengthInfo[4] = {
|
||||
SVGElement::LengthInfo SVGLinearGradientElement::sLengthInfo[4] = {
|
||||
{nsGkAtoms::x1, 0, SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE,
|
||||
SVGContentUtils::X},
|
||||
{nsGkAtoms::y1, 0, SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE,
|
||||
|
@ -145,7 +145,7 @@ already_AddRefed<SVGAnimatedLength> SVGLinearGradientElement::Y2() {
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
nsSVGAnimatedTransformList* SVGGradientElement::GetAnimatedTransformList(
|
||||
uint32_t aFlags) {
|
||||
|
@ -155,7 +155,7 @@ nsSVGAnimatedTransformList* SVGGradientElement::GetAnimatedTransformList(
|
|||
return mGradientTransform;
|
||||
}
|
||||
|
||||
nsSVGElement::LengthAttributesInfo SVGLinearGradientElement::GetLengthInfo() {
|
||||
SVGElement::LengthAttributesInfo SVGLinearGradientElement::GetLengthInfo() {
|
||||
return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
|
||||
ArrayLength(sLengthInfo));
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ JSObject* SVGRadialGradientElement::WrapNode(
|
|||
return SVGRadialGradientElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
nsSVGElement::LengthInfo SVGRadialGradientElement::sLengthInfo[6] = {
|
||||
SVGElement::LengthInfo SVGRadialGradientElement::sLengthInfo[6] = {
|
||||
{nsGkAtoms::cx, 50, SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE,
|
||||
SVGContentUtils::X},
|
||||
{nsGkAtoms::cy, 50, SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE,
|
||||
|
@ -221,9 +221,9 @@ already_AddRefed<SVGAnimatedLength> SVGRadialGradientElement::Fr() {
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
nsSVGElement::LengthAttributesInfo SVGRadialGradientElement::GetLengthInfo() {
|
||||
SVGElement::LengthAttributesInfo SVGRadialGradientElement::GetLengthInfo() {
|
||||
return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
|
||||
ArrayLength(sLengthInfo));
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsSVGAnimatedTransformList.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "nsSVGLength2.h"
|
||||
#include "nsSVGEnum.h"
|
||||
#include "nsSVGString.h"
|
||||
|
@ -30,7 +30,7 @@ class SVGAnimatedTransformList;
|
|||
|
||||
//--------------------- Gradients------------------------
|
||||
|
||||
typedef nsSVGElement SVGGradientElementBase;
|
||||
typedef SVGElement SVGGradientElementBase;
|
||||
|
||||
class SVGGradientElement : public SVGGradientElementBase {
|
||||
friend class ::nsSVGGradientFrame;
|
||||
|
|
|
@ -26,7 +26,7 @@ class SVGGraphicsElement : public SVGGraphicsElementBase, public SVGTests {
|
|||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
bool IsFocusableInternal(int32_t* aTabIndex, bool aWithMouse) override;
|
||||
nsSVGElement* AsSVGElement() final { return this; }
|
||||
SVGElement* AsSVGElement() final { return this; }
|
||||
|
||||
protected:
|
||||
// returns true if focusability has been definitively determined otherwise
|
||||
|
|
|
@ -30,7 +30,7 @@ JSObject* SVGImageElement::WrapNode(JSContext* aCx,
|
|||
return SVGImageElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
nsSVGElement::LengthInfo SVGImageElement::sLengthInfo[4] = {
|
||||
SVGElement::LengthInfo SVGImageElement::sLengthInfo[4] = {
|
||||
{nsGkAtoms::x, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
|
||||
SVGContentUtils::X},
|
||||
{nsGkAtoms::y, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
|
||||
|
@ -41,7 +41,7 @@ nsSVGElement::LengthInfo SVGImageElement::sLengthInfo[4] = {
|
|||
SVGContentUtils::Y},
|
||||
};
|
||||
|
||||
nsSVGElement::StringInfo SVGImageElement::sStringInfo[2] = {
|
||||
SVGElement::StringInfo SVGImageElement::sStringInfo[2] = {
|
||||
{nsGkAtoms::href, kNameSpaceID_None, true},
|
||||
{nsGkAtoms::href, kNameSpaceID_XLink, true}};
|
||||
|
||||
|
@ -265,7 +265,7 @@ already_AddRefed<Path> SVGImageElement::BuildPath(PathBuilder* aBuilder) {
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
/* virtual */ bool SVGImageElement::HasValidDimensions() const {
|
||||
return mLengthAttributes[ATTR_WIDTH].IsExplicitlySet() &&
|
||||
|
@ -274,7 +274,7 @@ already_AddRefed<Path> SVGImageElement::BuildPath(PathBuilder* aBuilder) {
|
|||
mLengthAttributes[ATTR_HEIGHT].GetAnimValInSpecifiedUnits() > 0;
|
||||
}
|
||||
|
||||
nsSVGElement::LengthAttributesInfo SVGImageElement::GetLengthInfo() {
|
||||
SVGElement::LengthAttributesInfo SVGImageElement::GetLengthInfo() {
|
||||
return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
|
||||
ArrayLength(sLengthInfo));
|
||||
}
|
||||
|
@ -283,7 +283,7 @@ SVGAnimatedPreserveAspectRatio* SVGImageElement::GetPreserveAspectRatio() {
|
|||
return &mPreserveAspectRatio;
|
||||
}
|
||||
|
||||
nsSVGElement::StringAttributesInfo SVGImageElement::GetStringInfo() {
|
||||
SVGElement::StringAttributesInfo SVGImageElement::GetStringInfo() {
|
||||
return StringAttributesInfo(mStringAttributes, sStringInfo,
|
||||
ArrayLength(sStringInfo));
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "mozilla/ArrayUtils.h"
|
||||
|
||||
#include "SVGLength.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "mozilla/dom/SVGSVGElement.h"
|
||||
#include "nsTextFormatter.h"
|
||||
#include "SVGContentUtils.h"
|
||||
|
@ -91,7 +91,7 @@ inline static float GetAbsUnitsPerAbsUnit(uint8_t aUnits, uint8_t aPerUnit) {
|
|||
}
|
||||
|
||||
float SVGLength::GetValueInSpecifiedUnit(uint8_t aUnit,
|
||||
const nsSVGElement* aElement,
|
||||
const SVGElement* aElement,
|
||||
uint8_t aAxis) const {
|
||||
if (aUnit == mUnit) {
|
||||
return mValue;
|
||||
|
@ -133,7 +133,7 @@ float SVGLength::GetValueInSpecifiedUnit(uint8_t aUnit,
|
|||
#define INCHES_PER_MM_FLOAT float(0.0393700787)
|
||||
#define INCHES_PER_CM_FLOAT float(0.393700787)
|
||||
|
||||
float SVGLength::GetUserUnitsPerUnit(const nsSVGElement* aElement,
|
||||
float SVGLength::GetUserUnitsPerUnit(const SVGElement* aElement,
|
||||
uint8_t aAxis) const {
|
||||
switch (mUnit) {
|
||||
case SVGLength_Binding::SVG_LENGTHTYPE_NUMBER:
|
||||
|
@ -152,18 +152,17 @@ float SVGLength::GetUserUnitsPerUnit(const nsSVGElement* aElement,
|
|||
case SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE:
|
||||
return GetUserUnitsPerPercent(aElement, aAxis);
|
||||
case SVGLength_Binding::SVG_LENGTHTYPE_EMS:
|
||||
return SVGContentUtils::GetFontSize(const_cast<nsSVGElement*>(aElement));
|
||||
return SVGContentUtils::GetFontSize(const_cast<SVGElement*>(aElement));
|
||||
case SVGLength_Binding::SVG_LENGTHTYPE_EXS:
|
||||
return SVGContentUtils::GetFontXHeight(
|
||||
const_cast<nsSVGElement*>(aElement));
|
||||
return SVGContentUtils::GetFontXHeight(const_cast<SVGElement*>(aElement));
|
||||
default:
|
||||
MOZ_ASSERT_UNREACHABLE("Unknown unit type");
|
||||
return std::numeric_limits<float>::quiet_NaN();
|
||||
}
|
||||
}
|
||||
|
||||
/* static */ float SVGLength::GetUserUnitsPerPercent(
|
||||
const nsSVGElement* aElement, uint8_t aAxis) {
|
||||
/* static */ float SVGLength::GetUserUnitsPerPercent(const SVGElement* aElement,
|
||||
uint8_t aAxis) {
|
||||
if (aElement) {
|
||||
dom::SVGViewportElement* viewportElement = aElement->GetCtx();
|
||||
if (viewportElement) {
|
||||
|
|
|
@ -12,10 +12,12 @@
|
|||
#include "mozilla/FloatingPoint.h"
|
||||
#include "mozilla/dom/SVGLengthBinding.h"
|
||||
|
||||
class nsSVGElement;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
namespace dom {
|
||||
class SVGElement;
|
||||
}
|
||||
|
||||
/**
|
||||
* This SVGLength class is currently used for SVGLength *list* attributes only.
|
||||
* The class that is currently used for <length> attributes is nsSVGLength2.
|
||||
|
@ -93,7 +95,8 @@ class SVGLength {
|
|||
* If it's not possible to convert this length's value to user units, then
|
||||
* this method will return numeric_limits<float>::quiet_NaN().
|
||||
*/
|
||||
float GetValueInUserUnits(const nsSVGElement *aElement, uint8_t aAxis) const {
|
||||
float GetValueInUserUnits(const dom::SVGElement *aElement,
|
||||
uint8_t aAxis) const {
|
||||
return mValue * GetUserUnitsPerUnit(aElement, aAxis);
|
||||
}
|
||||
|
||||
|
@ -103,7 +106,7 @@ class SVGLength {
|
|||
* This method returns numeric_limits<float>::quiet_NaN() if it is not
|
||||
* possible to convert the value to the specified unit.
|
||||
*/
|
||||
float GetValueInSpecifiedUnit(uint8_t aUnit, const nsSVGElement *aElement,
|
||||
float GetValueInSpecifiedUnit(uint8_t aUnit, const dom::SVGElement *aElement,
|
||||
uint8_t aAxis) const;
|
||||
|
||||
bool IsPercentage() const {
|
||||
|
@ -122,7 +125,8 @@ class SVGLength {
|
|||
* factor between the length's current unit and user units is undefined (see
|
||||
* the comments for GetUserUnitsPerInch and GetUserUnitsPerPercent).
|
||||
*/
|
||||
float GetUserUnitsPerUnit(const nsSVGElement *aElement, uint8_t aAxis) const;
|
||||
float GetUserUnitsPerUnit(const dom::SVGElement *aElement,
|
||||
uint8_t aAxis) const;
|
||||
|
||||
private:
|
||||
#ifdef DEBUG
|
||||
|
@ -144,7 +148,7 @@ class SVGLength {
|
|||
* This function returns a non-negative value if the conversion factor is
|
||||
* defined, otherwise it returns numeric_limits<float>::quiet_NaN().
|
||||
*/
|
||||
static float GetUserUnitsPerPercent(const nsSVGElement *aElement,
|
||||
static float GetUserUnitsPerPercent(const dom::SVGElement *aElement,
|
||||
uint8_t aAxis);
|
||||
|
||||
float mValue;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "nsCharSeparatedTokenizer.h"
|
||||
#include "nsError.h"
|
||||
#include "nsString.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "SVGAnimatedLengthList.h"
|
||||
#include "SVGContentUtils.h"
|
||||
#include "SVGLength.h"
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "nsIContent.h"
|
||||
#include "nsINode.h"
|
||||
#include "nsIWeakReferenceUtils.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "SVGElement.h"
|
||||
#include "nsTArray.h"
|
||||
#include "SVGLength.h"
|
||||
#include "mozilla/dom/SVGLengthBinding.h"
|
||||
|
@ -160,21 +160,21 @@ class SVGLengthListAndInfo : public SVGLengthList {
|
|||
SVGLengthListAndInfo()
|
||||
: mElement(nullptr), mAxis(0), mCanZeroPadList(false) {}
|
||||
|
||||
SVGLengthListAndInfo(nsSVGElement* aElement, uint8_t aAxis,
|
||||
SVGLengthListAndInfo(dom::SVGElement* aElement, uint8_t aAxis,
|
||||
bool aCanZeroPadList)
|
||||
: mElement(do_GetWeakReference(static_cast<nsINode*>(aElement))),
|
||||
mAxis(aAxis),
|
||||
mCanZeroPadList(aCanZeroPadList) {}
|
||||
|
||||
void SetInfo(nsSVGElement* aElement, uint8_t aAxis, bool aCanZeroPadList) {
|
||||
void SetInfo(dom::SVGElement* aElement, uint8_t aAxis, bool aCanZeroPadList) {
|
||||
mElement = do_GetWeakReference(static_cast<nsINode*>(aElement));
|
||||
mAxis = aAxis;
|
||||
mCanZeroPadList = aCanZeroPadList;
|
||||
}
|
||||
|
||||
nsSVGElement* Element() const {
|
||||
dom::SVGElement* Element() const {
|
||||
nsCOMPtr<nsIContent> e = do_QueryReferent(mElement);
|
||||
return static_cast<nsSVGElement*>(e.get());
|
||||
return static_cast<dom::SVGElement*>(e.get());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -287,7 +287,8 @@ class MOZ_STACK_CLASS SVGUserUnitList {
|
|||
public:
|
||||
SVGUserUnitList() : mList(nullptr), mElement(nullptr), mAxis(0) {}
|
||||
|
||||
void Init(const SVGLengthList* aList, nsSVGElement* aElement, uint8_t aAxis) {
|
||||
void Init(const SVGLengthList* aList, dom::SVGElement* aElement,
|
||||
uint8_t aAxis) {
|
||||
mList = aList;
|
||||
mElement = aElement;
|
||||
mAxis = aAxis;
|
||||
|
@ -312,7 +313,7 @@ class MOZ_STACK_CLASS SVGUserUnitList {
|
|||
|
||||
private:
|
||||
const SVGLengthList* mList;
|
||||
nsSVGElement* mElement;
|
||||
dom::SVGElement* mElement;
|
||||
uint8_t mAxis;
|
||||
};
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ JSObject* SVGLineElement::WrapNode(JSContext* aCx,
|
|||
return SVGLineElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
nsSVGElement::LengthInfo SVGLineElement::sLengthInfo[4] = {
|
||||
SVGElement::LengthInfo SVGLineElement::sLengthInfo[4] = {
|
||||
{nsGkAtoms::x1, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
|
||||
SVGContentUtils::X},
|
||||
{nsGkAtoms::y1, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
|
||||
|
@ -89,9 +89,9 @@ SVGLineElement::IsAttributeMapped(const nsAtom* name) const {
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
// SVGElement methods
|
||||
|
||||
nsSVGElement::LengthAttributesInfo SVGLineElement::GetLengthInfo() {
|
||||
SVGElement::LengthAttributesInfo SVGLineElement::GetLengthInfo() {
|
||||
return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
|
||||
ArrayLength(sLengthInfo));
|
||||
}
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче