Title: [291162] trunk/Source/WebCore
Revision
291162
Author
[email protected]
Date
2022-03-11 06:19:05 -0800 (Fri, 11 Mar 2022)

Log Message

Rename invalidation methods in SVGElement
https://bugs.webkit.org/show_bug.cgi?id=237716

Patch by Rob Buis <[email protected]> on 2022-03-11
Reviewed by Martin Robinson.

Rename invalidation methods in SVGElement to be more specific. This in fact
uses the naming in the underlying ElementData.

* svg/SVGCircleElement.cpp:
(WebCore::SVGCircleElement::svgAttributeChanged):
* svg/SVGElement.cpp:
(WebCore::SVGElement::commitPropertyChange):
* svg/SVGElement.h:
* svg/SVGElementInlines.h:
(WebCore::SVGElement::setAnimatedSVGAttributesAreDirty):
(WebCore::SVGElement::setPresentationalHintStyleIsDirty):
(WebCore::SVGElement::invalidateSVGAttributes): Deleted.
(WebCore::SVGElement::invalidateSVGPresentationalHintStyle): Deleted.
* svg/SVGEllipseElement.cpp:
(WebCore::SVGEllipseElement::svgAttributeChanged):
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::svgAttributeChanged):
* svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::svgAttributeChanged):
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::svgAttributeChanged):
* svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::svgAttributeChanged):
* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::svgAttributeChanged):
* svg/SVGRectElement.cpp:
(WebCore::SVGRectElement::svgAttributeChanged):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::svgAttributeChanged):
* svg/properties/SVGAttributeAnimator.cpp:
(WebCore::SVGAttributeAnimator::invalidateStyle):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (291161 => 291162)


--- trunk/Source/WebCore/ChangeLog	2022-03-11 14:17:13 UTC (rev 291161)
+++ trunk/Source/WebCore/ChangeLog	2022-03-11 14:19:05 UTC (rev 291162)
@@ -1,3 +1,42 @@
+2022-03-11  Rob Buis  <[email protected]>
+
+        Rename invalidation methods in SVGElement
+        https://bugs.webkit.org/show_bug.cgi?id=237716
+
+        Reviewed by Martin Robinson.
+
+        Rename invalidation methods in SVGElement to be more specific. This in fact
+        uses the naming in the underlying ElementData.
+
+        * svg/SVGCircleElement.cpp:
+        (WebCore::SVGCircleElement::svgAttributeChanged):
+        * svg/SVGElement.cpp:
+        (WebCore::SVGElement::commitPropertyChange):
+        * svg/SVGElement.h:
+        * svg/SVGElementInlines.h:
+        (WebCore::SVGElement::setAnimatedSVGAttributesAreDirty):
+        (WebCore::SVGElement::setPresentationalHintStyleIsDirty):
+        (WebCore::SVGElement::invalidateSVGAttributes): Deleted.
+        (WebCore::SVGElement::invalidateSVGPresentationalHintStyle): Deleted.
+        * svg/SVGEllipseElement.cpp:
+        (WebCore::SVGEllipseElement::svgAttributeChanged):
+        * svg/SVGFilterElement.cpp:
+        (WebCore::SVGFilterElement::svgAttributeChanged):
+        * svg/SVGForeignObjectElement.cpp:
+        (WebCore::SVGForeignObjectElement::svgAttributeChanged):
+        * svg/SVGImageElement.cpp:
+        (WebCore::SVGImageElement::svgAttributeChanged):
+        * svg/SVGMaskElement.cpp:
+        (WebCore::SVGMaskElement::svgAttributeChanged):
+        * svg/SVGPatternElement.cpp:
+        (WebCore::SVGPatternElement::svgAttributeChanged):
+        * svg/SVGRectElement.cpp:
+        (WebCore::SVGRectElement::svgAttributeChanged):
+        * svg/SVGSVGElement.cpp:
+        (WebCore::SVGSVGElement::svgAttributeChanged):
+        * svg/properties/SVGAttributeAnimator.cpp:
+        (WebCore::SVGAttributeAnimator::invalidateStyle):
+
 2022-03-11  Antoine Quint  <[email protected]>
 
         [web-animations] mask-repeat should support discrete animation

Modified: trunk/Source/WebCore/svg/SVGCircleElement.cpp (291161 => 291162)


