Diff
Modified: trunk/Source/WebCore/ChangeLog (291107 => 291108)
--- trunk/Source/WebCore/ChangeLog 2022-03-10 15:27:06 UTC (rev 291107)
+++ trunk/Source/WebCore/ChangeLog 2022-03-10 15:52:28 UTC (rev 291108)
@@ -1,3 +1,50 @@
+2022-03-10 Rob Buis <[email protected]>
+
+ Use PropertyRegistry consistently in svgAttributeChanged
+ https://bugs.webkit.org/show_bug.cgi?id=237604
+
+ Reviewed by Martin Robinson.
+
+ Use PropertyRegistry consistently in svgAttributeChanged by always checking
+ PropertyRegistry::isKnownAttribute first thing, before delegating to subclasses.
+
+ * svg/SVGFEBlendElement.cpp:
+ (WebCore::SVGFEBlendElement::svgAttributeChanged):
+ * svg/SVGFEColorMatrixElement.cpp:
+ (WebCore::SVGFEColorMatrixElement::svgAttributeChanged):
+ * svg/SVGFECompositeElement.cpp:
+ (WebCore::SVGFECompositeElement::svgAttributeChanged):
+ * svg/SVGFEConvolveMatrixElement.cpp:
+ (WebCore::SVGFEConvolveMatrixElement::svgAttributeChanged):
+ * svg/SVGFEDiffuseLightingElement.cpp:
+ (WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged):
+ * svg/SVGFEDisplacementMapElement.cpp:
+ (WebCore::SVGFEDisplacementMapElement::svgAttributeChanged):
+ * svg/SVGFEImageElement.cpp:
+ (WebCore::SVGFEImageElement::svgAttributeChanged):
+ * svg/SVGFEMergeNodeElement.cpp:
+ (WebCore::SVGFEMergeNodeElement::svgAttributeChanged):
+ * svg/SVGFEMorphologyElement.cpp:
+ (WebCore::SVGFEMorphologyElement::svgAttributeChanged):
+ * svg/SVGFESpecularLightingElement.cpp:
+ (WebCore::SVGFESpecularLightingElement::svgAttributeChanged):
+ * svg/SVGFETileElement.cpp:
+ (WebCore::SVGFETileElement::svgAttributeChanged):
+ * svg/SVGForeignObjectElement.cpp:
+ (WebCore::SVGForeignObjectElement::svgAttributeChanged):
+ * svg/SVGGeometryElement.cpp:
+ (WebCore::SVGGeometryElement::svgAttributeChanged):
+ * svg/SVGGraphicsElement.cpp:
+ (WebCore::SVGGraphicsElement::svgAttributeChanged):
+ * svg/SVGImageElement.cpp:
+ (WebCore::SVGImageElement::svgAttributeChanged):
+ * svg/SVGPathElement.cpp:
+ (WebCore::SVGPathElement::svgAttributeChanged):
+ * svg/SVGPolyElement.cpp:
+ (WebCore::SVGPolyElement::svgAttributeChanged):
+ * svg/SVGStopElement.cpp:
+ (WebCore::SVGStopElement::svgAttributeChanged):
+
2022-03-10 Lauro Moura <[email protected]>
Add context.roundRect support to OffScreenCanvas
Modified: trunk/Source/WebCore/svg/SVGFEBlendElement.cpp (291107 => 291108)
--- trunk/Source/WebCore/svg/SVGFEBlendElement.cpp 2022-03-10 15:27:06 UTC (rev 291107)
+++ trunk/Source/WebCore/svg/SVGFEBlendElement.cpp 2022-03-10 15:52:28 UTC (rev 291108)
@@ -83,18 +83,17 @@
void SVGFEBlendElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (attrName == SVGNames::modeAttr) {
+ if (PropertyRegistry::isKnownAttribute(attrName)) {
InstanceInvalidationGuard guard(*this);
- primitiveAttributeChanged(attrName);
+ if (attrName == SVGNames::modeAttr)
+ primitiveAttributeChanged(attrName);
+ else {
+ ASSERT(attrName == SVGNames::inAttr || attrName == SVGNames::in2Attr);
+ invalidate();
+ }
return;
}
- if (attrName == SVGNames::inAttr || attrName == SVGNames::in2Attr) {
- InstanceInvalidationGuard guard(*this);
- invalidate();
- return;
- }
-
SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
}
Modified: trunk/Source/WebCore/svg/SVGFEColorMatrixElement.cpp (291107 => 291108)
--- trunk/Source/WebCore/svg/SVGFEColorMatrixElement.cpp 2022-03-10 15:27:06 UTC (rev 291107)
+++ trunk/Source/WebCore/svg/SVGFEColorMatrixElement.cpp 2022-03-10 15:52:28 UTC (rev 291108)
@@ -84,18 +84,17 @@
void SVGFEColorMatrixElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (attrName == SVGNames::typeAttr || attrName == SVGNames::valuesAttr) {
+ if (PropertyRegistry::isKnownAttribute(attrName)) {
InstanceInvalidationGuard guard(*this);
- primitiveAttributeChanged(attrName);
+ if (attrName == SVGNames::inAttr)
+ invalidate();
+ else {
+ ASSERT(attrName == SVGNames::typeAttr || attrName == SVGNames::valuesAttr);
+ primitiveAttributeChanged(attrName);
+ }
return;
}
- if (attrName == SVGNames::inAttr) {
- InstanceInvalidationGuard guard(*this);
- invalidate();
- return;
- }
-
SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
}
Modified: trunk/Source/WebCore/svg/SVGFEComponentTransferElement.h (291107 => 291108)
--- trunk/Source/WebCore/svg/SVGFEComponentTransferElement.h 2022-03-10 15:27:06 UTC (rev 291107)
+++ trunk/Source/WebCore/svg/SVGFEComponentTransferElement.h 2022-03-10 15:52:28 UTC (rev 291108)
@@ -40,7 +40,7 @@
using PropertyRegistry = SVGPropertyOwnerRegistry<SVGFEComponentTransferElement, SVGFilterPrimitiveStandardAttributes>;
const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; }
- // FIXME: svgAttributeChanged missing.
+ // FIXME: https://bugs.webkit.org/show_bug.cgi?id=237702 - provide svgAttribute implementation for SVGFEComponentTransferElement.
void parseAttribute(const QualifiedName&, const AtomString&) override;
Vector<AtomString> filterEffectInputsNames() const override { return { in1() }; }
Modified: trunk/Source/WebCore/svg/SVGFECompositeElement.cpp (291107 => 291108)
--- trunk/Source/WebCore/svg/SVGFECompositeElement.cpp 2022-03-10 15:27:06 UTC (rev 291107)
+++ trunk/Source/WebCore/svg/SVGFECompositeElement.cpp 2022-03-10 15:52:28 UTC (rev 291108)
@@ -115,18 +115,17 @@
void SVGFECompositeElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (attrName == SVGNames::operatorAttr || attrName == SVGNames::k1Attr || attrName == SVGNames::k2Attr || attrName == SVGNames::k3Attr || attrName == SVGNames::k4Attr) {
+ if (PropertyRegistry::isKnownAttribute(attrName)) {
InstanceInvalidationGuard guard(*this);
- primitiveAttributeChanged(attrName);
+ if (attrName == SVGNames::inAttr || attrName == SVGNames::in2Attr)
+ invalidate();
+ else {
+ ASSERT(attrName == SVGNames::k1Attr || attrName == SVGNames::k2Attr || attrName == SVGNames::k3Attr || attrName == SVGNames::k4Attr || attrName == SVGNames::operatorAttr);
+ primitiveAttributeChanged(attrName);
+ }
return;
}
- if (attrName == SVGNames::inAttr || attrName == SVGNames::in2Attr) {
- InstanceInvalidationGuard guard(*this);
- invalidate();
- return;
- }
-
SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
}
Modified: trunk/Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp (291107 => 291108)
--- trunk/Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp 2022-03-10 15:27:06 UTC (rev 291107)
+++ trunk/Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp 2022-03-10 15:52:28 UTC (rev 291108)
@@ -172,18 +172,18 @@
void SVGFEConvolveMatrixElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (attrName == SVGNames::edgeModeAttr || attrName == SVGNames::divisorAttr || attrName == SVGNames::biasAttr || attrName == SVGNames::targetXAttr || attrName == SVGNames::targetYAttr || attrName == SVGNames::kernelUnitLengthAttr || attrName == SVGNames::preserveAlphaAttr) {
+ if (PropertyRegistry::isKnownAttribute(attrName)) {
InstanceInvalidationGuard guard(*this);
- primitiveAttributeChanged(attrName);
+ if (attrName == SVGNames::inAttr || attrName == SVGNames::orderAttr || attrName == SVGNames::kernelMatrixAttr)
+ invalidate();
+ else {
+ ASSERT(attrName == SVGNames::edgeModeAttr || attrName == SVGNames::divisorAttr || attrName == SVGNames::biasAttr || attrName == SVGNames::targetXAttr
+ || attrName == SVGNames::targetYAttr || attrName == SVGNames::kernelUnitLengthAttr || attrName == SVGNames::preserveAlphaAttr);
+ primitiveAttributeChanged(attrName);
+ }
return;
}
- if (attrName == SVGNames::inAttr || attrName == SVGNames::orderAttr || attrName == SVGNames::kernelMatrixAttr) {
- InstanceInvalidationGuard guard(*this);
- invalidate();
- return;
- }
-
SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
}
Modified: trunk/Source/WebCore/svg/SVGFEDiffuseLightingElement.cpp (291107 => 291108)
--- trunk/Source/WebCore/svg/SVGFEDiffuseLightingElement.cpp 2022-03-10 15:27:06 UTC (rev 291107)
+++ trunk/Source/WebCore/svg/SVGFEDiffuseLightingElement.cpp 2022-03-10 15:52:28 UTC (rev 291108)
@@ -125,18 +125,17 @@
void SVGFEDiffuseLightingElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (attrName == SVGNames::surfaceScaleAttr || attrName == SVGNames::diffuseConstantAttr || attrName == SVGNames::kernelUnitLengthAttr || attrName == SVGNames::lighting_colorAttr) {
+ if (PropertyRegistry::isKnownAttribute(attrName)) {
InstanceInvalidationGuard guard(*this);
- primitiveAttributeChanged(attrName);
+ if (attrName == SVGNames::inAttr)
+ invalidate();
+ else {
+ ASSERT(attrName == SVGNames::diffuseConstantAttr || attrName == SVGNames::surfaceScaleAttr || attrName == SVGNames::kernelUnitLengthAttr);
+ primitiveAttributeChanged(attrName);
+ }
return;
}
- if (attrName == SVGNames::inAttr) {
- InstanceInvalidationGuard guard(*this);
- invalidate();
- return;
- }
-
SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
}
Modified: trunk/Source/WebCore/svg/SVGFEDisplacementMapElement.cpp (291107 => 291108)
--- trunk/Source/WebCore/svg/SVGFEDisplacementMapElement.cpp 2022-03-10 15:27:06 UTC (rev 291107)
+++ trunk/Source/WebCore/svg/SVGFEDisplacementMapElement.cpp 2022-03-10 15:52:28 UTC (rev 291108)
@@ -99,18 +99,17 @@
void SVGFEDisplacementMapElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (attrName == SVGNames::xChannelSelectorAttr || attrName == SVGNames::yChannelSelectorAttr || attrName == SVGNames::scaleAttr) {
+ if (PropertyRegistry::isKnownAttribute(attrName)) {
InstanceInvalidationGuard guard(*this);
- primitiveAttributeChanged(attrName);
+ if (attrName == SVGNames::inAttr || attrName == SVGNames::in2Attr)
+ invalidate();
+ else {
+ ASSERT(attrName == SVGNames::xChannelSelectorAttr || attrName == SVGNames::yChannelSelectorAttr || attrName == SVGNames::scaleAttr);
+ primitiveAttributeChanged(attrName);
+ }
return;
}
- if (attrName == SVGNames::inAttr || attrName == SVGNames::in2Attr) {
- InstanceInvalidationGuard guard(*this);
- invalidate();
- return;
- }
-
SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
}
Modified: trunk/Source/WebCore/svg/SVGFEImageElement.cpp (291107 => 291108)
--- trunk/Source/WebCore/svg/SVGFEImageElement.cpp 2022-03-10 15:27:06 UTC (rev 291107)
+++ trunk/Source/WebCore/svg/SVGFEImageElement.cpp 2022-03-10 15:52:28 UTC (rev 291108)
@@ -127,7 +127,8 @@
void SVGFEImageElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (attrName == SVGNames::preserveAspectRatioAttr) {
+ if (PropertyRegistry::isKnownAttribute(attrName)) {
+ ASSERT(attrName == SVGNames::preserveAspectRatioAttr);
InstanceInvalidationGuard guard(*this);
invalidate();
return;
Modified: trunk/Source/WebCore/svg/SVGFELightElement.cpp (291107 => 291108)
--- trunk/Source/WebCore/svg/SVGFELightElement.cpp 2022-03-10 15:27:06 UTC (rev 291107)
+++ trunk/Source/WebCore/svg/SVGFELightElement.cpp 2022-03-10 15:52:28 UTC (rev 291108)
@@ -126,6 +126,9 @@
void SVGFELightElement::svgAttributeChanged(const QualifiedName& attrName)
{
if (PropertyRegistry::isKnownAttribute(attrName)) {
+ ASSERT(attrName == SVGNames::azimuthAttr || attrName == SVGNames::elevationAttr || attrName == SVGNames::xAttr || attrName == SVGNames::yAttr
+ || attrName == SVGNames::zAttr || attrName == SVGNames::pointsAtXAttr || attrName == SVGNames::pointsAtYAttr || attrName == SVGNames::pointsAtZAttr
+ || attrName == SVGNames::specularExponentAttr || attrName == SVGNames::limitingConeAngleAttr);
RefPtr parent = parentElement();
if (!parent)
return;
Modified: trunk/Source/WebCore/svg/SVGFEMergeNodeElement.cpp (291107 => 291108)
--- trunk/Source/WebCore/svg/SVGFEMergeNodeElement.cpp 2022-03-10 15:27:06 UTC (rev 291107)
+++ trunk/Source/WebCore/svg/SVGFEMergeNodeElement.cpp 2022-03-10 15:52:28 UTC (rev 291108)
@@ -60,7 +60,8 @@
void SVGFEMergeNodeElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (attrName == SVGNames::inAttr) {
+ if (PropertyRegistry::isKnownAttribute(attrName)) {
+ ASSERT(attrName == SVGNames::inAttr);
InstanceInvalidationGuard guard(*this);
invalidateFilterPrimitiveParent(this);
return;
Modified: trunk/Source/WebCore/svg/SVGFEMorphologyElement.cpp (291107 => 291108)
--- trunk/Source/WebCore/svg/SVGFEMorphologyElement.cpp 2022-03-10 15:27:06 UTC (rev 291107)
+++ trunk/Source/WebCore/svg/SVGFEMorphologyElement.cpp 2022-03-10 15:52:28 UTC (rev 291108)
@@ -98,18 +98,17 @@
void SVGFEMorphologyElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (attrName == SVGNames::operatorAttr || attrName == SVGNames::radiusAttr) {
+ if (PropertyRegistry::isKnownAttribute(attrName)) {
InstanceInvalidationGuard guard(*this);
- primitiveAttributeChanged(attrName);
+ if (attrName == SVGNames::inAttr)
+ invalidate();
+ else {
+ ASSERT(attrName == SVGNames::operatorAttr || attrName == SVGNames::radiusAttr);
+ primitiveAttributeChanged(attrName);
+ }
return;
}
- if (attrName == SVGNames::inAttr) {
- InstanceInvalidationGuard guard(*this);
- invalidate();
- return;
- }
-
SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
}
Modified: trunk/Source/WebCore/svg/SVGFESpecularLightingElement.cpp (291107 => 291108)
--- trunk/Source/WebCore/svg/SVGFESpecularLightingElement.cpp 2022-03-10 15:27:06 UTC (rev 291107)
+++ trunk/Source/WebCore/svg/SVGFESpecularLightingElement.cpp 2022-03-10 15:52:28 UTC (rev 291108)
@@ -135,18 +135,17 @@
void SVGFESpecularLightingElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (attrName == SVGNames::surfaceScaleAttr || attrName == SVGNames::specularConstantAttr || attrName == SVGNames::specularExponentAttr || attrName == SVGNames::kernelUnitLengthAttr) {
+ if (PropertyRegistry::isKnownAttribute(attrName)) {
InstanceInvalidationGuard guard(*this);
- primitiveAttributeChanged(attrName);
+ if (attrName == SVGNames::inAttr)
+ invalidate();
+ else {
+ ASSERT(attrName == SVGNames::specularConstantAttr || attrName == SVGNames::specularExponentAttr || attrName == SVGNames::surfaceScaleAttr || attrName == SVGNames::kernelUnitLengthAttr);
+ primitiveAttributeChanged(attrName);
+ }
return;
}
- if (attrName == SVGNames::inAttr) {
- InstanceInvalidationGuard guard(*this);
- invalidate();
- return;
- }
-
SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
}
Modified: trunk/Source/WebCore/svg/SVGFETileElement.cpp (291107 => 291108)
--- trunk/Source/WebCore/svg/SVGFETileElement.cpp 2022-03-10 15:27:06 UTC (rev 291107)
+++ trunk/Source/WebCore/svg/SVGFETileElement.cpp 2022-03-10 15:52:28 UTC (rev 291108)
@@ -58,7 +58,8 @@
void SVGFETileElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (attrName == SVGNames::inAttr) {
+ if (PropertyRegistry::isKnownAttribute(attrName)) {
+ ASSERT(attrName == SVGNames::inAttr);
InstanceInvalidationGuard guard(*this);
invalidate();
return;
Modified: trunk/Source/WebCore/svg/SVGForeignObjectElement.cpp (291107 => 291108)
--- trunk/Source/WebCore/svg/SVGForeignObjectElement.cpp 2022-03-10 15:27:06 UTC (rev 291107)
+++ trunk/Source/WebCore/svg/SVGForeignObjectElement.cpp 2022-03-10 15:52:28 UTC (rev 291108)
@@ -74,18 +74,19 @@
void SVGForeignObjectElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr) {
- invalidateSVGPresentationalHintStyle();
+ if (PropertyRegistry::isKnownAttribute(attrName)) {
+ InstanceInvalidationGuard guard(*this);
+ if (attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr)
+ invalidateSVGPresentationalHintStyle();
+ else {
+ ASSERT(attrName == SVGNames::xAttr || attrName == SVGNames::yAttr);
+ updateRelativeLengthsInformation();
+ if (auto renderer = this->renderer())
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer);
+ }
return;
}
- if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr) {
- updateRelativeLengthsInformation();
- if (auto renderer = this->renderer())
- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer);
- return;
- }
-
SVGGraphicsElement::svgAttributeChanged(attrName);
}
Modified: trunk/Source/WebCore/svg/SVGGeometryElement.cpp (291107 => 291108)
--- trunk/Source/WebCore/svg/SVGGeometryElement.cpp 2022-03-10 15:27:06 UTC (rev 291107)
+++ trunk/Source/WebCore/svg/SVGGeometryElement.cpp 2022-03-10 15:52:28 UTC (rev 291108)
@@ -147,7 +147,8 @@
void SVGGeometryElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (attrName == SVGNames::pathLengthAttr) {
+ if (PropertyRegistry::isKnownAttribute(attrName)) {
+ ASSERT(attrName == SVGNames::pathLengthAttr);
InstanceInvalidationGuard guard(*this);
if (auto* renderer = this->renderer())
RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer);
Modified: trunk/Source/WebCore/svg/SVGGraphicsElement.cpp (291107 => 291108)
--- trunk/Source/WebCore/svg/SVGGraphicsElement.cpp 2022-03-10 15:27:06 UTC (rev 291107)
+++ trunk/Source/WebCore/svg/SVGGraphicsElement.cpp 2022-03-10 15:52:28 UTC (rev 291108)
@@ -132,7 +132,8 @@
void SVGGraphicsElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (attrName == SVGNames::transformAttr) {
+ if (PropertyRegistry::isKnownAttribute(attrName)) {
+ ASSERT(attrName == SVGNames::transformAttr);
InstanceInvalidationGuard guard(*this);
if (auto renderer = this->renderer()) {
Modified: trunk/Source/WebCore/svg/SVGImageElement.cpp (291107 => 291108)
--- trunk/Source/WebCore/svg/SVGImageElement.cpp 2022-03-10 15:27:06 UTC (rev 291107)
+++ trunk/Source/WebCore/svg/SVGImageElement.cpp 2022-03-10 15:52:28 UTC (rev 291108)
@@ -93,30 +93,25 @@
void SVGImageElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr) {
+ if (PropertyRegistry::isKnownAttribute(attrName)) {
InstanceInvalidationGuard guard(*this);
- updateRelativeLengthsInformation();
+ if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr) {
+ updateRelativeLengthsInformation();
- if (auto* renderer = this->renderer()) {
- if (downcast<RenderSVGImage>(*renderer).updateImageViewport())
+ if (auto* renderer = this->renderer()) {
+ if (downcast<RenderSVGImage>(*renderer).updateImageViewport())
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer);
+ }
+ } else if (attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr)
+ invalidateSVGPresentationalHintStyle();
+ else {
+ ASSERT(attrName == SVGNames::preserveAspectRatioAttr);
+ if (auto* renderer = this->renderer())
RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer);
}
return;
}
- if (attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr) {
- InstanceInvalidationGuard guard(*this);
- invalidateSVGPresentationalHintStyle();
- return;
- }
-
- if (attrName == SVGNames::preserveAspectRatioAttr) {
- InstanceInvalidationGuard guard(*this);
- if (auto* renderer = this->renderer())
- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer);
- return;
- }
-
if (SVGURIReference::isKnownAttribute(attrName)) {
m_imageLoader.updateFromElementIgnoringPreviousError();
return;
Modified: trunk/Source/WebCore/svg/SVGPathElement.cpp (291107 => 291108)
--- trunk/Source/WebCore/svg/SVGPathElement.cpp 2022-03-10 15:27:06 UTC (rev 291107)
+++ trunk/Source/WebCore/svg/SVGPathElement.cpp 2022-03-10 15:52:28 UTC (rev 291108)
@@ -65,7 +65,8 @@
void SVGPathElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (attrName == SVGNames::dAttr) {
+ if (PropertyRegistry::isKnownAttribute(attrName)) {
+ ASSERT(attrName == SVGNames::dAttr);
InstanceInvalidationGuard guard(*this);
invalidateMPathDependencies();
Modified: trunk/Source/WebCore/svg/SVGPolyElement.cpp (291107 => 291108)
--- trunk/Source/WebCore/svg/SVGPolyElement.cpp 2022-03-10 15:27:06 UTC (rev 291107)
+++ trunk/Source/WebCore/svg/SVGPolyElement.cpp 2022-03-10 15:52:28 UTC (rev 291108)
@@ -55,7 +55,8 @@
void SVGPolyElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (attrName == SVGNames::pointsAttr) {
+ if (PropertyRegistry::isKnownAttribute(attrName)) {
+ ASSERT(attrName == SVGNames::pointsAttr);
if (auto* renderer = downcast<RenderSVGPath>(this->renderer())) {
InstanceInvalidationGuard guard(*this);
renderer->setNeedsShapeUpdate();
Modified: trunk/Source/WebCore/svg/SVGStopElement.cpp (291107 => 291108)
--- trunk/Source/WebCore/svg/SVGStopElement.cpp 2022-03-10 15:27:06 UTC (rev 291107)
+++ trunk/Source/WebCore/svg/SVGStopElement.cpp 2022-03-10 15:52:28 UTC (rev 291108)
@@ -64,7 +64,8 @@
void SVGStopElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (attrName == SVGNames::offsetAttr) {
+ if (PropertyRegistry::isKnownAttribute(attrName)) {
+ ASSERT(attrName == SVGNames::offsetAttr);
if (auto renderer = this->renderer()) {
InstanceInvalidationGuard guard(*this);
RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer);