WebKit Bugzilla
Attachment 356811 Details for
Bug 191237
: Remove SVG properties tear-off objects
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
18-Conatiners
18-Conatiners.patch (text/plain), 43.94 KB, created by
Said Abou-Hallawa
on 2018-12-07 08:13:34 PST
(
hide
)
Description:
18-Conatiners
Filename:
MIME Type:
Creator:
Said Abou-Hallawa
Created:
2018-12-07 08:13:34 PST
Size:
43.94 KB
patch
obsolete
>diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index e49fa89b1b6..9f86b3e33ff 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,56 @@ >+2018-12-07 Said Abou-Hallawa <sabouhallawa@apple.com> >+ >+ Remove SVG properties tear-off objects >+ https://bugs.webkit.org/show_bug.cgi?id=191237 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Remove the SVG tear-off property references from the SVG container objects. >+ >+ * svg/SVGDefsElement.h: >+ * svg/SVGForeignObjectElement.cpp: >+ (WebCore::SVGForeignObjectElement::SVGForeignObjectElement): >+ (WebCore::SVGForeignObjectElement::parseAttribute): >+ (WebCore::SVGForeignObjectElement::registerAttributes): Deleted. >+ * svg/SVGForeignObjectElement.h: >+ * svg/SVGGElement.h: >+ * svg/SVGImageElement.cpp: >+ (WebCore::SVGImageElement::SVGImageElement): >+ (WebCore::SVGImageElement::parseAttribute): >+ (WebCore::SVGImageElement::haveLoadedRequiredResources const): >+ (WebCore::SVGImageElement::registerAttributes): Deleted. >+ (WebCore::SVGImageElement::haveLoadedRequiredResources): Deleted. >+ * svg/SVGImageElement.h: >+ * svg/SVGSVGElement.cpp: >+ (WebCore::SVGSVGElement::SVGSVGElement): >+ (WebCore::SVGSVGElement::setCurrentTranslate): >+ (WebCore::SVGSVGElement::parseAttribute): >+ (WebCore::SVGSVGElement::svgAttributeChanged): >+ (WebCore::checkIntersectionWithoutUpdatingLayout): >+ (WebCore::checkEnclosureWithoutUpdatingLayout): >+ (WebCore::SVGSVGElement::createSVGTransform): >+ (WebCore::SVGSVGElement::createSVGTransformFromMatrix): >+ (WebCore::SVGSVGElement::currentViewBoxRect const): >+ (WebCore::SVGSVGElement::viewBoxToViewTransform const): >+ (WebCore::SVGSVGElement::resetScrollAnchor): >+ (WebCore::SVGSVGElement::inheritViewAttributes): >+ (WebCore::SVGSVGElement::currentTranslate): Deleted. >+ (WebCore::SVGSVGElement::registerAttributes): Deleted. >+ * svg/SVGSVGElement.h: >+ * svg/SVGSymbolElement.h: >+ * svg/SVGUseElement.cpp: >+ (WebCore::SVGUseElement::SVGUseElement): >+ (WebCore::SVGUseElement::parseAttribute): >+ (WebCore::SVGUseElement::svgAttributeChanged): >+ (WebCore::SVGUseElement::toClipPath const): >+ (WebCore::SVGUseElement::findTarget const): >+ (WebCore::SVGUseElement::updateExternalDocument): >+ (WebCore::SVGUseElement::haveLoadedRequiredResources const): >+ (WebCore::SVGUseElement::registerAttributes): Deleted. >+ (WebCore::SVGUseElement::toClipPath): Deleted. >+ (WebCore::SVGUseElement::haveLoadedRequiredResources): Deleted. >+ * svg/SVGUseElement.h: >+ > 2018-12-06 Said Abou-Hallawa <sabouhallawa@apple.com> > > Remove SVG properties tear-off objects >diff --git a/Source/WebCore/svg/SVGDefsElement.h b/Source/WebCore/svg/SVGDefsElement.h >index df3c0403ecf..4341328e91d 100644 >--- a/Source/WebCore/svg/SVGDefsElement.h >+++ b/Source/WebCore/svg/SVGDefsElement.h >@@ -21,7 +21,6 @@ > > #pragma once > >-#include "SVGAnimatedBoolean.h" > #include "SVGExternalResourcesRequired.h" > #include "SVGGraphicsElement.h" > >@@ -35,15 +34,15 @@ public: > private: > SVGDefsElement(const QualifiedName&, Document&); > >- using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGDefsElement, SVGGraphicsElement, SVGExternalResourcesRequired>; >- const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; } >+ using PropertyRegistry = SVGPropertyOwnerRegistry<SVGDefsElement, SVGGraphicsElement, SVGExternalResourcesRequired>; >+ const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; } > > bool isValid() const final; > bool supportsFocus() const final { return false; } > > RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final; > >- AttributeOwnerProxy m_attributeOwnerProxy { *this }; >+ PropertyRegistry m_propertyRegistry { *this }; > }; > > } // namespace WebCore >diff --git a/Source/WebCore/svg/SVGForeignObjectElement.cpp b/Source/WebCore/svg/SVGForeignObjectElement.cpp >index 006a77311a8..8ca29f33354 100644 >--- a/Source/WebCore/svg/SVGForeignObjectElement.cpp >+++ b/Source/WebCore/svg/SVGForeignObjectElement.cpp >@@ -40,7 +40,14 @@ inline SVGForeignObjectElement::SVGForeignObjectElement(const QualifiedName& tag > , SVGExternalResourcesRequired(this) > { > ASSERT(hasTagName(SVGNames::foreignObjectTag)); >- registerAttributes(); >+ >+ static std::once_flag onceFlag; >+ std::call_once(onceFlag, [] { >+ PropertyRegistry::registerProperty<SVGNames::xAttr, &SVGForeignObjectElement::m_x>(); >+ PropertyRegistry::registerProperty<SVGNames::yAttr, &SVGForeignObjectElement::m_y>(); >+ PropertyRegistry::registerProperty<SVGNames::widthAttr, &SVGForeignObjectElement::m_width>(); >+ PropertyRegistry::registerProperty<SVGNames::heightAttr, &SVGForeignObjectElement::m_height>(); >+ }); > } > > Ref<SVGForeignObjectElement> SVGForeignObjectElement::create(const QualifiedName& tagName, Document& document) >@@ -48,29 +55,18 @@ Ref<SVGForeignObjectElement> SVGForeignObjectElement::create(const QualifiedName > return adoptRef(*new SVGForeignObjectElement(tagName, document)); > } > >-void SVGForeignObjectElement::registerAttributes() >-{ >- auto& registry = attributeRegistry(); >- if (!registry.isEmpty()) >- return; >- registry.registerAttribute<SVGNames::xAttr, &SVGForeignObjectElement::m_x>(); >- registry.registerAttribute<SVGNames::yAttr, &SVGForeignObjectElement::m_y>(); >- registry.registerAttribute<SVGNames::widthAttr, &SVGForeignObjectElement::m_width>(); >- registry.registerAttribute<SVGNames::heightAttr, &SVGForeignObjectElement::m_height>(); >-} >- > void SVGForeignObjectElement::parseAttribute(const QualifiedName& name, const AtomicString& value) > { > SVGParsingError parseError = NoError; > > if (name == SVGNames::xAttr) >- m_x.setValue(SVGLengthValue::construct(LengthModeWidth, value, parseError)); >+ m_x->setBaseValInternal(SVGLengthValue::construct(LengthModeWidth, value, parseError)); > else if (name == SVGNames::yAttr) >- m_y.setValue(SVGLengthValue::construct(LengthModeHeight, value, parseError)); >+ m_y->setBaseValInternal(SVGLengthValue::construct(LengthModeHeight, value, parseError)); > else if (name == SVGNames::widthAttr) >- m_width.setValue(SVGLengthValue::construct(LengthModeWidth, value, parseError)); >+ m_width->setBaseValInternal(SVGLengthValue::construct(LengthModeWidth, value, parseError)); > else if (name == SVGNames::heightAttr) >- m_height.setValue(SVGLengthValue::construct(LengthModeHeight, value, parseError)); >+ m_height->setBaseValInternal(SVGLengthValue::construct(LengthModeHeight, value, parseError)); > > reportAttributeParsingError(parseError, name, value); > >diff --git a/Source/WebCore/svg/SVGForeignObjectElement.h b/Source/WebCore/svg/SVGForeignObjectElement.h >index 306e1170ef9..971a86cb9fc 100644 >--- a/Source/WebCore/svg/SVGForeignObjectElement.h >+++ b/Source/WebCore/svg/SVGForeignObjectElement.h >@@ -19,8 +19,6 @@ > > #pragma once > >-#include "SVGAnimatedBoolean.h" >-#include "SVGAnimatedLength.h" > #include "SVGExternalResourcesRequired.h" > #include "SVGGraphicsElement.h" > #include "SVGNames.h" >@@ -33,25 +31,22 @@ class SVGForeignObjectElement final : public SVGGraphicsElement, public SVGExter > public: > static Ref<SVGForeignObjectElement> create(const QualifiedName&, Document&); > >- const SVGLengthValue& x() const { return m_x.currentValue(attributeOwnerProxy()); } >- const SVGLengthValue& y() const { return m_y.currentValue(attributeOwnerProxy()); } >- const SVGLengthValue& width() const { return m_width.currentValue(attributeOwnerProxy()); } >- const SVGLengthValue& height() const { return m_height.currentValue(attributeOwnerProxy()); } >+ const SVGLengthValue& x() const { return m_x->currentValue(); } >+ const SVGLengthValue& y() const { return m_y->currentValue(); } >+ const SVGLengthValue& width() const { return m_width->currentValue(); } >+ const SVGLengthValue& height() const { return m_height->currentValue(); } > >- RefPtr<SVGAnimatedLength> xAnimated() { return m_x.animatedProperty(attributeOwnerProxy()); } >- RefPtr<SVGAnimatedLength> yAnimated() { return m_y.animatedProperty(attributeOwnerProxy()); } >- RefPtr<SVGAnimatedLength> widthAnimated() { return m_width.animatedProperty(attributeOwnerProxy()); } >- RefPtr<SVGAnimatedLength> heightAnimated() { return m_height.animatedProperty(attributeOwnerProxy()); } >+ Ref<SVGAnimatedLength>& x() { return m_x; } >+ Ref<SVGAnimatedLength>& y() { return m_y; } >+ Ref<SVGAnimatedLength>& width() { return m_width; } >+ Ref<SVGAnimatedLength>& height() { return m_height; } > > private: > SVGForeignObjectElement(const QualifiedName&, Document&); > >- using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGForeignObjectElement, SVGGraphicsElement, SVGExternalResourcesRequired>; >- static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); } >- static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); } >- static void registerAttributes(); >+ using PropertyRegistry = SVGPropertyOwnerRegistry<SVGForeignObjectElement, SVGGraphicsElement, SVGExternalResourcesRequired>; >+ const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; } > >- const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; } > void parseAttribute(const QualifiedName&, const AtomicString&) final; > void svgAttributeChanged(const QualifiedName&) final; > >@@ -62,11 +57,11 @@ private: > bool isValid() const final { return SVGTests::isValid(); } > bool selfHasRelativeLengths() const final { return true; } > >- AttributeOwnerProxy m_attributeOwnerProxy { *this }; >- SVGAnimatedLengthAttribute m_x { LengthModeWidth }; >- SVGAnimatedLengthAttribute m_y { LengthModeHeight }; >- SVGAnimatedLengthAttribute m_width { LengthModeWidth }; >- SVGAnimatedLengthAttribute m_height { LengthModeHeight }; >+ PropertyRegistry m_propertyRegistry { *this }; >+ Ref<SVGAnimatedLength> m_x { SVGAnimatedLength::create(this, LengthModeWidth) }; >+ Ref<SVGAnimatedLength> m_y { SVGAnimatedLength::create(this, LengthModeHeight) }; >+ Ref<SVGAnimatedLength> m_width { SVGAnimatedLength::create(this, LengthModeWidth) }; >+ Ref<SVGAnimatedLength> m_height { SVGAnimatedLength::create(this, LengthModeHeight) }; > }; > > } // namespace WebCore >diff --git a/Source/WebCore/svg/SVGGElement.h b/Source/WebCore/svg/SVGGElement.h >index ba3acc3c62e..42d6c3f2cd8 100644 >--- a/Source/WebCore/svg/SVGGElement.h >+++ b/Source/WebCore/svg/SVGGElement.h >@@ -21,7 +21,6 @@ > > #pragma once > >-#include "SVGAnimatedBoolean.h" > #include "SVGExternalResourcesRequired.h" > #include "SVGGraphicsElement.h" > >@@ -38,16 +37,16 @@ private: > > RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final; > >- using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGGElement, SVGGraphicsElement, SVGExternalResourcesRequired>; >+ using PropertyRegistry = SVGPropertyOwnerRegistry<SVGGElement, SVGGraphicsElement, SVGExternalResourcesRequired>; >+ const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; } > >- const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; } > void parseAttribute(const QualifiedName&, const AtomicString&) final; > void svgAttributeChanged(const QualifiedName&) final; > > bool isValid() const final { return SVGTests::isValid(); } > bool rendererIsNeeded(const RenderStyle&) final; > >- AttributeOwnerProxy m_attributeOwnerProxy { *this }; >+ PropertyRegistry m_propertyRegistry { *this }; > }; > > } // namespace WebCore >diff --git a/Source/WebCore/svg/SVGImageElement.cpp b/Source/WebCore/svg/SVGImageElement.cpp >index 055992764c6..c262659236a 100644 >--- a/Source/WebCore/svg/SVGImageElement.cpp >+++ b/Source/WebCore/svg/SVGImageElement.cpp >@@ -43,7 +43,14 @@ inline SVGImageElement::SVGImageElement(const QualifiedName& tagName, Document& > , SVGURIReference(this) > , m_imageLoader(*this) > { >- registerAttributes(); >+ static std::once_flag onceFlag; >+ std::call_once(onceFlag, [] { >+ PropertyRegistry::registerProperty<SVGNames::xAttr, &SVGImageElement::m_x>(); >+ PropertyRegistry::registerProperty<SVGNames::yAttr, &SVGImageElement::m_y>(); >+ PropertyRegistry::registerProperty<SVGNames::widthAttr, &SVGImageElement::m_width>(); >+ PropertyRegistry::registerProperty<SVGNames::heightAttr, &SVGImageElement::m_height>(); >+ PropertyRegistry::registerProperty<SVGNames::preserveAspectRatioAttr, &SVGImageElement::m_preserveAspectRatio>(); >+ }); > } > > Ref<SVGImageElement> SVGImageElement::create(const QualifiedName& tagName, Document& document) >@@ -60,37 +67,25 @@ bool SVGImageElement::hasSingleSecurityOrigin() const > return !image || image->hasSingleSecurityOrigin(); > } > >-void SVGImageElement::registerAttributes() >-{ >- auto& registry = attributeRegistry(); >- if (!registry.isEmpty()) >- return; >- registry.registerAttribute<SVGNames::xAttr, &SVGImageElement::m_x>(); >- registry.registerAttribute<SVGNames::yAttr, &SVGImageElement::m_y>(); >- registry.registerAttribute<SVGNames::widthAttr, &SVGImageElement::m_width>(); >- registry.registerAttribute<SVGNames::heightAttr, &SVGImageElement::m_height>(); >- registry.registerAttribute<SVGNames::preserveAspectRatioAttr, &SVGImageElement::m_preserveAspectRatio>(); >-} >- > void SVGImageElement::parseAttribute(const QualifiedName& name, const AtomicString& value) > { > if (name == SVGNames::preserveAspectRatioAttr) { > SVGPreserveAspectRatioValue preserveAspectRatio; > preserveAspectRatio.parse(value); >- m_preserveAspectRatio.setValue(preserveAspectRatio); >+ m_preserveAspectRatio->setBaseValInternal(preserveAspectRatio); > return; > } > > SVGParsingError parseError = NoError; > > if (name == SVGNames::xAttr) >- m_x.setValue(SVGLengthValue::construct(LengthModeWidth, value, parseError)); >+ m_x->setBaseValInternal(SVGLengthValue::construct(LengthModeWidth, value, parseError)); > else if (name == SVGNames::yAttr) >- m_y.setValue(SVGLengthValue::construct(LengthModeHeight, value, parseError)); >+ m_y->setBaseValInternal(SVGLengthValue::construct(LengthModeHeight, value, parseError)); > else if (name == SVGNames::widthAttr) >- m_width.setValue(SVGLengthValue::construct(LengthModeWidth, value, parseError, ForbidNegativeLengths)); >+ m_width->setBaseValInternal(SVGLengthValue::construct(LengthModeWidth, value, parseError, ForbidNegativeLengths)); > else if (name == SVGNames::heightAttr) >- m_height.setValue(SVGLengthValue::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths)); >+ m_height->setBaseValInternal(SVGLengthValue::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths)); > > reportAttributeParsingError(parseError, name, value); > >@@ -139,7 +134,7 @@ RenderPtr<RenderElement> SVGImageElement::createElementRenderer(RenderStyle&& st > return createRenderer<RenderSVGImage>(*this, WTFMove(style)); > } > >-bool SVGImageElement::haveLoadedRequiredResources() >+bool SVGImageElement::haveLoadedRequiredResources() const > { > return !externalResourcesRequired() || !m_imageLoader.hasPendingActivity(); > } >diff --git a/Source/WebCore/svg/SVGImageElement.h b/Source/WebCore/svg/SVGImageElement.h >index 523be601217..95c65378581 100644 >--- a/Source/WebCore/svg/SVGImageElement.h >+++ b/Source/WebCore/svg/SVGImageElement.h >@@ -21,8 +21,6 @@ > > #pragma once > >-#include "SVGAnimatedLength.h" >-#include "SVGAnimatedPreserveAspectRatio.h" > #include "SVGExternalResourcesRequired.h" > #include "SVGGraphicsElement.h" > #include "SVGImageLoader.h" >@@ -38,27 +36,24 @@ public: > bool hasSingleSecurityOrigin() const; > const AtomicString& imageSourceURL() const final; > >- const SVGLengthValue& x() const { return m_x.currentValue(attributeOwnerProxy()); } >- const SVGLengthValue& y() const { return m_y.currentValue(attributeOwnerProxy()); } >- const SVGLengthValue& width() const { return m_width.currentValue(attributeOwnerProxy()); } >- const SVGLengthValue& height() const { return m_height.currentValue(attributeOwnerProxy()); } >- const SVGPreserveAspectRatioValue& preserveAspectRatio() const { return m_preserveAspectRatio.currentValue(attributeOwnerProxy()); } >+ const SVGLengthValue& x() const { return m_x->currentValue(); } >+ const SVGLengthValue& y() const { return m_y->currentValue(); } >+ const SVGLengthValue& width() const { return m_width->currentValue(); } >+ const SVGLengthValue& height() const { return m_height->currentValue(); } >+ const SVGPreserveAspectRatioValue& preserveAspectRatio() const { return m_preserveAspectRatio->currentValue(); } > >- RefPtr<SVGAnimatedLength> xAnimated() { return m_x.animatedProperty(attributeOwnerProxy()); } >- RefPtr<SVGAnimatedLength> yAnimated() { return m_y.animatedProperty(attributeOwnerProxy()); } >- RefPtr<SVGAnimatedLength> widthAnimated() { return m_width.animatedProperty(attributeOwnerProxy()); } >- RefPtr<SVGAnimatedLength> heightAnimated() { return m_height.animatedProperty(attributeOwnerProxy()); } >- RefPtr<SVGAnimatedPreserveAspectRatio> preserveAspectRatioAnimated() { return m_preserveAspectRatio.animatedProperty(attributeOwnerProxy()); } >+ Ref<SVGAnimatedLength>& x() { return m_x; } >+ Ref<SVGAnimatedLength>& y() { return m_y; } >+ Ref<SVGAnimatedLength>& width() { return m_width; } >+ Ref<SVGAnimatedLength>& height() { return m_height; } >+ Ref<SVGAnimatedPreserveAspectRatio>& preserveAspectRatio() { return m_preserveAspectRatio; } > > private: > SVGImageElement(const QualifiedName&, Document&); > >- using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGImageElement, SVGGraphicsElement, SVGExternalResourcesRequired, SVGURIReference>; >- static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); } >- static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); } >- static void registerAttributes(); >+ using PropertyRegistry = SVGPropertyOwnerRegistry<SVGImageElement, SVGGraphicsElement, SVGExternalResourcesRequired, SVGURIReference>; >+ const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; } > >- const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; } > void parseAttribute(const QualifiedName&, const AtomicString&) final; > void svgAttributeChanged(const QualifiedName&) final; > >@@ -67,18 +62,18 @@ private: > RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final; > > void addSubresourceAttributeURLs(ListHashSet<URL>&) const final; >- bool haveLoadedRequiredResources() final; >+ bool haveLoadedRequiredResources() const final; > > bool isValid() const final { return SVGTests::isValid(); } > bool selfHasRelativeLengths() const final { return true; } > void didMoveToNewDocument(Document& oldDocument, Document& newDocument) final; > >- AttributeOwnerProxy m_attributeOwnerProxy { *this }; >- SVGAnimatedLengthAttribute m_x { LengthModeWidth }; >- SVGAnimatedLengthAttribute m_y { LengthModeHeight }; >- SVGAnimatedLengthAttribute m_width { LengthModeWidth }; >- SVGAnimatedLengthAttribute m_height { LengthModeHeight }; >- SVGAnimatedPreserveAspectRatioAttribute m_preserveAspectRatio; >+ PropertyRegistry m_propertyRegistry { *this }; >+ Ref<SVGAnimatedLength> m_x { SVGAnimatedLength::create(this, LengthModeWidth) }; >+ Ref<SVGAnimatedLength> m_y { SVGAnimatedLength::create(this, LengthModeHeight) }; >+ Ref<SVGAnimatedLength> m_width { SVGAnimatedLength::create(this, LengthModeWidth) }; >+ Ref<SVGAnimatedLength> m_height { SVGAnimatedLength::create(this, LengthModeHeight) }; >+ Ref<SVGAnimatedPreserveAspectRatio> m_preserveAspectRatio { SVGAnimatedPreserveAspectRatio::create(this) }; > SVGImageLoader m_imageLoader; > }; > >diff --git a/Source/WebCore/svg/SVGSVGElement.cpp b/Source/WebCore/svg/SVGSVGElement.cpp >index 16171a305ed..a0d910929c7 100644 >--- a/Source/WebCore/svg/SVGSVGElement.cpp >+++ b/Source/WebCore/svg/SVGSVGElement.cpp >@@ -41,7 +41,6 @@ > #include "SVGNumber.h" > #include "SVGPoint.h" > #include "SVGRect.h" >-#include "SVGStaticPropertyTearOff.h" > #include "SVGTransform.h" > #include "SVGViewElement.h" > #include "SVGViewSpec.h" >@@ -59,8 +58,15 @@ inline SVGSVGElement::SVGSVGElement(const QualifiedName& tagName, Document& docu > , m_timeContainer(SMILTimeContainer::create(*this)) > { > ASSERT(hasTagName(SVGNames::svgTag)); >- registerAttributes(); > document.registerForDocumentSuspensionCallbacks(this); >+ >+ static std::once_flag onceFlag; >+ std::call_once(onceFlag, [] { >+ PropertyRegistry::registerProperty<SVGNames::xAttr, &SVGSVGElement::m_x>(); >+ PropertyRegistry::registerProperty<SVGNames::yAttr, &SVGSVGElement::m_y>(); >+ PropertyRegistry::registerProperty<SVGNames::widthAttr, &SVGSVGElement::m_width>(); >+ PropertyRegistry::registerProperty<SVGNames::heightAttr, &SVGSVGElement::m_height>(); >+ }); > } > > Ref<SVGSVGElement> SVGSVGElement::create(const QualifiedName& tagName, Document& document) >@@ -171,16 +177,11 @@ void SVGSVGElement::setCurrentScale(float scale) > frame->setPageZoomFactor(scale); > } > >-Ref<SVGPoint> SVGSVGElement::currentTranslate() >-{ >- return SVGStaticPropertyTearOff<SVGSVGElement, SVGPoint>::create(*this, m_currentTranslate, &SVGSVGElement::updateCurrentTranslate); >-} >- > void SVGSVGElement::setCurrentTranslate(const FloatPoint& translation) > { >- if (m_currentTranslate == translation) >+ if (m_currentTranslate->value() == translation) > return; >- m_currentTranslate = translation; >+ m_currentTranslate->setValue(translation); > updateCurrentTranslate(); > } > >@@ -192,17 +193,6 @@ void SVGSVGElement::updateCurrentTranslate() > document().renderView()->repaint(); > } > >-void SVGSVGElement::registerAttributes() >-{ >- auto& registry = attributeRegistry(); >- if (!registry.isEmpty()) >- return; >- registry.registerAttribute<SVGNames::xAttr, &SVGSVGElement::m_x>(); >- registry.registerAttribute<SVGNames::yAttr, &SVGSVGElement::m_y>(); >- registry.registerAttribute<SVGNames::widthAttr, &SVGSVGElement::m_width>(); >- registry.registerAttribute<SVGNames::heightAttr, &SVGSVGElement::m_height>(); >-} >- > void SVGSVGElement::parseAttribute(const QualifiedName& name, const AtomicString& value) > { > if (!nearestViewportElement()) { >@@ -241,9 +231,9 @@ void SVGSVGElement::parseAttribute(const QualifiedName& name, const AtomicString > SVGParsingError parseError = NoError; > > if (name == SVGNames::xAttr) >- m_x.setValue(SVGLengthValue::construct(LengthModeWidth, value, parseError)); >+ m_x->setBaseValInternal(SVGLengthValue::construct(LengthModeWidth, value, parseError)); > else if (name == SVGNames::yAttr) >- m_y.setValue(SVGLengthValue::construct(LengthModeHeight, value, parseError)); >+ m_y->setBaseValInternal(SVGLengthValue::construct(LengthModeHeight, value, parseError)); > else if (name == SVGNames::widthAttr) { > auto length = SVGLengthValue::construct(LengthModeWidth, value, parseError, ForbidNegativeLengths); > if (parseError != NoError || value.isEmpty()) { >@@ -251,7 +241,7 @@ void SVGSVGElement::parseAttribute(const QualifiedName& name, const AtomicString > // Not sure it's correct for the empty string or for something that can't be parsed. > length = SVGLengthValue(LengthModeWidth, "100%"_s); > } >- m_width.setValue(length); >+ m_width->setBaseValInternal(length); > } else if (name == SVGNames::heightAttr) { > auto length = SVGLengthValue::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths); > if (parseError != NoError || value.isEmpty()) { >@@ -259,7 +249,7 @@ void SVGSVGElement::parseAttribute(const QualifiedName& name, const AtomicString > // Not sure it's correct for the empty string or for something that can't be parsed. > length = SVGLengthValue(LengthModeHeight, "100%"_s); > } >- m_height.setValue(length); >+ m_height->setBaseValInternal(length); > } > > reportAttributeParsingError(parseError, name, value); >@@ -272,7 +262,7 @@ void SVGSVGElement::parseAttribute(const QualifiedName& name, const AtomicString > > void SVGSVGElement::svgAttributeChanged(const QualifiedName& attrName) > { >- if (isKnownAttribute(attrName)) { >+ if (PropertyRegistry::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); > invalidateSVGPresentationAttributeStyle(); > >@@ -322,12 +312,12 @@ Ref<NodeList> SVGSVGElement::collectIntersectionOrEnclosureList(SVGRect& rect, S > > static bool checkIntersectionWithoutUpdatingLayout(SVGElement& element, SVGRect& rect) > { >- return RenderSVGModelObject::checkIntersection(element.renderer(), rect.propertyReference()); >+ return RenderSVGModelObject::checkIntersection(element.renderer(), rect.value()); > } > > static bool checkEnclosureWithoutUpdatingLayout(SVGElement& element, SVGRect& rect) > { >- return RenderSVGModelObject::checkEnclosure(element.renderer(), rect.propertyReference()); >+ return RenderSVGModelObject::checkEnclosure(element.renderer(), rect.value()); > } > > Ref<NodeList> SVGSVGElement::getIntersectionList(SVGRect& rect, SVGElement* referenceElement) >@@ -396,12 +386,12 @@ Ref<SVGRect> SVGSVGElement::createSVGRect() > > Ref<SVGTransform> SVGSVGElement::createSVGTransform() > { >- return SVGTransform::create(SVGTransformValue { SVGTransformValue::SVG_TRANSFORM_MATRIX }); >+ return SVGTransform::create(SVGTransformValue::SVG_TRANSFORM_MATRIX); > } > > Ref<SVGTransform> SVGSVGElement::createSVGTransformFromMatrix(SVGMatrix& matrix) > { >- return SVGTransform::create(SVGTransformValue { matrix.propertyReference() }); >+ return SVGTransform::create(matrix.value()); > } > > AffineTransform SVGSVGElement::localCoordinateSpaceTransform(SVGLocatable::CTMScope mode) const >@@ -542,7 +532,7 @@ bool SVGSVGElement::selfHasRelativeLengths() const > FloatRect SVGSVGElement::currentViewBoxRect() const > { > if (m_useCurrentView) >- return m_viewSpec ? m_viewSpec->viewBox() : FloatRect(); >+ return m_viewSpec ? m_viewSpec->viewBox()->currentValue() : FloatRect(); > > FloatRect viewBox = this->viewBox(); > if (!viewBox.isEmpty()) >@@ -617,8 +607,8 @@ AffineTransform SVGSVGElement::viewBoxToViewTransform(float viewWidth, float vie > if (!m_useCurrentView || !m_viewSpec) > return SVGFitToViewBox::viewBoxToViewTransform(currentViewBoxRect(), preserveAspectRatio(), viewWidth, viewHeight); > >- AffineTransform transform = SVGFitToViewBox::viewBoxToViewTransform(currentViewBoxRect(), m_viewSpec->preserveAspectRatio(), viewWidth, viewHeight); >- m_viewSpec->transformValue().concatenate(transform); >+ AffineTransform transform = SVGFitToViewBox::viewBoxToViewTransform(currentViewBoxRect(), m_viewSpec->preserveAspectRatio()->currentValue(), viewWidth, viewHeight); >+ m_viewSpec->transform()->concatenate(transform); > return transform; > } > >@@ -700,8 +690,8 @@ void SVGSVGElement::resetScrollAnchor() > if (!m_currentViewFragmentIdentifier.isEmpty()) { > if (auto* rootElement = findRootAnchor(m_currentViewFragmentIdentifier)) { > SVGViewSpec& view = rootElement->currentView(); >- view.setViewBox(viewBox()); >- view.setPreserveAspectRatio(preserveAspectRatio()); >+ view.setViewBox(viewBox()->currentValue()); >+ view.setPreserveAspectRatio(preserveAspectRatio()->currentValue()); > view.setZoomAndPan(zoomAndPan()); > m_currentViewFragmentIdentifier = { }; > } >@@ -720,12 +710,12 @@ void SVGSVGElement::inheritViewAttributes(const SVGViewElement& viewElement) > if (viewElement.hasAttribute(SVGNames::viewBoxAttr)) > view.setViewBox(viewElement.viewBox()); > else >- view.setViewBox(viewBox()); >+ view.setViewBox(viewBox()->currentValue()); > > if (viewElement.hasAttribute(SVGNames::preserveAspectRatioAttr)) > view.setPreserveAspectRatio(viewElement.preserveAspectRatio()); > else >- view.setPreserveAspectRatio(preserveAspectRatio()); >+ view.setPreserveAspectRatio(preserveAspectRatio()->currentValue()); > > if (viewElement.hasAttribute(SVGNames::zoomAndPanAttr)) > view.setZoomAndPan(viewElement.zoomAndPan()); >diff --git a/Source/WebCore/svg/SVGSVGElement.h b/Source/WebCore/svg/SVGSVGElement.h >index 9bcf2868564..cb79fb083b7 100644 >--- a/Source/WebCore/svg/SVGSVGElement.h >+++ b/Source/WebCore/svg/SVGSVGElement.h >@@ -22,10 +22,6 @@ > #pragma once > > #include "FloatPoint.h" >-#include "SVGAnimatedBoolean.h" >-#include "SVGAnimatedLength.h" >-#include "SVGAnimatedPreserveAspectRatio.h" >-#include "SVGAnimatedRect.h" > #include "SVGExternalResourcesRequired.h" > #include "SVGFitToViewBox.h" > #include "SVGGraphicsElement.h" >@@ -64,8 +60,8 @@ public: // DOM > float currentScale() const; > void setCurrentScale(float); > >- Ref<SVGPoint> currentTranslate(); >- FloatPoint currentTranslateValue() { return m_currentTranslate; } >+ Ref<SVGPoint>& currentTranslate() { return m_currentTranslate; } >+ FloatPoint currentTranslateValue() const { return m_currentTranslate->value(); } > > unsigned suspendRedraw(unsigned maxWaitMilliseconds); > void unsuspendRedraw(unsigned suspendHandleId); >@@ -109,7 +105,7 @@ public: > SMILTimeContainer& timeContainer() { return m_timeContainer.get(); } > > void setCurrentTranslate(const FloatPoint&); // Used to pan. >- void updateCurrentTranslate(); // Used from DOM bindings to create an SVGStaticPropertyTearOff for currentTranslate. >+ void updateCurrentTranslate(); > > bool hasIntrinsicWidth() const; > bool hasIntrinsicHeight() const; >@@ -121,28 +117,26 @@ public: > > AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) const; > >- const SVGLengthValue& x() const { return m_x.currentValue(attributeOwnerProxy()); } >- const SVGLengthValue& y() const { return m_y.currentValue(attributeOwnerProxy()); } >- const SVGLengthValue& width() const { return m_width.currentValue(attributeOwnerProxy()); } >- const SVGLengthValue& height() const { return m_height.currentValue(attributeOwnerProxy()); } >+ const SVGLengthValue& x() const { return m_x->currentValue(); } >+ const SVGLengthValue& y() const { return m_y->currentValue(); } >+ const SVGLengthValue& width() const { return m_width->currentValue(); } >+ const SVGLengthValue& height() const { return m_height->currentValue(); } > >- RefPtr<SVGAnimatedLength> xAnimated() { return m_x.animatedProperty(attributeOwnerProxy()); } >- RefPtr<SVGAnimatedLength> yAnimated() { return m_y.animatedProperty(attributeOwnerProxy()); } >- RefPtr<SVGAnimatedLength> widthAnimated() { return m_width.animatedProperty(attributeOwnerProxy()); } >- RefPtr<SVGAnimatedLength> heightAnimated() { return m_height.animatedProperty(attributeOwnerProxy()); } >+ Ref<SVGAnimatedLength>& x() { return m_x; } >+ Ref<SVGAnimatedLength>& y() { return m_y; } >+ Ref<SVGAnimatedLength>& width() { return m_width; } >+ Ref<SVGAnimatedLength>& height() { return m_height; } > > private: > SVGSVGElement(const QualifiedName&, Document&); > virtual ~SVGSVGElement(); > >- using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGSVGElement, SVGGraphicsElement, SVGExternalResourcesRequired, SVGFitToViewBox, SVGZoomAndPan>; >- static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); } >- static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); } >- static void registerAttributes(); >+ using PropertyRegistry = SVGPropertyOwnerRegistry<SVGSVGElement, SVGGraphicsElement, SVGExternalResourcesRequired, SVGFitToViewBox>; >+ const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; } > >- const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; } > void parseAttribute(const QualifiedName&, const AtomicString&) override; > void svgAttributeChanged(const QualifiedName&) override; >+ > bool selfHasRelativeLengths() const override; > bool isValid() const override; > >@@ -165,15 +159,16 @@ private: > > bool m_useCurrentView { false }; > Ref<SMILTimeContainer> m_timeContainer; >- FloatPoint m_currentTranslate; > RefPtr<SVGViewSpec> m_viewSpec; > String m_currentViewFragmentIdentifier; > >- AttributeOwnerProxy m_attributeOwnerProxy { *this }; >- SVGAnimatedLengthAttribute m_x { LengthModeWidth }; >- SVGAnimatedLengthAttribute m_y { LengthModeHeight}; >- SVGAnimatedLengthAttribute m_width { LengthModeWidth, "100%"_s }; >- SVGAnimatedLengthAttribute m_height { LengthModeHeight, "100%"_s }; >+ Ref<SVGPoint> m_currentTranslate { SVGPoint::create() }; >+ >+ PropertyRegistry m_propertyRegistry { *this }; >+ Ref<SVGAnimatedLength> m_x { SVGAnimatedLength::create(this, LengthModeWidth) }; >+ Ref<SVGAnimatedLength> m_y { SVGAnimatedLength::create(this, LengthModeHeight) }; >+ Ref<SVGAnimatedLength> m_width { SVGAnimatedLength::create(this, LengthModeWidth, "100%"_s) }; >+ Ref<SVGAnimatedLength> m_height { SVGAnimatedLength::create(this, LengthModeHeight, "100%"_s) }; > }; > > } // namespace WebCore >diff --git a/Source/WebCore/svg/SVGSymbolElement.h b/Source/WebCore/svg/SVGSymbolElement.h >index d7683e19238..d800f6fa4ac 100644 >--- a/Source/WebCore/svg/SVGSymbolElement.h >+++ b/Source/WebCore/svg/SVGSymbolElement.h >@@ -21,9 +21,6 @@ > > #pragma once > >-#include "SVGAnimatedBoolean.h" >-#include "SVGAnimatedPreserveAspectRatio.h" >-#include "SVGAnimatedRect.h" > #include "SVGElement.h" > #include "SVGExternalResourcesRequired.h" > #include "SVGFitToViewBox.h" >@@ -38,8 +35,8 @@ public: > private: > SVGSymbolElement(const QualifiedName&, Document&); > >- using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGSymbolElement, SVGElement, SVGExternalResourcesRequired, SVGFitToViewBox>; >- const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; } >+ using PropertyRegistry = SVGPropertyOwnerRegistry<SVGSymbolElement, SVGElement, SVGExternalResourcesRequired, SVGFitToViewBox>; >+ const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; } > > void parseAttribute(const QualifiedName&, const AtomicString&) override; > void svgAttributeChanged(const QualifiedName&) override; >@@ -47,7 +44,7 @@ private: > > bool selfHasRelativeLengths() const override; > >- AttributeOwnerProxy m_attributeOwnerProxy { *this }; >+ PropertyRegistry m_propertyRegistry { *this }; > }; > > } // namespace WebCore >diff --git a/Source/WebCore/svg/SVGUseElement.cpp b/Source/WebCore/svg/SVGUseElement.cpp >index 1fd88c91d80..4d345de9f7c 100644 >--- a/Source/WebCore/svg/SVGUseElement.cpp >+++ b/Source/WebCore/svg/SVGUseElement.cpp >@@ -54,7 +54,14 @@ inline SVGUseElement::SVGUseElement(const QualifiedName& tagName, Document& docu > { > ASSERT(hasCustomStyleResolveCallbacks()); > ASSERT(hasTagName(SVGNames::useTag)); >- registerAttributes(); >+ >+ static std::once_flag onceFlag; >+ std::call_once(onceFlag, [] { >+ PropertyRegistry::registerProperty<SVGNames::xAttr, &SVGUseElement::m_x>(); >+ PropertyRegistry::registerProperty<SVGNames::yAttr, &SVGUseElement::m_y>(); >+ PropertyRegistry::registerProperty<SVGNames::widthAttr, &SVGUseElement::m_width>(); >+ PropertyRegistry::registerProperty<SVGNames::heightAttr, &SVGUseElement::m_height>(); >+ }); > } > > Ref<SVGUseElement> SVGUseElement::create(const QualifiedName& tagName, Document& document) >@@ -68,29 +75,18 @@ SVGUseElement::~SVGUseElement() > m_externalDocument->removeClient(*this); > } > >-void SVGUseElement::registerAttributes() >-{ >- auto& registry = attributeRegistry(); >- if (!registry.isEmpty()) >- return; >- registry.registerAttribute<SVGNames::xAttr, &SVGUseElement::m_x>(); >- registry.registerAttribute<SVGNames::yAttr, &SVGUseElement::m_y>(); >- registry.registerAttribute<SVGNames::widthAttr, &SVGUseElement::m_width>(); >- registry.registerAttribute<SVGNames::heightAttr, &SVGUseElement::m_height>(); >-} >- > void SVGUseElement::parseAttribute(const QualifiedName& name, const AtomicString& value) > { > SVGParsingError parseError = NoError; > > if (name == SVGNames::xAttr) >- m_x.setValue(SVGLengthValue::construct(LengthModeWidth, value, parseError)); >+ m_x->setBaseValInternal(SVGLengthValue::construct(LengthModeWidth, value, parseError)); > else if (name == SVGNames::yAttr) >- m_y.setValue(SVGLengthValue::construct(LengthModeHeight, value, parseError)); >+ m_y->setBaseValInternal(SVGLengthValue::construct(LengthModeHeight, value, parseError)); > else if (name == SVGNames::widthAttr) >- m_width.setValue(SVGLengthValue::construct(LengthModeWidth, value, parseError, ForbidNegativeLengths)); >+ m_width->setBaseValInternal(SVGLengthValue::construct(LengthModeWidth, value, parseError, ForbidNegativeLengths)); > else if (name == SVGNames::heightAttr) >- m_height.setValue(SVGLengthValue::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths)); >+ m_height->setBaseValInternal(SVGLengthValue::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths)); > > reportAttributeParsingError(parseError, name, value); > >@@ -163,7 +159,7 @@ void SVGUseElement::svgAttributeChanged(const QualifiedName& attrName) > { > InstanceInvalidationGuard guard(*this); > >- if (isKnownAttribute(attrName)) { >+ if (PropertyRegistry::isKnownAttribute(attrName)) { > updateRelativeLengthsInformation(); > if (attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr) { > // FIXME: It's unnecessarily inefficient to update both width and height each time either is changed. >@@ -292,7 +288,7 @@ static bool isDirectReference(const SVGElement& element) > || element.hasTagName(textTag); > } > >-Path SVGUseElement::toClipPath() >+Path SVGUseElement::toClipPath() const > { > auto targetClone = this->targetClone(); > if (!is<SVGGraphicsElement>(targetClone)) >@@ -403,8 +399,8 @@ static void associateReplacementClonesWithOriginals(SVGElement& replacementClone > > SVGElement* SVGUseElement::findTarget(String* targetID) const > { >- auto* correspondingElement = this->correspondingElement(); >- auto& original = correspondingElement ? downcast<SVGUseElement>(*correspondingElement) : *this; >+ const auto* correspondingElement = this->correspondingElement(); >+ const auto& original = correspondingElement ? downcast<SVGUseElement>(*correspondingElement) : *this; > > auto targetResult = targetElementFromIRIString(original.href(), original.treeScope(), original.externalDocument()); > if (targetID) { >@@ -570,8 +566,9 @@ void SVGUseElement::finishParsingChildren() > void SVGUseElement::updateExternalDocument() > { > URL externalDocumentURL; >- if (isConnected() && isExternalURIReference(href(), document())) { >- externalDocumentURL = document().completeURL(href()); >+ String href = this->href()->currentValue(); >+ if (isConnected() && isExternalURIReference(href, document())) { >+ externalDocumentURL = document().completeURL(href); > if (!externalDocumentURL.hasFragmentIdentifier()) > externalDocumentURL = URL(); > } >@@ -603,7 +600,7 @@ bool SVGUseElement::isValid() const > return SVGTests::isValid(); > } > >-bool SVGUseElement::haveLoadedRequiredResources() >+bool SVGUseElement::haveLoadedRequiredResources() const > { > return SVGExternalResourcesRequired::haveLoadedRequiredResources(); > } >diff --git a/Source/WebCore/svg/SVGUseElement.h b/Source/WebCore/svg/SVGUseElement.h >index 31e0c09fb8c..ade900fff77 100644 >--- a/Source/WebCore/svg/SVGUseElement.h >+++ b/Source/WebCore/svg/SVGUseElement.h >@@ -23,8 +23,6 @@ > > #include "CachedResourceHandle.h" > #include "CachedSVGDocumentClient.h" >-#include "SVGAnimatedBoolean.h" >-#include "SVGAnimatedLength.h" > #include "SVGExternalResourcesRequired.h" > #include "SVGGraphicsElement.h" > #include "SVGURIReference.h" >@@ -46,15 +44,15 @@ public: > > RenderElement* rendererClipChild() const; > >- const SVGLengthValue& x() const { return m_x.currentValue(attributeOwnerProxy()); } >- const SVGLengthValue& y() const { return m_y.currentValue(attributeOwnerProxy()); } >- const SVGLengthValue& width() const { return m_width.currentValue(attributeOwnerProxy()); } >- const SVGLengthValue& height() const { return m_height.currentValue(attributeOwnerProxy()); } >+ const SVGLengthValue& x() const { return m_x->currentValue(); } >+ const SVGLengthValue& y() const { return m_y->currentValue(); } >+ const SVGLengthValue& width() const { return m_width->currentValue(); } >+ const SVGLengthValue& height() const { return m_height->currentValue(); } > >- RefPtr<SVGAnimatedLength> xAnimated() { return m_x.animatedProperty(attributeOwnerProxy()); } >- RefPtr<SVGAnimatedLength> yAnimated() { return m_y.animatedProperty(attributeOwnerProxy()); } >- RefPtr<SVGAnimatedLength> widthAnimated() { return m_width.animatedProperty(attributeOwnerProxy()); } >- RefPtr<SVGAnimatedLength> heightAnimated() { return m_height.animatedProperty(attributeOwnerProxy()); } >+ Ref<SVGAnimatedLength>& x() { return m_x; } >+ Ref<SVGAnimatedLength>& y() { return m_y; } >+ Ref<SVGAnimatedLength>& width() { return m_width; } >+ Ref<SVGAnimatedLength>& height() { return m_height; } > > private: > SVGUseElement(const QualifiedName&, Document&); >@@ -65,18 +63,15 @@ private: > void removedFromAncestor(RemovalType, ContainerNode&) override; > void buildPendingResource() override; > >- using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGUseElement, SVGGraphicsElement, SVGExternalResourcesRequired, SVGURIReference>; >- static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); } >- static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); } >- static void registerAttributes(); >+ using PropertyRegistry = SVGPropertyOwnerRegistry<SVGUseElement, SVGGraphicsElement, SVGExternalResourcesRequired, SVGURIReference>; >+ const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; } > >- const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; } > void parseAttribute(const QualifiedName&, const AtomicString&) override; > void svgAttributeChanged(const QualifiedName&) override; > > RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) override; >- Path toClipPath() override; >- bool haveLoadedRequiredResources() override; >+ Path toClipPath() const override; >+ bool haveLoadedRequiredResources() const override; > void finishParsingChildren() override; > bool selfHasRelativeLengths() const override; > void setHaveFiredLoadEvent(bool) override; >@@ -100,16 +95,16 @@ private: > void clearShadowTree(); > void invalidateDependentShadowTrees(); > >- AttributeOwnerProxy m_attributeOwnerProxy { *this }; >- SVGAnimatedLengthAttribute m_x { LengthModeWidth }; >- SVGAnimatedLengthAttribute m_y { LengthModeHeight }; >- SVGAnimatedLengthAttribute m_width { LengthModeWidth }; >- SVGAnimatedLengthAttribute m_height { LengthModeHeight }; >- > bool m_haveFiredLoadEvent { false }; > bool m_shadowTreeNeedsUpdate { true }; > CachedResourceHandle<CachedSVGDocument> m_externalDocument; > Timer m_svgLoadEventTimer; >+ >+ PropertyRegistry m_propertyRegistry { *this }; >+ Ref<SVGAnimatedLength> m_x { SVGAnimatedLength::create(this, LengthModeWidth) }; >+ Ref<SVGAnimatedLength> m_y { SVGAnimatedLength::create(this, LengthModeHeight) }; >+ Ref<SVGAnimatedLength> m_width { SVGAnimatedLength::create(this, LengthModeWidth) }; >+ Ref<SVGAnimatedLength> m_height { SVGAnimatedLength::create(this, LengthModeHeight) }; > }; > > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 191237
:
353808
|
353812
|
353815
|
353817
|
353818
|
353820
|
353824
|
353825
|
355382
|
355386
|
355388
|
355393
|
355568
|
355574
|
355575
|
355577
|
355580
|
355582
|
355585
|
355666
|
355672
|
355693
|
355699
|
355711
|
355752
|
355777
|
355820
|
356333
|
356334
|
356338
|
356340
|
356342
|
356344
|
356346
|
356351
|
356352
|
356358
|
356360
|
356380
|
356497
|
356500
|
356507
|
356579
|
356607
|
356728
|
356729
|
356730
|
356731
|
356732
|
356733
|
356752
|
356810
|
356811
|
356879
|
356880
|
356881
|
356882
|
356883
|
356884
|
356885
|
356887
|
356888
|
356889
|
356892
|
356895
|
356896
|
359721
|
359735
|
359747
|
363581
|
363595
|
363613
|
363690
|
364172
|
364180
|
366512
|
366557
|
366636