--- trunk/Source/WebCore/svg/SVGCircleElement.cpp	2022-03-11 14:17:13 UTC (rev 291161)
+++ trunk/Source/WebCore/svg/SVGCircleElement.cpp	2022-03-11 14:19:05 UTC (rev 291162)
@@ -69,7 +69,7 @@
 {
     if (PropertyRegistry::isKnownAttribute(attrName)) {
         InstanceInvalidationGuard guard(*this);
-        invalidateSVGPresentationalHintStyle();
+        setPresentationalHintStyleIsDirty();
         return;
     }
 

Modified: trunk/Source/WebCore/svg/SVGElement.cpp (291161 => 291162)


--- trunk/Source/WebCore/svg/SVGElement.cpp	2022-03-11 14:17:13 UTC (rev 291161)
+++ trunk/Source/WebCore/svg/SVGElement.cpp	2022-03-11 14:19:05 UTC (rev 291162)
@@ -610,7 +610,7 @@
     // SVGLengthList and not the SVGLength.
     property->setDirty();
 
-    invalidateSVGAttributes();
+    setAnimatedSVGAttributesAreDirty();
     svgAttributeChanged(propertyRegistry().propertyAttributeName(*property));
 }
 
@@ -626,7 +626,7 @@
     else
         setSynchronizedLazyAttribute(attributeName, animatedProperty.baseValAsString());
 
-    invalidateSVGAttributes();
+    setAnimatedSVGAttributesAreDirty();
     svgAttributeChanged(attributeName);
 }
 

Modified: trunk/Source/WebCore/svg/SVGElement.h (291161 => 291162)


--- trunk/Source/WebCore/svg/SVGElement.h	2022-03-11 14:17:13 UTC (rev 291161)
+++ trunk/Source/WebCore/svg/SVGElement.h	2022-03-11 14:19:05 UTC (rev 291162)
@@ -82,8 +82,8 @@
 
     virtual AffineTransform* supplementalTransform() { return nullptr; }
 
-    inline void invalidateSVGAttributes();
-    inline void invalidateSVGPresentationalHintStyle();
+    inline void setAnimatedSVGAttributesAreDirty();
+    inline void setPresentationalHintStyleIsDirty();
 
     // The instances of an element are clones made in shadow trees to implement <use>.
     const WeakHashSet<SVGElement>& instances() const;

Modified: trunk/Source/WebCore/svg/SVGElementInlines.h (291161 => 291162)


