2015-05-03 22:32:37 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* 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/. */
|
2001-12-12 10:59:31 +03:00
|
|
|
|
2020-07-15 02:40:05 +03:00
|
|
|
#ifndef DOM_SVG_SVGELEMENT_H_
|
|
|
|
#define DOM_SVG_SVGELEMENT_H_
|
2001-12-12 10:59:31 +03:00
|
|
|
|
|
|
|
/*
|
2018-12-21 11:58:14 +03:00
|
|
|
SVGElement is the base class for all SVG content elements.
|
2001-12-12 10:59:31 +03:00
|
|
|
It implements all the common DOM interfaces and handles attributes.
|
|
|
|
*/
|
|
|
|
|
2013-05-30 00:43:41 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2019-01-25 02:40:25 +03:00
|
|
|
#include "mozilla/RefPtr.h"
|
2020-08-10 10:55:15 +03:00
|
|
|
#include "mozilla/SVGAnimatedClass.h"
|
2018-12-31 14:56:52 +03:00
|
|
|
#include "mozilla/SVGContentUtils.h"
|
2018-12-27 20:30:38 +03:00
|
|
|
#include "mozilla/dom/DOMRect.h"
|
|
|
|
#include "mozilla/dom/Element.h"
|
|
|
|
#include "mozilla/gfx/MatrixFwd.h"
|
2020-02-25 23:03:26 +03:00
|
|
|
#include "mozilla/UniquePtr.h"
|
2020-11-23 19:08:47 +03:00
|
|
|
#include "nsCSSPropertyID.h"
|
2012-01-26 13:57:21 +04:00
|
|
|
#include "nsChangeHint.h"
|
|
|
|
#include "nsCycleCollectionParticipant.h"
|
|
|
|
#include "nsError.h"
|
|
|
|
#include "nsISupportsImpl.h"
|
2007-08-06 19:27:19 +04:00
|
|
|
#include "nsStyledElement.h"
|
2017-07-05 18:18:49 +03:00
|
|
|
#include "gfxMatrix.h"
|
2009-01-15 07:38:07 +03:00
|
|
|
|
2020-08-25 21:25:52 +03:00
|
|
|
// {70db954d-e452-4be3-83aa-f54a51cf7890}
|
|
|
|
#define MOZILLA_SVGELEMENT_IID \
|
|
|
|
{ \
|
|
|
|
0x70db954d, 0xe452, 0x4be3, { \
|
|
|
|
0x82, 0xaa, 0xf5, 0x4a, 0x51, 0xcf, 0x78, 0x90 \
|
|
|
|
} \
|
|
|
|
}
|
|
|
|
|
2018-12-21 11:58:14 +03:00
|
|
|
nsresult NS_NewSVGElement(mozilla::dom::Element** aResult,
|
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
2013-02-18 06:14:02 +04:00
|
|
|
|
2020-01-17 13:00:28 +03:00
|
|
|
class mozAutoDocUpdate;
|
|
|
|
|
2018-12-21 11:58:14 +03:00
|
|
|
namespace mozilla {
|
2012-12-23 12:22:58 +04:00
|
|
|
|
2019-04-04 20:40:56 +03:00
|
|
|
class SVGAnimatedBoolean;
|
|
|
|
class SVGAnimatedEnumeration;
|
|
|
|
class SVGAnimatedInteger;
|
|
|
|
class SVGAnimatedIntegerPair;
|
2019-04-09 23:04:33 +03:00
|
|
|
class SVGAnimatedLength;
|
2019-04-04 20:40:56 +03:00
|
|
|
class SVGAnimatedLengthList;
|
2019-04-09 23:04:33 +03:00
|
|
|
class SVGAnimatedNumber;
|
2010-12-03 19:40:23 +03:00
|
|
|
class SVGAnimatedNumberList;
|
2019-04-04 20:40:56 +03:00
|
|
|
class SVGAnimatedNumberPair;
|
|
|
|
class SVGAnimatedOrient;
|
2010-11-08 18:07:00 +03:00
|
|
|
class SVGAnimatedPathSegList;
|
2019-01-06 11:22:55 +03:00
|
|
|
class SVGAnimatedPointList;
|
2019-04-04 20:40:56 +03:00
|
|
|
class SVGAnimatedString;
|
2010-12-20 03:45:29 +03:00
|
|
|
class SVGAnimatedPreserveAspectRatio;
|
2018-12-27 02:46:38 +03:00
|
|
|
class SVGAnimatedTransformList;
|
2019-04-04 20:40:56 +03:00
|
|
|
class SVGAnimatedViewBox;
|
2019-01-06 11:22:55 +03:00
|
|
|
class SVGNumberList;
|
2011-12-31 13:44:03 +04:00
|
|
|
class SVGStringList;
|
2019-04-04 20:40:56 +03:00
|
|
|
class SVGUserUnitList;
|
2013-12-29 01:37:40 +04:00
|
|
|
|
2019-01-02 21:24:11 +03:00
|
|
|
struct SVGEnumMapping;
|
|
|
|
|
2018-12-21 11:58:14 +03:00
|
|
|
namespace dom {
|
2019-09-21 17:38:56 +03:00
|
|
|
class DOMSVGStringList;
|
2018-12-21 11:58:14 +03:00
|
|
|
class SVGSVGElement;
|
|
|
|
class SVGViewportElement;
|
2012-01-26 13:57:21 +04:00
|
|
|
|
2020-07-15 13:37:55 +03:00
|
|
|
using SVGElementBase = nsStyledElement;
|
2007-08-06 19:27:19 +04:00
|
|
|
|
2018-12-21 11:58:14 +03:00
|
|
|
class SVGElement : public SVGElementBase // nsIContent
|
2001-12-12 10:59:31 +03:00
|
|
|
{
|
|
|
|
protected:
|
2018-12-21 11:58:14 +03:00
|
|
|
explicit SVGElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
|
|
|
friend nsresult(
|
|
|
|
::NS_NewSVGElement(mozilla::dom::Element** aResult,
|
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
|
2006-04-14 19:09:39 +04:00
|
|
|
nsresult Init();
|
2018-12-21 11:58:14 +03:00
|
|
|
virtual ~SVGElement();
|
2001-12-12 10:59:31 +03:00
|
|
|
|
|
|
|
public:
|
2022-12-03 22:18:26 +03:00
|
|
|
nsresult Clone(mozilla::dom::NodeInfo*,
|
|
|
|
nsINode** aResult) const MOZ_MUST_OVERRIDE override;
|
2013-03-28 05:23:10 +04:00
|
|
|
|
2020-02-29 15:35:46 +03:00
|
|
|
// From Element
|
|
|
|
nsresult CopyInnerTo(mozilla::dom::Element* aDest);
|
|
|
|
|
2020-08-25 21:25:52 +03:00
|
|
|
NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_SVGELEMENT_IID)
|
2001-12-12 10:59:31 +03:00
|
|
|
// nsISupports
|
2018-12-21 11:58:14 +03:00
|
|
|
NS_INLINE_DECL_REFCOUNTING_INHERITED(SVGElement, SVGElementBase)
|
2001-12-12 10:59:31 +03:00
|
|
|
|
2019-06-08 21:58:57 +03:00
|
|
|
NS_DECL_ADDSIZEOFEXCLUDINGTHIS
|
|
|
|
|
2020-08-25 21:25:52 +03:00
|
|
|
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) override;
|
|
|
|
|
2012-12-23 12:22:22 +04:00
|
|
|
void DidAnimateClass();
|
|
|
|
|
2020-02-29 15:35:46 +03:00
|
|
|
void SetNonce(const nsAString& aNonce) {
|
|
|
|
SetProperty(nsGkAtoms::nonce, new nsString(aNonce),
|
2023-05-17 19:38:44 +03:00
|
|
|
nsINode::DeleteProperty<nsString>, /* aTransfer = */ true);
|
2020-02-29 15:35:46 +03:00
|
|
|
}
|
|
|
|
void RemoveNonce() { RemoveProperty(nsGkAtoms::nonce); }
|
|
|
|
void GetNonce(nsAString& aNonce) const {
|
|
|
|
nsString* cspNonce = static_cast<nsString*>(GetProperty(nsGkAtoms::nonce));
|
|
|
|
if (cspNonce) {
|
|
|
|
aNonce = *cspNonce;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-12-12 10:59:31 +03:00
|
|
|
// nsIContent interface methods
|
|
|
|
|
2022-12-03 22:18:26 +03:00
|
|
|
nsresult BindToTree(BindContext&, nsINode& aParent) override;
|
2008-01-01 13:51:40 +03:00
|
|
|
|
2022-12-03 22:18:26 +03:00
|
|
|
nsChangeHint GetAttributeChangeHint(const nsAtom* aAttribute,
|
|
|
|
int32_t aModType) const override;
|
2008-08-05 16:01:47 +04:00
|
|
|
|
2017-02-23 04:19:04 +03:00
|
|
|
/**
|
|
|
|
* We override the default to unschedule computation of Servo declaration
|
|
|
|
* blocks when adopted across documents.
|
|
|
|
*/
|
2022-12-03 22:18:26 +03:00
|
|
|
void NodeInfoChanged(Document* aOldDoc) override;
|
2017-02-23 04:19:04 +03:00
|
|
|
|
2017-10-03 01:05:19 +03:00
|
|
|
NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* aAttribute) const override;
|
2023-06-22 20:22:03 +03:00
|
|
|
void UpdateMappedDeclarationBlock();
|
2012-02-20 00:49:34 +04:00
|
|
|
|
2018-12-21 11:58:14 +03:00
|
|
|
NS_IMPL_FROMNODE(SVGElement, kNameSpaceID_SVG)
|
2017-02-23 04:19:04 +03:00
|
|
|
|
2008-01-25 23:51:13 +03:00
|
|
|
// Gets the element that establishes the rectangular viewport against which
|
|
|
|
// we should resolve percentage lengths (our "coordinate context"). Returns
|
2012-07-30 18:20:58 +04:00
|
|
|
// nullptr for outer <svg> or SVG without an <svg> parent (invalid SVG).
|
2017-10-10 09:58:34 +03:00
|
|
|
mozilla::dom::SVGViewportElement* GetCtx() const;
|
2006-04-14 19:09:39 +04:00
|
|
|
|
2009-04-29 08:31:34 +04:00
|
|
|
/**
|
2024-09-02 20:26:21 +03:00
|
|
|
* Returns the transforms from the coordinate space established by this
|
|
|
|
* element for its children to this element's userspace. This includes any
|
|
|
|
* offsets due to e.g. 'x'/'y' attributes, and any transform due to a
|
|
|
|
* 'viewBox' attribute.
|
2009-04-29 08:31:34 +04:00
|
|
|
*/
|
2024-09-02 20:26:21 +03:00
|
|
|
virtual gfxMatrix ChildToUserSpaceTransform() const;
|
2009-04-29 08:31:34 +04:00
|
|
|
|
2010-04-29 03:00:54 +04:00
|
|
|
// Setter for to set the current <animateMotion> transformation
|
2020-07-11 05:20:20 +03:00
|
|
|
// Only visible for SVGGraphicElement, so it's a no-op here, and that
|
2010-04-29 03:00:54 +04:00
|
|
|
// subclass has the useful implementation.
|
2013-12-29 01:37:40 +04:00
|
|
|
virtual void SetAnimateMotionTransform(
|
Bug 1519636 - Reformat recent changes to the Google coding style r=emilio,necko-reviewers,geckoview-reviewers,application-update-reviewers,media-playback-reviewers,devtools-reviewers,anti-tracking-reviewers,profiler-reviewers,win-reviewers,migration-reviewers,padenot,mconley,nchevobbe,kershaw,gstoll,mstange,bytesized,m_kato
This new version of clang 17 also slightly changed the formatting.
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D215914
2024-07-17 14:15:31 +03:00
|
|
|
const mozilla::gfx::Matrix* aMatrix) { /*no-op*/ }
|
2013-12-29 01:37:40 +04:00
|
|
|
virtual const mozilla::gfx::Matrix* GetAnimateMotionTransform() const {
|
|
|
|
return nullptr;
|
2018-11-30 13:46:48 +03:00
|
|
|
}
|
2010-04-29 03:00:54 +04:00
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
bool IsStringAnimatable(uint8_t aAttrEnum) {
|
2021-04-23 22:39:37 +03:00
|
|
|
return GetStringInfo().mInfos[aAttrEnum].mIsAnimatable;
|
2010-10-07 23:19:32 +04:00
|
|
|
}
|
2012-08-22 19:56:38 +04:00
|
|
|
bool NumberAttrAllowsPercentage(uint8_t aAttrEnum) {
|
2023-10-12 12:40:24 +03:00
|
|
|
return IsSVGElement(nsGkAtoms::stop) &&
|
|
|
|
GetNumberInfo().mInfos[aAttrEnum].mName == nsGkAtoms::offset;
|
2010-12-05 23:33:31 +03:00
|
|
|
}
|
2012-03-03 13:21:09 +04:00
|
|
|
virtual bool HasValidDimensions() const { return true; }
|
2019-04-09 23:04:33 +03:00
|
|
|
void SetLength(nsAtom* aName, const SVGAnimatedLength& aLength);
|
2012-02-16 03:40:45 +04:00
|
|
|
|
2019-05-16 16:21:20 +03:00
|
|
|
enum class ValToUse { Base, Anim };
|
2024-08-21 18:00:48 +03:00
|
|
|
static bool UpdateDeclarationBlockFromLength(StyleLockedDeclarationBlock&,
|
|
|
|
nsCSSPropertyID,
|
|
|
|
const SVGAnimatedLength&,
|
|
|
|
ValToUse);
|
|
|
|
static bool UpdateDeclarationBlockFromPath(StyleLockedDeclarationBlock&,
|
|
|
|
const SVGAnimatedPathSegList&,
|
|
|
|
ValToUse);
|
|
|
|
static bool UpdateDeclarationBlockFromTransform(
|
|
|
|
StyleLockedDeclarationBlock&, const SVGAnimatedTransformList*,
|
|
|
|
const gfx::Matrix* aAnimateMotionTransform, ValToUse);
|
2019-05-16 16:21:20 +03:00
|
|
|
|
2020-01-17 13:00:28 +03:00
|
|
|
nsAttrValue WillChangeLength(uint8_t aAttrEnum,
|
|
|
|
const mozAutoDocUpdate& aProofOfUpdate);
|
2012-08-22 19:56:38 +04:00
|
|
|
nsAttrValue WillChangeNumberPair(uint8_t aAttrEnum);
|
2020-01-17 13:00:28 +03:00
|
|
|
nsAttrValue WillChangeIntegerPair(uint8_t aAttrEnum,
|
|
|
|
const mozAutoDocUpdate& aProofOfUpdate);
|
|
|
|
nsAttrValue WillChangeOrient(const mozAutoDocUpdate& aProofOfUpdate);
|
|
|
|
nsAttrValue WillChangeViewBox(const mozAutoDocUpdate& aProofOfUpdate);
|
|
|
|
nsAttrValue WillChangePreserveAspectRatio(
|
|
|
|
const mozAutoDocUpdate& aProofOfUpdate);
|
|
|
|
nsAttrValue WillChangeNumberList(uint8_t aAttrEnum,
|
|
|
|
const mozAutoDocUpdate& aProofOfUpdate);
|
|
|
|
nsAttrValue WillChangeLengthList(uint8_t aAttrEnum,
|
|
|
|
const mozAutoDocUpdate& aProofOfUpdate);
|
|
|
|
nsAttrValue WillChangePointList(const mozAutoDocUpdate& aProofOfUpdate);
|
|
|
|
nsAttrValue WillChangePathSegList(const mozAutoDocUpdate& aProofOfUpdate);
|
|
|
|
nsAttrValue WillChangeTransformList(const mozAutoDocUpdate& aProofOfUpdate);
|
2012-02-16 03:40:46 +04:00
|
|
|
nsAttrValue WillChangeStringList(bool aIsConditionalProcessingAttribute,
|
2020-01-17 13:00:28 +03:00
|
|
|
uint8_t aAttrEnum,
|
|
|
|
const mozAutoDocUpdate& aProofOfUpdate);
|
2012-02-16 03:40:45 +04:00
|
|
|
|
2020-01-17 13:00:28 +03:00
|
|
|
void DidChangeLength(uint8_t aAttrEnum, const nsAttrValue& aEmptyOrOldValue,
|
|
|
|
const mozAutoDocUpdate& aProofOfUpdate);
|
2012-08-22 19:56:38 +04:00
|
|
|
void DidChangeNumber(uint8_t aAttrEnum);
|
|
|
|
void DidChangeNumberPair(uint8_t aAttrEnum,
|
2012-02-16 03:40:45 +04:00
|
|
|
const nsAttrValue& aEmptyOrOldValue);
|
2012-08-22 19:56:38 +04:00
|
|
|
void DidChangeInteger(uint8_t aAttrEnum);
|
|
|
|
void DidChangeIntegerPair(uint8_t aAttrEnum,
|
2020-01-17 13:00:28 +03:00
|
|
|
const nsAttrValue& aEmptyOrOldValue,
|
|
|
|
const mozAutoDocUpdate& aProofOfUpdate);
|
2012-08-22 19:56:38 +04:00
|
|
|
void DidChangeBoolean(uint8_t aAttrEnum);
|
|
|
|
void DidChangeEnum(uint8_t aAttrEnum);
|
2020-01-17 13:00:28 +03:00
|
|
|
void DidChangeOrient(const nsAttrValue& aEmptyOrOldValue,
|
|
|
|
const mozAutoDocUpdate& aProofOfUpdate);
|
|
|
|
void DidChangeViewBox(const nsAttrValue& aEmptyOrOldValue,
|
|
|
|
const mozAutoDocUpdate& aProofOfUpdate);
|
|
|
|
void DidChangePreserveAspectRatio(const nsAttrValue& aEmptyOrOldValue,
|
|
|
|
const mozAutoDocUpdate& aProofOfUpdate);
|
2012-08-22 19:56:38 +04:00
|
|
|
void DidChangeNumberList(uint8_t aAttrEnum,
|
2020-01-17 13:00:28 +03:00
|
|
|
const nsAttrValue& aEmptyOrOldValue,
|
|
|
|
const mozAutoDocUpdate& aProofOfUpdate);
|
2012-08-22 19:56:38 +04:00
|
|
|
void DidChangeLengthList(uint8_t aAttrEnum,
|
2020-01-17 13:00:28 +03:00
|
|
|
const nsAttrValue& aEmptyOrOldValue,
|
|
|
|
const mozAutoDocUpdate& aProofOfUpdate);
|
|
|
|
void DidChangePointList(const nsAttrValue& aEmptyOrOldValue,
|
|
|
|
const mozAutoDocUpdate& aProofOfUpdate);
|
|
|
|
void DidChangePathSegList(const nsAttrValue& aEmptyOrOldValue,
|
|
|
|
const mozAutoDocUpdate& aProofOfUpdate);
|
|
|
|
void DidChangeTransformList(const nsAttrValue& aEmptyOrOldValue,
|
|
|
|
const mozAutoDocUpdate& aProofOfUpdate);
|
2012-08-22 19:56:38 +04:00
|
|
|
void DidChangeString(uint8_t aAttrEnum) {}
|
2011-12-31 13:44:03 +04:00
|
|
|
void DidChangeStringList(bool aIsConditionalProcessingAttribute,
|
2012-08-22 19:56:38 +04:00
|
|
|
uint8_t aAttrEnum,
|
2020-01-17 13:00:28 +03:00
|
|
|
const nsAttrValue& aEmptyOrOldValue,
|
|
|
|
const mozAutoDocUpdate& aProofOfUpdate);
|
2006-04-14 19:09:39 +04:00
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
void DidAnimateLength(uint8_t aAttrEnum);
|
2023-07-13 15:15:22 +03:00
|
|
|
void DidAnimateNumber(uint8_t aAttrEnum) {
|
|
|
|
auto info = GetNumberInfo();
|
|
|
|
DidAnimateAttribute(kNameSpaceID_None, info.mInfos[aAttrEnum].mName);
|
|
|
|
}
|
|
|
|
void DidAnimateNumberPair(uint8_t aAttrEnum) {
|
|
|
|
auto info = GetNumberPairInfo();
|
|
|
|
DidAnimateAttribute(kNameSpaceID_None, info.mInfos[aAttrEnum].mName);
|
|
|
|
}
|
|
|
|
void DidAnimateInteger(uint8_t aAttrEnum) {
|
|
|
|
auto info = GetIntegerInfo();
|
|
|
|
DidAnimateAttribute(kNameSpaceID_None, info.mInfos[aAttrEnum].mName);
|
|
|
|
}
|
|
|
|
void DidAnimateIntegerPair(uint8_t aAttrEnum) {
|
|
|
|
auto info = GetIntegerPairInfo();
|
|
|
|
DidAnimateAttribute(kNameSpaceID_None, info.mInfos[aAttrEnum].mName);
|
|
|
|
}
|
|
|
|
void DidAnimateBoolean(uint8_t aAttrEnum) {
|
|
|
|
auto info = GetBooleanInfo();
|
|
|
|
DidAnimateAttribute(kNameSpaceID_None, info.mInfos[aAttrEnum].mName);
|
|
|
|
}
|
|
|
|
void DidAnimateEnum(uint8_t aAttrEnum) {
|
|
|
|
auto info = GetEnumInfo();
|
|
|
|
DidAnimateAttribute(kNameSpaceID_None, info.mInfos[aAttrEnum].mName);
|
|
|
|
}
|
|
|
|
void DidAnimateOrient() {
|
|
|
|
DidAnimateAttribute(kNameSpaceID_None, nsGkAtoms::orient);
|
|
|
|
}
|
|
|
|
void DidAnimateViewBox() {
|
|
|
|
DidAnimateAttribute(kNameSpaceID_None, nsGkAtoms::viewBox);
|
|
|
|
}
|
|
|
|
void DidAnimatePreserveAspectRatio() {
|
|
|
|
DidAnimateAttribute(kNameSpaceID_None, nsGkAtoms::preserveAspectRatio);
|
|
|
|
}
|
|
|
|
void DidAnimateNumberList(uint8_t aAttrEnum) {
|
|
|
|
auto info = GetNumberListInfo();
|
|
|
|
DidAnimateAttribute(kNameSpaceID_None, info.mInfos[aAttrEnum].mName);
|
|
|
|
}
|
|
|
|
void DidAnimateLengthList(uint8_t aAttrEnum) {
|
|
|
|
auto info = GetLengthListInfo();
|
|
|
|
DidAnimateAttribute(kNameSpaceID_None, info.mInfos[aAttrEnum].mName);
|
|
|
|
}
|
2012-02-19 13:04:06 +04:00
|
|
|
void DidAnimatePointList();
|
|
|
|
void DidAnimatePathSegList();
|
2014-04-07 23:52:12 +04:00
|
|
|
void DidAnimateTransformList(int32_t aModType);
|
2024-04-12 18:26:36 +03:00
|
|
|
void DidAnimateString(uint8_t aAttrEnum) {
|
2023-07-13 15:15:22 +03:00
|
|
|
auto info = GetStringInfo();
|
|
|
|
DidAnimateAttribute(info.mInfos[aAttrEnum].mNamespaceID,
|
|
|
|
info.mInfos[aAttrEnum].mName);
|
|
|
|
}
|
2009-01-15 07:38:07 +03:00
|
|
|
|
2012-07-30 04:35:26 +04:00
|
|
|
enum {
|
|
|
|
/**
|
|
|
|
* Flag to indicate to GetAnimatedXxx() methods that the object being
|
|
|
|
* requested should be allocated if it hasn't already been allocated, and
|
|
|
|
* that the method should not return null. Only applicable to methods that
|
|
|
|
* need to allocate the object that they return.
|
|
|
|
*/
|
|
|
|
DO_ALLOCATE = 0x1
|
|
|
|
};
|
|
|
|
|
2020-08-25 21:25:52 +03:00
|
|
|
SVGAnimatedLength* GetAnimatedLength(uint8_t aAttrEnum);
|
2019-04-09 23:04:33 +03:00
|
|
|
SVGAnimatedLength* GetAnimatedLength(const nsAtom* aAttrName);
|
2006-04-14 19:09:39 +04:00
|
|
|
void GetAnimatedLengthValues(float* aFirst, ...);
|
2006-07-28 22:10:48 +04:00
|
|
|
void GetAnimatedNumberValues(float* aFirst, ...);
|
2012-08-22 19:56:38 +04:00
|
|
|
void GetAnimatedIntegerValues(int32_t* aFirst, ...);
|
|
|
|
SVGAnimatedNumberList* GetAnimatedNumberList(uint8_t aAttrEnum);
|
2017-10-03 01:05:19 +03:00
|
|
|
SVGAnimatedNumberList* GetAnimatedNumberList(nsAtom* aAttrName);
|
2010-11-08 18:07:00 +03:00
|
|
|
void GetAnimatedLengthListValues(SVGUserUnitList* aFirst, ...);
|
2012-08-22 19:56:38 +04:00
|
|
|
SVGAnimatedLengthList* GetAnimatedLengthList(uint8_t aAttrEnum);
|
2010-12-08 15:15:53 +03:00
|
|
|
virtual SVGAnimatedPointList* GetAnimatedPointList() { return nullptr; }
|
2010-11-08 18:07:00 +03:00
|
|
|
virtual SVGAnimatedPathSegList* GetAnimPathSegList() {
|
2020-07-11 05:20:20 +03:00
|
|
|
// DOM interface 'SVGAnimatedPathData' (*inherited* by SVGPathElement)
|
2010-11-08 18:07:00 +03:00
|
|
|
// has a member called 'animatedPathSegList' member, so we have a shorter
|
|
|
|
// name so we don't get hidden by the GetAnimatedPathSegList declared by
|
|
|
|
// NS_DECL_NSIDOMSVGANIMATEDPATHDATA.
|
2012-07-30 18:20:58 +04:00
|
|
|
return nullptr;
|
2010-11-08 18:07:00 +03:00
|
|
|
}
|
2012-07-30 04:35:26 +04:00
|
|
|
/**
|
2018-12-27 02:46:38 +03:00
|
|
|
* Get the SVGAnimatedTransformList for this element.
|
2012-07-30 04:35:26 +04:00
|
|
|
*
|
|
|
|
* Despite the fact that animated transform lists are used for a variety of
|
|
|
|
* attributes, no SVG element uses more than one.
|
|
|
|
*
|
|
|
|
* It's relatively uncommon for elements to have their transform attribute
|
2018-12-27 02:46:38 +03:00
|
|
|
* set, so to save memory the SVGAnimatedTransformList is not allocated
|
2012-07-30 04:35:26 +04:00
|
|
|
* until the attribute is set/animated or its DOM wrapper is created. Callers
|
2018-12-27 02:46:38 +03:00
|
|
|
* that require the SVGAnimatedTransformList to be allocated and for this
|
2012-07-30 04:35:26 +04:00
|
|
|
* method to return non-null must pass the DO_ALLOCATE flag.
|
|
|
|
*/
|
2018-12-27 02:46:38 +03:00
|
|
|
virtual SVGAnimatedTransformList* GetAnimatedTransformList(
|
2012-08-22 19:56:38 +04:00
|
|
|
uint32_t aFlags = 0) {
|
2012-07-30 18:20:58 +04:00
|
|
|
return nullptr;
|
2011-09-26 01:04:31 +04:00
|
|
|
}
|
2006-07-28 22:10:48 +04:00
|
|
|
|
2019-01-25 06:24:01 +03:00
|
|
|
mozilla::UniquePtr<SMILAttr> GetAnimatedAttr(int32_t aNamespaceID,
|
|
|
|
nsAtom* aName) override;
|
2009-01-22 04:00:27 +03:00
|
|
|
void AnimationNeedsResample();
|
|
|
|
void FlushAnimations();
|
2009-01-15 07:38:07 +03:00
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
void GetStringBaseValue(uint8_t aAttrEnum, nsAString& aResult) const;
|
|
|
|
void SetStringBaseValue(uint8_t aAttrEnum, const nsAString& aValue);
|
2009-01-22 03:56:51 +03:00
|
|
|
|
2018-03-29 12:45:24 +03:00
|
|
|
virtual nsStaticAtom* GetPointListAttrName() const { return nullptr; }
|
|
|
|
virtual nsStaticAtom* GetPathDataAttrName() const { return nullptr; }
|
|
|
|
virtual nsStaticAtom* GetTransformListAttrName() const { return nullptr; }
|
2014-05-30 11:36:53 +04:00
|
|
|
const nsAttrValue* GetAnimatedClassName() const {
|
|
|
|
if (!mClassAttribute.IsAnimated()) {
|
|
|
|
return nullptr;
|
|
|
|
}
|
2020-02-25 23:03:26 +03:00
|
|
|
return mClassAnimAttr.get();
|
2014-05-30 11:36:53 +04:00
|
|
|
}
|
2010-11-08 18:07:00 +03:00
|
|
|
|
2014-10-04 15:13:30 +04:00
|
|
|
virtual void ClearAnyCachedPath() {}
|
2013-03-28 05:23:09 +04:00
|
|
|
virtual bool IsTransformable() { return false; }
|
|
|
|
|
2012-12-23 12:22:58 +04:00
|
|
|
// WebIDL
|
2013-08-07 21:40:52 +04:00
|
|
|
mozilla::dom::SVGSVGElement* GetOwnerSVGElement();
|
2018-12-21 11:58:14 +03:00
|
|
|
SVGElement* GetViewportElement();
|
2019-03-19 03:01:03 +03:00
|
|
|
already_AddRefed<mozilla::dom::DOMSVGAnimatedString> ClassName();
|
2016-09-28 15:05:28 +03:00
|
|
|
|
2022-12-19 18:09:15 +03:00
|
|
|
bool Autofocus() const { return GetBoolAttr(nsGkAtoms::autofocus); }
|
|
|
|
void SetAutofocus(bool aAutofocus, ErrorResult& aRv) {
|
|
|
|
if (aAutofocus) {
|
|
|
|
SetAttr(nsGkAtoms::autofocus, u""_ns, aRv);
|
|
|
|
} else {
|
|
|
|
UnsetAttr(nsGkAtoms::autofocus, aRv);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-12-12 10:59:31 +03:00
|
|
|
protected:
|
2022-12-03 22:18:26 +03:00
|
|
|
JSObject* WrapNode(JSContext* cx, JS::Handle<JSObject*> aGivenProto) override;
|
2012-12-23 12:22:58 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
// We define BeforeSetAttr here and mark it final to ensure it is NOT used
|
2012-02-16 03:40:45 +04:00
|
|
|
// 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.
|
2018-12-21 11:58:14 +03:00
|
|
|
// See the comment in SVGElement::WillChangeValue.
|
2023-04-21 11:56:27 +03:00
|
|
|
void BeforeSetAttr(int32_t aNamespaceID, nsAtom* aName,
|
2023-04-21 12:25:17 +03:00
|
|
|
const nsAttrValue* aValue, bool aNotify) final;
|
2023-04-21 11:56:27 +03:00
|
|
|
void AfterSetAttr(int32_t aNamespaceID, nsAtom* aName,
|
|
|
|
const nsAttrValue* aValue, const nsAttrValue* aOldValue,
|
|
|
|
nsIPrincipal* aSubjectPrincipal, bool aNotify) override;
|
2022-12-03 22:18:26 +03:00
|
|
|
bool ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
|
|
|
|
const nsAString& aValue,
|
|
|
|
nsIPrincipal* aMaybeScriptedPrincipal,
|
|
|
|
nsAttrValue& aResult) override;
|
2019-01-02 16:05:23 +03:00
|
|
|
static nsresult ReportAttributeParseFailure(Document* aDocument,
|
2017-10-03 01:05:19 +03:00
|
|
|
nsAtom* aAttribute,
|
2009-01-15 07:38:07 +03:00
|
|
|
const nsAString& aValue);
|
2005-10-28 06:59:38 +04:00
|
|
|
|
2020-01-17 13:00:28 +03:00
|
|
|
nsAttrValue WillChangeValue(nsAtom* aName,
|
|
|
|
const mozAutoDocUpdate& aProofOfUpdate);
|
2015-07-25 08:57:13 +03:00
|
|
|
// aNewValue is set to the old value. This value may be invalid if
|
|
|
|
// !StoresOwnData.
|
2018-03-29 12:45:24 +03:00
|
|
|
void DidChangeValue(nsAtom* aName, const nsAttrValue& aEmptyOrOldValue,
|
2020-01-17 13:00:28 +03:00
|
|
|
nsAttrValue& aNewValue,
|
|
|
|
const mozAutoDocUpdate& aProofOfUpdate);
|
2017-10-03 01:05:19 +03:00
|
|
|
void MaybeSerializeAttrBeforeRemoval(nsAtom* aName, bool aNotify);
|
2012-02-16 03:40:45 +04:00
|
|
|
|
2021-11-04 21:24:58 +03:00
|
|
|
nsAtom* GetEventNameForAttr(nsAtom* aAttr) override;
|
2004-07-22 20:38:05 +04:00
|
|
|
|
2006-04-14 19:09:39 +04:00
|
|
|
struct LengthInfo {
|
2018-03-29 12:45:24 +03:00
|
|
|
nsStaticAtom* const mName;
|
|
|
|
const float mDefaultValue;
|
|
|
|
const uint8_t mDefaultUnitType;
|
|
|
|
const uint8_t mCtxType;
|
2006-04-14 19:09:39 +04:00
|
|
|
};
|
|
|
|
|
2021-04-23 22:39:37 +03:00
|
|
|
template <typename Value, typename InfoValue>
|
|
|
|
struct AttributesInfo {
|
|
|
|
Value* const mValues;
|
|
|
|
const InfoValue* const mInfos;
|
|
|
|
const uint32_t mCount;
|
2006-04-14 19:09:39 +04:00
|
|
|
|
2021-04-23 22:39:37 +03:00
|
|
|
AttributesInfo(Value* aValues, const InfoValue* aInfos, uint32_t aCount)
|
|
|
|
: mValues(aValues), mInfos(aInfos), mCount(aCount) {}
|
2007-11-22 11:54:31 +03:00
|
|
|
|
2021-04-23 22:39:38 +03:00
|
|
|
void CopyAllFrom(const AttributesInfo&);
|
2021-04-23 22:39:37 +03:00
|
|
|
void ResetAll();
|
|
|
|
void Reset(uint8_t aEnum);
|
2006-04-14 19:09:39 +04:00
|
|
|
};
|
|
|
|
|
2021-04-23 22:39:37 +03:00
|
|
|
using LengthAttributesInfo = AttributesInfo<SVGAnimatedLength, LengthInfo>;
|
|
|
|
|
2006-07-28 22:10:48 +04:00
|
|
|
struct NumberInfo {
|
2018-03-29 12:45:24 +03:00
|
|
|
nsStaticAtom* const mName;
|
|
|
|
const float mDefaultValue;
|
2006-07-28 22:10:48 +04:00
|
|
|
};
|
|
|
|
|
2021-04-23 22:39:37 +03:00
|
|
|
using NumberAttributesInfo = AttributesInfo<SVGAnimatedNumber, NumberInfo>;
|
2006-07-28 22:10:48 +04:00
|
|
|
|
2011-07-01 11:19:52 +04:00
|
|
|
struct NumberPairInfo {
|
2018-03-29 12:45:24 +03:00
|
|
|
nsStaticAtom* const mName;
|
|
|
|
const float mDefaultValue1;
|
|
|
|
const float mDefaultValue2;
|
2011-07-01 11:19:52 +04:00
|
|
|
};
|
|
|
|
|
2021-04-23 22:39:37 +03:00
|
|
|
using NumberPairAttributesInfo =
|
|
|
|
AttributesInfo<SVGAnimatedNumberPair, NumberPairInfo>;
|
2011-07-01 11:19:52 +04:00
|
|
|
|
2007-09-18 16:09:26 +04:00
|
|
|
struct IntegerInfo {
|
2018-03-29 12:45:24 +03:00
|
|
|
nsStaticAtom* const mName;
|
|
|
|
const int32_t mDefaultValue;
|
2007-09-18 16:09:26 +04:00
|
|
|
};
|
|
|
|
|
2021-04-23 22:39:37 +03:00
|
|
|
using IntegerAttributesInfo = AttributesInfo<SVGAnimatedInteger, IntegerInfo>;
|
2007-09-18 16:09:26 +04:00
|
|
|
|
2011-07-01 11:19:52 +04:00
|
|
|
struct IntegerPairInfo {
|
2018-03-29 12:45:24 +03:00
|
|
|
nsStaticAtom* const mName;
|
|
|
|
const int32_t mDefaultValue1;
|
|
|
|
const int32_t mDefaultValue2;
|
2011-07-01 11:19:52 +04:00
|
|
|
};
|
|
|
|
|
2021-04-23 22:39:37 +03:00
|
|
|
using IntegerPairAttributesInfo =
|
|
|
|
AttributesInfo<SVGAnimatedIntegerPair, IntegerPairInfo>;
|
2011-07-01 11:19:52 +04:00
|
|
|
|
2007-09-26 13:22:08 +04:00
|
|
|
struct BooleanInfo {
|
2018-03-29 12:45:24 +03:00
|
|
|
nsStaticAtom* const mName;
|
|
|
|
const bool mDefaultValue;
|
2007-09-26 13:22:08 +04:00
|
|
|
};
|
|
|
|
|
2021-04-23 22:39:37 +03:00
|
|
|
using BooleanAttributesInfo = AttributesInfo<SVGAnimatedBoolean, BooleanInfo>;
|
2007-09-26 13:22:08 +04:00
|
|
|
|
2019-04-04 20:40:56 +03:00
|
|
|
friend class mozilla::SVGAnimatedEnumeration;
|
2007-09-18 16:09:26 +04:00
|
|
|
|
2007-08-28 03:11:14 +04:00
|
|
|
struct EnumInfo {
|
2018-03-29 12:45:24 +03:00
|
|
|
nsStaticAtom* const mName;
|
2019-01-02 21:24:11 +03:00
|
|
|
const SVGEnumMapping* const mMapping;
|
2018-03-29 12:45:24 +03:00
|
|
|
const uint16_t mDefaultValue;
|
2007-08-28 03:11:14 +04:00
|
|
|
};
|
|
|
|
|
2021-04-23 22:39:37 +03:00
|
|
|
using EnumAttributesInfo = AttributesInfo<SVGAnimatedEnumeration, EnumInfo>;
|
2007-08-28 03:11:14 +04:00
|
|
|
|
2010-12-03 19:40:23 +03:00
|
|
|
struct NumberListInfo {
|
2018-03-29 12:45:24 +03:00
|
|
|
nsStaticAtom* const mName;
|
2010-12-03 19:40:23 +03:00
|
|
|
};
|
|
|
|
|
2021-04-23 22:39:37 +03:00
|
|
|
using NumberListAttributesInfo =
|
|
|
|
AttributesInfo<SVGAnimatedNumberList, NumberListInfo>;
|
2010-12-03 19:40:23 +03:00
|
|
|
|
2010-07-17 01:42:12 +04:00
|
|
|
struct LengthListInfo {
|
2018-03-29 12:45:24 +03:00
|
|
|
nsStaticAtom* const mName;
|
|
|
|
const uint8_t mAxis;
|
2010-07-17 01:42:12 +04:00
|
|
|
/**
|
|
|
|
* Flag to indicate whether appending zeros to the end of the list would
|
|
|
|
* change the rendering of the SVG for the attribute in question. For x and
|
|
|
|
* y on the <text> element this is true, but for dx and dy on <text> this
|
|
|
|
* is false. This flag is fed down to SVGLengthListSMILType so it can
|
|
|
|
* determine if it can sensibly animate from-to lists of different lengths,
|
|
|
|
* which is desirable in the case of dx and dy.
|
|
|
|
*/
|
2018-03-29 12:45:24 +03:00
|
|
|
const bool mCouldZeroPadList;
|
2010-07-17 01:42:12 +04:00
|
|
|
};
|
|
|
|
|
2021-04-23 22:39:37 +03:00
|
|
|
using LengthListAttributesInfo =
|
|
|
|
AttributesInfo<SVGAnimatedLengthList, LengthListInfo>;
|
2010-07-17 01:42:12 +04:00
|
|
|
|
2008-06-14 13:01:02 +04:00
|
|
|
struct StringInfo {
|
2018-03-29 12:45:24 +03:00
|
|
|
nsStaticAtom* const mName;
|
|
|
|
const int32_t mNamespaceID;
|
|
|
|
const bool mIsAnimatable;
|
2008-06-14 13:01:02 +04:00
|
|
|
};
|
|
|
|
|
2021-04-23 22:39:37 +03:00
|
|
|
using StringAttributesInfo = AttributesInfo<SVGAnimatedString, StringInfo>;
|
2008-06-14 13:01:02 +04:00
|
|
|
|
2019-09-21 17:38:56 +03:00
|
|
|
friend class DOMSVGStringList;
|
2011-12-31 13:44:03 +04:00
|
|
|
|
|
|
|
struct StringListInfo {
|
2018-03-29 12:45:24 +03:00
|
|
|
nsStaticAtom* const mName;
|
2011-12-31 13:44:03 +04:00
|
|
|
};
|
|
|
|
|
2021-04-23 22:39:37 +03:00
|
|
|
using StringListAttributesInfo =
|
|
|
|
AttributesInfo<SVGStringList, StringListInfo>;
|
2011-12-31 13:44:03 +04:00
|
|
|
|
2006-04-14 19:09:39 +04:00
|
|
|
virtual LengthAttributesInfo GetLengthInfo();
|
2006-07-28 22:10:48 +04:00
|
|
|
virtual NumberAttributesInfo GetNumberInfo();
|
2011-07-01 11:19:52 +04:00
|
|
|
virtual NumberPairAttributesInfo GetNumberPairInfo();
|
2007-09-18 16:09:26 +04:00
|
|
|
virtual IntegerAttributesInfo GetIntegerInfo();
|
2011-07-01 11:19:52 +04:00
|
|
|
virtual IntegerPairAttributesInfo GetIntegerPairInfo();
|
2007-09-26 13:22:08 +04:00
|
|
|
virtual BooleanAttributesInfo GetBooleanInfo();
|
|
|
|
virtual EnumAttributesInfo GetEnumInfo();
|
2019-02-15 11:41:37 +03:00
|
|
|
// We assume all orients, viewboxes and preserveAspectRatios are alike
|
2009-02-03 17:42:24 +03:00
|
|
|
// so we don't need to wrap the class
|
2019-04-10 07:08:14 +03:00
|
|
|
virtual SVGAnimatedOrient* GetAnimatedOrient();
|
|
|
|
virtual SVGAnimatedPreserveAspectRatio* GetAnimatedPreserveAspectRatio();
|
|
|
|
virtual SVGAnimatedViewBox* GetAnimatedViewBox();
|
2010-12-03 19:40:23 +03:00
|
|
|
virtual NumberListAttributesInfo GetNumberListInfo();
|
2010-07-17 01:42:12 +04:00
|
|
|
virtual LengthListAttributesInfo GetLengthListInfo();
|
2008-06-14 13:01:02 +04:00
|
|
|
virtual StringAttributesInfo GetStringInfo();
|
2011-12-31 13:44:03 +04:00
|
|
|
virtual StringListAttributesInfo GetStringListInfo();
|
2006-04-14 19:09:39 +04:00
|
|
|
|
2019-01-02 21:24:11 +03:00
|
|
|
static SVGEnumMapping sSVGUnitTypesMap[];
|
2007-10-10 14:07:59 +04:00
|
|
|
|
2024-04-12 18:26:36 +03:00
|
|
|
virtual void DidAnimateAttribute(int32_t aNameSpaceID, nsAtom* aAttribute);
|
2023-07-13 15:15:22 +03:00
|
|
|
|
2024-04-12 18:26:36 +03:00
|
|
|
private:
|
2019-04-27 10:57:50 +03:00
|
|
|
void UnsetAttrInternal(int32_t aNameSpaceID, nsAtom* aName, bool aNotify);
|
2011-10-08 10:32:44 +04:00
|
|
|
|
2019-04-04 20:40:56 +03:00
|
|
|
SVGAnimatedClass mClassAttribute;
|
2020-02-25 23:03:26 +03:00
|
|
|
UniquePtr<nsAttrValue> mClassAnimAttr;
|
2001-12-12 10:59:31 +03:00
|
|
|
};
|
|
|
|
|
2020-08-25 21:25:52 +03:00
|
|
|
NS_DEFINE_STATIC_IID_ACCESSOR(SVGElement, MOZILLA_SVGELEMENT_IID)
|
|
|
|
|
2004-05-19 00:58:12 +04:00
|
|
|
/**
|
|
|
|
* A macro to implement the NS_NewSVGXXXElement() functions.
|
|
|
|
*/
|
2020-03-17 17:53:16 +03:00
|
|
|
#define NS_IMPL_NS_NEW_SVG_ELEMENT(_elementName) \
|
|
|
|
nsresult NS_NewSVG##_elementName##Element( \
|
|
|
|
nsIContent** aResult, \
|
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo) { \
|
|
|
|
RefPtr<mozilla::dom::NodeInfo> nodeInfo(aNodeInfo); \
|
|
|
|
auto* nim = nodeInfo->NodeInfoManager(); \
|
|
|
|
RefPtr<mozilla::dom::SVG##_elementName##Element> it = \
|
|
|
|
new (nim) mozilla::dom::SVG##_elementName##Element(nodeInfo.forget()); \
|
|
|
|
\
|
|
|
|
nsresult rv = it->Init(); \
|
|
|
|
\
|
|
|
|
if (NS_FAILED(rv)) { \
|
|
|
|
return rv; \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
it.forget(aResult); \
|
|
|
|
\
|
|
|
|
return rv; \
|
2013-01-05 13:41:28 +04:00
|
|
|
}
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2020-03-17 17:53:16 +03:00
|
|
|
#define NS_IMPL_NS_NEW_SVG_ELEMENT_CHECK_PARSER(_elementName) \
|
|
|
|
nsresult NS_NewSVG##_elementName##Element( \
|
|
|
|
nsIContent** aResult, \
|
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo, \
|
|
|
|
mozilla::dom::FromParser aFromParser) { \
|
|
|
|
RefPtr<mozilla::dom::NodeInfo> nodeInfo(aNodeInfo); \
|
|
|
|
auto* nim = nodeInfo->NodeInfoManager(); \
|
|
|
|
RefPtr<mozilla::dom::SVG##_elementName##Element> it = \
|
|
|
|
new (nim) mozilla::dom::SVG##_elementName##Element(nodeInfo.forget(), \
|
|
|
|
aFromParser); \
|
|
|
|
\
|
|
|
|
nsresult rv = it->Init(); \
|
|
|
|
\
|
|
|
|
if (NS_FAILED(rv)) { \
|
|
|
|
return rv; \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
it.forget(aResult); \
|
|
|
|
\
|
|
|
|
return rv; \
|
2004-05-19 00:58:12 +04:00
|
|
|
}
|
|
|
|
|
2012-12-23 08:54:22 +04:00
|
|
|
// No unlinking, we'd need to null out the value pointer (the object it
|
2008-12-30 19:32:22 +03:00
|
|
|
// points to is held by the element) and null-check it everywhere.
|
|
|
|
#define NS_SVG_VAL_IMPL_CYCLE_COLLECTION(_val, _element) \
|
2013-08-02 05:29:05 +04:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_CLASS(_val) \
|
2008-12-30 19:32:22 +03:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(_val) \
|
2012-11-15 11:32:40 +04:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_element) \
|
2008-12-30 19:32:22 +03:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END \
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_0(_val)
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2012-12-23 08:54:22 +04:00
|
|
|
#define NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(_val, _element) \
|
2013-08-02 05:29:05 +04:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_CLASS(_val) \
|
2012-12-23 08:54:22 +04:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(_val) \
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER \
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_END \
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(_val) \
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_element) \
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END \
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(_val) \
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER \
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_TRACE_END
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2018-12-21 11:58:14 +03:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2020-07-15 02:40:05 +03:00
|
|
|
#endif // DOM_SVG_SVGELEMENT_H_
|