--- trunk/Source/WebCore/svg/SVGElementInlines.h	2022-03-11 14:17:13 UTC (rev 291161)
+++ trunk/Source/WebCore/svg/SVGElementInlines.h	2022-03-11 14:19:05 UTC (rev 291162)
@@ -30,12 +30,12 @@
 
 namespace WebCore {
 
-inline void SVGElement::invalidateSVGAttributes()
+inline void SVGElement::setAnimatedSVGAttributesAreDirty()
 {
     ensureUniqueElementData().setAnimatedSVGAttributesAreDirty(true);
 }
 
-inline void SVGElement::invalidateSVGPresentationalHintStyle()
+inline void SVGElement::setPresentationalHintStyleIsDirty()
 {
     ensureUniqueElementData().setPresentationalHintStyleIsDirty(true);
     // Trigger style recalculation for "elements as resource" (e.g. referenced by feImage).

Modified: trunk/Source/WebCore/svg/SVGEllipseElement.cpp (291161 => 291162)


--- trunk/Source/WebCore/svg/SVGEllipseElement.cpp	2022-03-11 14:17:13 UTC (rev 291161)
+++ trunk/Source/WebCore/svg/SVGEllipseElement.cpp	2022-03-11 14:19:05 UTC (rev 291162)
@@ -72,7 +72,7 @@
 {
     if (PropertyRegistry::isKnownAttribute(attrName)) {
         InstanceInvalidationGuard guard(*this);
-        invalidateSVGPresentationalHintStyle();
+        setPresentationalHintStyleIsDirty();
         return;
     }
 

Modified: trunk/Source/WebCore/svg/SVGFilterElement.cpp (291161 => 291162)


--- trunk/Source/WebCore/svg/SVGFilterElement.cpp	2022-03-11 14:17:13 UTC (rev 291161)
+++ trunk/Source/WebCore/svg/SVGFilterElement.cpp	2022-03-11 14:19:05 UTC (rev 291162)
@@ -94,7 +94,7 @@
 {
     if (PropertyRegistry::isAnimatedLengthAttribute(attrName)) {
         InstanceInvalidationGuard guard(*this);
-        invalidateSVGPresentationalHintStyle();
+        setPresentationalHintStyleIsDirty();
         return;
     }
 

Modified: trunk/Source/WebCore/svg/SVGForeignObjectElement.cpp (291161 => 291162)


--- trunk/Source/WebCore/svg/SVGForeignObjectElement.cpp	2022-03-11 14:17:13 UTC (rev 291161)
+++ trunk/Source/WebCore/svg/SVGForeignObjectElement.cpp	2022-03-11 14:19:05 UTC (rev 291162)
@@ -77,7 +77,7 @@
     if (PropertyRegistry::isKnownAttribute(attrName)) {
         InstanceInvalidationGuard guard(*this);
         if (attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr)
-            invalidateSVGPresentationalHintStyle();
+            setPresentationalHintStyleIsDirty();
         else {
             ASSERT(attrName == SVGNames::xAttr || attrName == SVGNames::yAttr);
             updateRelativeLengthsInformation();

Modified: trunk/Source/WebCore/svg/SVGImageElement.cpp (291161 => 291162)


--- trunk/Source/WebCore/svg/SVGImageElement.cpp	2022-03-11 14:17:13 UTC (rev 291161)
+++ trunk/Source/WebCore/svg/SVGImageElement.cpp	2022-03-11 14:19:05 UTC (rev 291162)
@@ -103,7 +103,7 @@
                     RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer);
             }
         } else if (attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr)
-            invalidateSVGPresentationalHintStyle();
+            setPresentationalHintStyleIsDirty();
         else {
             ASSERT(attrName == SVGNames::preserveAspectRatioAttr);
             if (auto* renderer = this->renderer())

Modified: trunk/Source/WebCore/svg/SVGMaskElement.cpp (291161 => 291162)


--- trunk/Source/WebCore/svg/SVGMaskElement.cpp	2022-03-11 14:17:13 UTC (rev 291161)
+++ trunk/Source/WebCore/svg/SVGMaskElement.cpp	2022-03-11 14:19:05 UTC (rev 291162)
@@ -100,7 +100,7 @@
 {
     if (PropertyRegistry::isAnimatedLengthAttribute(attrName)) {
         InstanceInvalidationGuard guard(*this);
-        invalidateSVGPresentationalHintStyle();
+        setPresentationalHintStyleIsDirty();
         return;
     }
 

Modified: trunk/Source/WebCore/svg/SVGPatternElement.cpp (291161 => 291162)


--- trunk/Source/WebCore/svg/SVGPatternElement.cpp	2022-03-11 14:17:13 UTC (rev 291161)
+++ trunk/Source/WebCore/svg/SVGPatternElement.cpp	2022-03-11 14:19:05 UTC (rev 291162)
@@ -112,7 +112,7 @@
 {
     if (PropertyRegistry::isAnimatedLengthAttribute(attrName)) {
         InstanceInvalidationGuard guard(*this);
-        invalidateSVGPresentationalHintStyle();
+        setPresentationalHintStyleIsDirty();
         return;
     }
 

Modified: trunk/Source/WebCore/svg/SVGRectElement.cpp (291161 => 291162)


--- trunk/Source/WebCore/svg/SVGRectElement.cpp	2022-03-11 14:17:13 UTC (rev 291161)
+++ trunk/Source/WebCore/svg/SVGRectElement.cpp	2022-03-11 14:19:05 UTC (rev 291162)
@@ -80,7 +80,7 @@
 {
     if (PropertyRegistry::isKnownAttribute(attrName)) {
         InstanceInvalidationGuard guard(*this);
-        invalidateSVGPresentationalHintStyle();
+        setPresentationalHintStyleIsDirty();
         return;
     }
 

Modified: trunk/Source/WebCore/svg/SVGSVGElement.cpp (291161 => 291162)


--- trunk/Source/WebCore/svg/SVGSVGElement.cpp	2022-03-11 14:17:13 UTC (rev 291161)
+++ trunk/Source/WebCore/svg/SVGSVGElement.cpp	2022-03-11 14:19:05 UTC (rev 291162)
@@ -209,7 +209,7 @@
 {
     if (PropertyRegistry::isKnownAttribute(attrName)) {
         InstanceInvalidationGuard guard(*this);
-        invalidateSVGPresentationalHintStyle();
+        setPresentationalHintStyleIsDirty();
 
         if (auto* renderer = this->renderer())
             RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer);

Modified: trunk/Source/WebCore/svg/properties/SVGAttributeAnimator.cpp (291161 => 291162)


--- trunk/Source/WebCore/svg/properties/SVGAttributeAnimator.cpp	2022-03-11 14:17:13 UTC (rev 291161)
+++ trunk/Source/WebCore/svg/properties/SVGAttributeAnimator.cpp	2022-03-11 14:19:05 UTC (rev 291162)
@@ -40,7 +40,7 @@
 void SVGAttributeAnimator::invalidateStyle(SVGElement& targetElement)
 {
     SVGElement::InstanceInvalidationGuard guard(targetElement);
-    targetElement.invalidateSVGPresentationalHintStyle();
+    targetElement.setPresentationalHintStyleIsDirty();
 }
 
 void SVGAttributeAnimator::applyAnimatedStylePropertyChange(SVGElement& element, CSSPropertyID id, const String& value)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to