Title: [179548] trunk/Source/WebCore
Revision
179548
Author
da...@apple.com
Date
2015-02-03 08:58:08 -0800 (Tue, 03 Feb 2015)

Log Message

Move InstanceInvalidationGuard/UpdateBlocker to SVGElement from SVGElementInstance
https://bugs.webkit.org/show_bug.cgi?id=141148

Reviewed by Brent Fulgham.

Inspired by this change Rob Buis made in Blink:

    http://src.chromium.org/viewvc/blink?view=revision&revision=173343

I actually wrote the whole thing and then discovered we did it almost identically.

* svg/SVGAnimatedTypeAnimator.cpp:
(WebCore::SVGElementAnimatedPropertyList::setInstanceUpdatesBlocked): Added this
helper function to get around a circular header dependency.
* svg/SVGAnimatedTypeAnimator.h:
(WebCore::SVGAnimatedTypeAnimator::executeAction): Use setInstanceUpdatesBlocked.

* svg/SVGElement.cpp:
(WebCore::SVGElement::removedFrom): Use invalidateInstances.
(WebCore::SVGElement::finishParsingChildren): Ditto.
(WebCore::SVGElement::svgAttributeChanged): Ditto.
(WebCore::SVGElement::childrenChanged): Ditto.
(WebCore::SVGElement::setInstanceUpdatesBlocked): Added an assertion that will
catch anyone who nests InstanceUpdateBlocker by accident.
(WebCore::SVGElement::invalidateInstances): Moved this here from
SVGElementInstance::invalidateAllInstancesOfElement. I had already modified this
so it had nothing to do with SVGElementInstance, so it was a simple matter of
converting this into a member function. Added a FIXME about the mysterious
updateStyleIfNeeded that makes multiple tests fail if it's removed.

* svg/SVGElement.h: Added public InstanceUpdateBlocker class, protected
InstanceInvalidationGuard class, and private invalidateInstances function.
Unlike the ones in SVGElementInstance these use references so they are then
not copyable without using the WTF_MAKE_NONCOPYABLE macro.

* svg/SVGElementInstance.cpp:
(WebCore::SVGElementInstance::invalidateAllInstancesOfElement): Deleted.
(WebCore::SVGElementInstance::InstanceUpdateBlocker::InstanceUpdateBlocker): Deleted.
(WebCore::SVGElementInstance::InstanceUpdateBlocker::~InstanceUpdateBlocker): Deleted.
* svg/SVGElementInstance.h: Removed InvalidationGuard, InstanceUpdateBlocker, and
invalidateAllInstancesOfElement. Didn't do any further cleanup since we soon will
delete this entire file.

* svg/SVGAElement.cpp:
(WebCore::SVGAElement::svgAttributeChanged): Updated to use new name and reference
instead of pointer.
* svg/SVGAnimateElementBase.cpp:
(WebCore::applyCSSPropertyToTargetAndInstances): Ditto.
(WebCore::removeCSSPropertyFromTargetAndInstances): Ditto.
(WebCore::notifyTargetAndInstancesAboutAnimValChange): Ditto.
* svg/SVGAnimatedPath.cpp:
(WebCore::SVGAnimatedPathAnimator::startAnimValAnimation): Ditto.
* svg/SVGCircleElement.cpp:
(WebCore::SVGCircleElement::svgAttributeChanged): Ditto.
* svg/SVGClipPathElement.cpp:
(WebCore::SVGClipPathElement::svgAttributeChanged): Ditto.
* svg/SVGComponentTransferFunctionElement.cpp:
(WebCore::SVGComponentTransferFunctionElement::svgAttributeChanged): Ditto.
* svg/SVGCursorElement.cpp:
(WebCore::SVGCursorElement::svgAttributeChanged): Ditto.
* svg/SVGEllipseElement.cpp:
(WebCore::SVGEllipseElement::svgAttributeChanged): Ditto.
* svg/SVGFEBlendElement.cpp:
(WebCore::SVGFEBlendElement::svgAttributeChanged): Ditto.
* svg/SVGFEColorMatrixElement.cpp:
(WebCore::SVGFEColorMatrixElement::svgAttributeChanged): Ditto.
* svg/SVGFECompositeElement.cpp:
(WebCore::SVGFECompositeElement::svgAttributeChanged): Ditto.
* svg/SVGFEConvolveMatrixElement.cpp:
(WebCore::SVGFEConvolveMatrixElement::svgAttributeChanged): Ditto.
* svg/SVGFEDiffuseLightingElement.cpp:
(WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged): Ditto.
* svg/SVGFEDisplacementMapElement.cpp:
(WebCore::SVGFEDisplacementMapElement::svgAttributeChanged): Ditto.
* svg/SVGFEDropShadowElement.cpp:
(WebCore::SVGFEDropShadowElement::svgAttributeChanged): Ditto.
* svg/SVGFEGaussianBlurElement.cpp:
(WebCore::SVGFEGaussianBlurElement::svgAttributeChanged): Ditto.
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::svgAttributeChanged): Ditto.
* svg/SVGFELightElement.cpp:
(WebCore::SVGFELightElement::svgAttributeChanged): Ditto.
* svg/SVGFEMergeNodeElement.cpp:
(WebCore::SVGFEMergeNodeElement::svgAttributeChanged): Ditto.
* svg/SVGFEMorphologyElement.cpp:
(WebCore::SVGFEMorphologyElement::svgAttributeChanged): Ditto.
* svg/SVGFEOffsetElement.cpp:
(WebCore::SVGFEOffsetElement::svgAttributeChanged): Ditto.
* svg/SVGFESpecularLightingElement.cpp:
(WebCore::SVGFESpecularLightingElement::svgAttributeChanged): Ditto.
* svg/SVGFETileElement.cpp:
(WebCore::SVGFETileElement::svgAttributeChanged): Ditto.
* svg/SVGFETurbulenceElement.cpp:
(WebCore::SVGFETurbulenceElement::svgAttributeChanged): Ditto.
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::svgAttributeChanged): Ditto.
* svg/SVGFilterPrimitiveStandardAttributes.cpp:
(WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged): Ditto.
* svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::svgAttributeChanged): Ditto.
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::svgAttributeChanged): Ditto.
* svg/SVGGradientElement.cpp:
(WebCore::SVGGradientElement::svgAttributeChanged): Ditto.
* svg/SVGGraphicsElement.cpp:
(WebCore::SVGGraphicsElement::svgAttributeChanged): Ditto.
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::svgAttributeChanged): Ditto.
* svg/SVGLineElement.cpp:
(WebCore::SVGLineElement::svgAttributeChanged): Ditto.
* svg/SVGLinearGradientElement.cpp:
(WebCore::SVGLinearGradientElement::svgAttributeChanged): Ditto.
* svg/SVGMPathElement.cpp:
(WebCore::SVGMPathElement::svgAttributeChanged): Ditto.
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::svgAttributeChanged): Ditto.
* svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::svgAttributeChanged): Ditto.
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::svgAttributeChanged): Ditto.
* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::svgAttributeChanged): Ditto.
* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::svgAttributeChanged): Ditto.
* svg/SVGRadialGradientElement.cpp:
(WebCore::SVGRadialGradientElement::svgAttributeChanged): Ditto.
* svg/SVGRectElement.cpp:
(WebCore::SVGRectElement::svgAttributeChanged): Ditto.
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::svgAttributeChanged): Ditto.
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::svgAttributeChanged): Ditto.
* svg/SVGStopElement.cpp:
(WebCore::SVGStopElement::svgAttributeChanged): Ditto.
* svg/SVGSymbolElement.cpp:
(WebCore::SVGSymbolElement::svgAttributeChanged): Ditto.
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::svgAttributeChanged): Ditto.
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::svgAttributeChanged): Ditto.
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::svgAttributeChanged): Ditto.
* svg/SVGTextPositioningElement.cpp:
(WebCore::SVGTextPositioningElement::svgAttributeChanged): Ditto.
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::svgAttributeChanged): Ditto.
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::svgAttributeChanged): Ditto.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (179547 => 179548)


--- trunk/Source/WebCore/ChangeLog	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/ChangeLog	2015-02-03 16:58:08 UTC (rev 179548)
@@ -1,3 +1,154 @@
+2015-02-03  Darin Adler  <da...@apple.com>
+
+        Move InstanceInvalidationGuard/UpdateBlocker to SVGElement from SVGElementInstance
+        https://bugs.webkit.org/show_bug.cgi?id=141148
+
+        Reviewed by Brent Fulgham.
+
+        Inspired by this change Rob Buis made in Blink:
+
+            http://src.chromium.org/viewvc/blink?view=revision&revision=173343
+
+        I actually wrote the whole thing and then discovered we did it almost identically.
+
+        * svg/SVGAnimatedTypeAnimator.cpp:
+        (WebCore::SVGElementAnimatedPropertyList::setInstanceUpdatesBlocked): Added this
+        helper function to get around a circular header dependency.
+        * svg/SVGAnimatedTypeAnimator.h:
+        (WebCore::SVGAnimatedTypeAnimator::executeAction): Use setInstanceUpdatesBlocked.
+
+        * svg/SVGElement.cpp:
+        (WebCore::SVGElement::removedFrom): Use invalidateInstances.
+        (WebCore::SVGElement::finishParsingChildren): Ditto.
+        (WebCore::SVGElement::svgAttributeChanged): Ditto.
+        (WebCore::SVGElement::childrenChanged): Ditto.
+        (WebCore::SVGElement::setInstanceUpdatesBlocked): Added an assertion that will
+        catch anyone who nests InstanceUpdateBlocker by accident.
+        (WebCore::SVGElement::invalidateInstances): Moved this here from
+        SVGElementInstance::invalidateAllInstancesOfElement. I had already modified this
+        so it had nothing to do with SVGElementInstance, so it was a simple matter of
+        converting this into a member function. Added a FIXME about the mysterious
+        updateStyleIfNeeded that makes multiple tests fail if it's removed.
+
+        * svg/SVGElement.h: Added public InstanceUpdateBlocker class, protected
+        InstanceInvalidationGuard class, and private invalidateInstances function.
+        Unlike the ones in SVGElementInstance these use references so they are then
+        not copyable without using the WTF_MAKE_NONCOPYABLE macro.
+
+        * svg/SVGElementInstance.cpp:
+        (WebCore::SVGElementInstance::invalidateAllInstancesOfElement): Deleted.
+        (WebCore::SVGElementInstance::InstanceUpdateBlocker::InstanceUpdateBlocker): Deleted.
+        (WebCore::SVGElementInstance::InstanceUpdateBlocker::~InstanceUpdateBlocker): Deleted.
+        * svg/SVGElementInstance.h: Removed InvalidationGuard, InstanceUpdateBlocker, and
+        invalidateAllInstancesOfElement. Didn't do any further cleanup since we soon will
+        delete this entire file.
+
+        * svg/SVGAElement.cpp:
+        (WebCore::SVGAElement::svgAttributeChanged): Updated to use new name and reference
+        instead of pointer.
+        * svg/SVGAnimateElementBase.cpp:
+        (WebCore::applyCSSPropertyToTargetAndInstances): Ditto.
+        (WebCore::removeCSSPropertyFromTargetAndInstances): Ditto.
+        (WebCore::notifyTargetAndInstancesAboutAnimValChange): Ditto.
+        * svg/SVGAnimatedPath.cpp:
+        (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation): Ditto.
+        * svg/SVGCircleElement.cpp:
+        (WebCore::SVGCircleElement::svgAttributeChanged): Ditto.
+        * svg/SVGClipPathElement.cpp:
+        (WebCore::SVGClipPathElement::svgAttributeChanged): Ditto.
+        * svg/SVGComponentTransferFunctionElement.cpp:
+        (WebCore::SVGComponentTransferFunctionElement::svgAttributeChanged): Ditto.
+        * svg/SVGCursorElement.cpp:
+        (WebCore::SVGCursorElement::svgAttributeChanged): Ditto.
+        * svg/SVGEllipseElement.cpp:
+        (WebCore::SVGEllipseElement::svgAttributeChanged): Ditto.
+        * svg/SVGFEBlendElement.cpp:
+        (WebCore::SVGFEBlendElement::svgAttributeChanged): Ditto.
+        * svg/SVGFEColorMatrixElement.cpp:
+        (WebCore::SVGFEColorMatrixElement::svgAttributeChanged): Ditto.
+        * svg/SVGFECompositeElement.cpp:
+        (WebCore::SVGFECompositeElement::svgAttributeChanged): Ditto.
+        * svg/SVGFEConvolveMatrixElement.cpp:
+        (WebCore::SVGFEConvolveMatrixElement::svgAttributeChanged): Ditto.
+        * svg/SVGFEDiffuseLightingElement.cpp:
+        (WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged): Ditto.
+        * svg/SVGFEDisplacementMapElement.cpp:
+        (WebCore::SVGFEDisplacementMapElement::svgAttributeChanged): Ditto.
+        * svg/SVGFEDropShadowElement.cpp:
+        (WebCore::SVGFEDropShadowElement::svgAttributeChanged): Ditto.
+        * svg/SVGFEGaussianBlurElement.cpp:
+        (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged): Ditto.
+        * svg/SVGFEImageElement.cpp:
+        (WebCore::SVGFEImageElement::svgAttributeChanged): Ditto.
+        * svg/SVGFELightElement.cpp:
+        (WebCore::SVGFELightElement::svgAttributeChanged): Ditto.
+        * svg/SVGFEMergeNodeElement.cpp:
+        (WebCore::SVGFEMergeNodeElement::svgAttributeChanged): Ditto.
+        * svg/SVGFEMorphologyElement.cpp:
+        (WebCore::SVGFEMorphologyElement::svgAttributeChanged): Ditto.
+        * svg/SVGFEOffsetElement.cpp:
+        (WebCore::SVGFEOffsetElement::svgAttributeChanged): Ditto.
+        * svg/SVGFESpecularLightingElement.cpp:
+        (WebCore::SVGFESpecularLightingElement::svgAttributeChanged): Ditto.
+        * svg/SVGFETileElement.cpp:
+        (WebCore::SVGFETileElement::svgAttributeChanged): Ditto.
+        * svg/SVGFETurbulenceElement.cpp:
+        (WebCore::SVGFETurbulenceElement::svgAttributeChanged): Ditto.
+        * svg/SVGFilterElement.cpp:
+        (WebCore::SVGFilterElement::svgAttributeChanged): Ditto.
+        * svg/SVGFilterPrimitiveStandardAttributes.cpp:
+        (WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged): Ditto.
+        * svg/SVGForeignObjectElement.cpp:
+        (WebCore::SVGForeignObjectElement::svgAttributeChanged): Ditto.
+        * svg/SVGGElement.cpp:
+        (WebCore::SVGGElement::svgAttributeChanged): Ditto.
+        * svg/SVGGradientElement.cpp:
+        (WebCore::SVGGradientElement::svgAttributeChanged): Ditto.
+        * svg/SVGGraphicsElement.cpp:
+        (WebCore::SVGGraphicsElement::svgAttributeChanged): Ditto.
+        * svg/SVGImageElement.cpp:
+        (WebCore::SVGImageElement::svgAttributeChanged): Ditto.
+        * svg/SVGLineElement.cpp:
+        (WebCore::SVGLineElement::svgAttributeChanged): Ditto.
+        * svg/SVGLinearGradientElement.cpp:
+        (WebCore::SVGLinearGradientElement::svgAttributeChanged): Ditto.
+        * svg/SVGMPathElement.cpp:
+        (WebCore::SVGMPathElement::svgAttributeChanged): Ditto.
+        * svg/SVGMarkerElement.cpp:
+        (WebCore::SVGMarkerElement::svgAttributeChanged): Ditto.
+        * svg/SVGMaskElement.cpp:
+        (WebCore::SVGMaskElement::svgAttributeChanged): Ditto.
+        * svg/SVGPathElement.cpp:
+        (WebCore::SVGPathElement::svgAttributeChanged): Ditto.
+        * svg/SVGPatternElement.cpp:
+        (WebCore::SVGPatternElement::svgAttributeChanged): Ditto.
+        * svg/SVGPolyElement.cpp:
+        (WebCore::SVGPolyElement::svgAttributeChanged): Ditto.
+        * svg/SVGRadialGradientElement.cpp:
+        (WebCore::SVGRadialGradientElement::svgAttributeChanged): Ditto.
+        * svg/SVGRectElement.cpp:
+        (WebCore::SVGRectElement::svgAttributeChanged): Ditto.
+        * svg/SVGSVGElement.cpp:
+        (WebCore::SVGSVGElement::svgAttributeChanged): Ditto.
+        * svg/SVGScriptElement.cpp:
+        (WebCore::SVGScriptElement::svgAttributeChanged): Ditto.
+        * svg/SVGStopElement.cpp:
+        (WebCore::SVGStopElement::svgAttributeChanged): Ditto.
+        * svg/SVGSymbolElement.cpp:
+        (WebCore::SVGSymbolElement::svgAttributeChanged): Ditto.
+        * svg/SVGTRefElement.cpp:
+        (WebCore::SVGTRefElement::svgAttributeChanged): Ditto.
+        * svg/SVGTextContentElement.cpp:
+        (WebCore::SVGTextContentElement::svgAttributeChanged): Ditto.
+        * svg/SVGTextPathElement.cpp:
+        (WebCore::SVGTextPathElement::svgAttributeChanged): Ditto.
+        * svg/SVGTextPositioningElement.cpp:
+        (WebCore::SVGTextPositioningElement::svgAttributeChanged): Ditto.
+        * svg/SVGUseElement.cpp:
+        (WebCore::SVGUseElement::svgAttributeChanged): Ditto.
+        * svg/animation/SVGSMILElement.cpp:
+        (WebCore::SVGSMILElement::svgAttributeChanged): Ditto.
+
 2015-02-02  Darin Adler  <da...@apple.com>
 
         REGRESSION (r170576): Storage leaks in parsing of CSS image sizes

Modified: trunk/Source/WebCore/svg/SVGAElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGAElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGAElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -126,7 +126,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     // Unlike other SVG*Element classes, SVGAElement only listens to SVGURIReference changes
     // as none of the other properties changes the linking behaviour for our <a> element.

Modified: trunk/Source/WebCore/svg/SVGAnimateElementBase.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGAnimateElementBase.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGAnimateElementBase.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -258,7 +258,7 @@
 
     CSSPropertyID id = cssPropertyID(attributeName.localName());
 
-    SVGElementInstance::InstanceUpdateBlocker blocker(&targetElement);
+    SVGElement::InstanceUpdateBlocker blocker(targetElement);
     applyCSSPropertyToTarget(targetElement, id, valueAsString);
 
     // If the target element has instances, update them as well, w/o requiring the <use> tree to be rebuilt.
@@ -274,7 +274,7 @@
 
     CSSPropertyID id = cssPropertyID(attributeName.localName());
 
-    SVGElementInstance::InstanceUpdateBlocker blocker(&targetElement);
+    SVGElement::InstanceUpdateBlocker blocker(targetElement);
     removeCSSPropertyFromTarget(targetElement, id);
 
     // If the target element has instances, update them as well, w/o requiring the <use> tree to be rebuilt.
@@ -293,7 +293,7 @@
     if (attributeName == anyQName() || !targetElement.inDocument() || !targetElement.parentNode())
         return;
 
-    SVGElementInstance::InstanceUpdateBlocker blocker(&targetElement);
+    SVGElement::InstanceUpdateBlocker blocker(targetElement);
     notifyTargetAboutAnimValChange(targetElement, attributeName);
 
     // If the target element has instances, update them as well, w/o requiring the <use> tree to be rebuilt.

Modified: trunk/Source/WebCore/svg/SVGAnimatedPath.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGAnimatedPath.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGAnimatedPath.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -54,7 +54,7 @@
     for (SVGElementAnimatedPropertyList::const_iterator it = animatedTypes.begin(); it != end; ++it)
         result.append(castAnimatedPropertyToActualType<SVGAnimatedPathSegListPropertyTearOff>(it->properties[0].get()));
 
-    SVGElementInstance::InstanceUpdateBlocker blocker(property->contextElement());
+    SVGElement::InstanceUpdateBlocker blocker(*property->contextElement());
 
     size_t resultSize = result.size();
     for (size_t i = 0; i < resultSize; ++i)

Modified: trunk/Source/WebCore/svg/SVGAnimatedTypeAnimator.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGAnimatedTypeAnimator.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGAnimatedTypeAnimator.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -83,4 +83,9 @@
     return result;
 }
 
+void SVGAnimatedTypeAnimator::setInstanceUpdatesBlocked(SVGElement& element, bool blocked)
+{
+    element.setInstanceUpdatesBlocked(blocked);
+}
+
 } // namespace WebCore

Modified: trunk/Source/WebCore/svg/SVGAnimatedTypeAnimator.h (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGAnimatedTypeAnimator.h	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGAnimatedTypeAnimator.h	2015-02-03 16:58:08 UTC (rev 179548)
@@ -189,7 +189,8 @@
     template<typename AnimValType>
     void executeAction(AnimationAction action, const SVGElementAnimatedPropertyList& animatedTypes, unsigned whichProperty, typename AnimValType::ContentType* type = 0)
     {
-        SVGElementInstance::InstanceUpdateBlocker blocker(animatedTypes[0].element);
+        // FIXME: Can't use SVGElement::InstanceUpdateBlocker because of circular header dependency. Would be nice to untangle this.
+        setInstanceUpdatesBlocked(*animatedTypes[0].element, true);
 
         SVGElementAnimatedPropertyList::const_iterator end = animatedTypes.end();
         for (SVGElementAnimatedPropertyList::const_iterator it = animatedTypes.begin(); it != end; ++it) {
@@ -216,7 +217,11 @@
                 break;
             }
         }
+
+        setInstanceUpdatesBlocked(*animatedTypes[0].element, false);
     }
+
+    static void setInstanceUpdatesBlocked(SVGElement&, bool);
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/svg/SVGCircleElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGCircleElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGCircleElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -104,7 +104,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     if (attrName == SVGNames::cxAttr
         || attrName == SVGNames::cyAttr

Modified: trunk/Source/WebCore/svg/SVGClipPathElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGClipPathElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGClipPathElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -96,7 +96,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     if (RenderObject* object = renderer())
         object->setNeedsLayout();

Modified: trunk/Source/WebCore/svg/SVGComponentTransferFunctionElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGComponentTransferFunctionElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGComponentTransferFunctionElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -131,7 +131,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     invalidateFilterPrimitiveParent(this);
 }

Modified: trunk/Source/WebCore/svg/SVGCursorElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGCursorElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGCursorElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -121,7 +121,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     // Any change of a cursor specific attribute triggers this recalc.
     HashSet<SVGElement*>::const_iterator it = m_clients.begin();

Modified: trunk/Source/WebCore/svg/SVGElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -392,7 +392,7 @@
         document().accessSVGExtensions().clearTargetDependencies(*this);
         document().accessSVGExtensions().removeAllElementReferencesForTarget(this);
     }
-    SVGElementInstance::invalidateAllInstancesOfElement(this);
+    invalidateInstances();
 }
 
 SVGSVGElement* SVGElement::ownerSVGElement() const
@@ -713,7 +713,7 @@
 
     // Notify all the elements which have references to this element to rebuild their shadow and render
     // trees, e.g. a <use> element references a target element before this target element is defined.
-    SVGElementInstance::invalidateAllInstancesOfElement(this);
+    invalidateInstances();
 }
 
 bool SVGElement::childShouldCreateRenderer(const Node& child) const
@@ -1044,13 +1044,13 @@
 {
     CSSPropertyID propId = cssPropertyIdForSVGAttributeName(attrName);
     if (propId > 0) {
-        SVGElementInstance::invalidateAllInstancesOfElement(this);
+        invalidateInstances();
         return;
     }
 
     if (attrName == HTMLNames::classAttr) {
         classAttributeChanged(className());
-        SVGElementInstance::invalidateAllInstancesOfElement(this);
+        invalidateInstances();
         return;
     }
 
@@ -1061,7 +1061,7 @@
             downcast<RenderSVGResourceContainer>(*renderer).idChanged();
         if (inDocument())
             buildPendingResourcesIfNeeded();
-        SVGElementInstance::invalidateAllInstancesOfElement(this);
+        invalidateInstances();
         return;
     }
 }
@@ -1103,7 +1103,7 @@
 
     if (change.source == ChildChangeSourceParser)
         return;
-    SVGElementInstance::invalidateAllInstancesOfElement(this);
+    invalidateInstances();
 }
 
 RefPtr<CSSValue> SVGElement::getPresentationAttribute(const String& name)
@@ -1130,6 +1130,10 @@
 
 void SVGElement::setInstanceUpdatesBlocked(bool value)
 {
+    // Catch any callers that calls setInstanceUpdatesBlocked(true) twice in a row.
+    // That probably indicates nested use of InstanceUpdateBlocker and a bug.
+    ASSERT(!value || !instanceUpdatesBlocked());
+
     if (m_svgRareData)
         m_svgRareData->setInstanceUpdatesBlocked(value);
 }
@@ -1201,4 +1205,30 @@
     dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
 }
 
+void SVGElement::invalidateInstances()
+{
+    if (!inDocument())
+        return;
+
+    if (instanceUpdatesBlocked())
+        return;
+
+    auto& instances = this->instances();
+    if (instances.isEmpty())
+        return;
+
+    // Mark all use elements referencing 'element' for rebuilding
+    do {
+        SVGElement* instance = *instances.begin();
+        if (SVGUseElement* element = instance->correspondingUseElement()) {
+            ASSERT(element->inDocument());
+            element->invalidateShadowTree();
+        }
+        instance->setCorrespondingElement(nullptr);
+    } while (!instances.isEmpty());
+
+    // FIXME: Why is this needed?
+    document().updateStyleIfNeeded();
 }
+
+}

Modified: trunk/Source/WebCore/svg/SVGElement.h (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGElement.h	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGElement.h	2015-02-03 16:58:08 UTC (rev 179548)
@@ -155,6 +155,8 @@
 
     void callClearTarget() { clearTarget(); }
 
+    class InstanceUpdateBlocker;
+
 protected:
     SVGElement(const QualifiedName&, Document&);
     virtual ~SVGElement();
@@ -183,6 +185,8 @@
     void updateRelativeLengthsInformation() { updateRelativeLengthsInformation(selfHasRelativeLengths(), this); }
     void updateRelativeLengthsInformation(bool hasRelativeLengths, SVGElement*);
 
+    class InstanceInvalidationGuard;
+
 private:
     friend class SVGElementInstance;
 
@@ -200,6 +204,8 @@
     virtual bool filterOutAnimatableAttribute(const QualifiedName&) const;
 #endif
 
+    void invalidateInstances();
+
     std::unique_ptr<SVGElementRareData> m_svgRareData;
 
     HashSet<SVGElement*> m_elementsWithRelativeLengths;
@@ -210,6 +216,22 @@
 
 };
 
+class SVGElement::InstanceInvalidationGuard {
+public:
+    InstanceInvalidationGuard(SVGElement&);
+    ~InstanceInvalidationGuard();
+private:
+    SVGElement& m_element;
+};
+
+class SVGElement::InstanceUpdateBlocker {
+public:
+    InstanceUpdateBlocker(SVGElement&);
+    ~InstanceUpdateBlocker();
+private:
+    SVGElement& m_element;
+};
+
 struct SVGAttributeHashTranslator {
     static unsigned hash(const QualifiedName& key)
     {
@@ -222,6 +244,28 @@
     static bool equal(const QualifiedName& a, const QualifiedName& b) { return a.matches(b); }
 };
 
+inline SVGElement::InstanceInvalidationGuard::InstanceInvalidationGuard(SVGElement& element)
+    : m_element(element)
+{
+}
+
+inline SVGElement::InstanceInvalidationGuard::~InstanceInvalidationGuard()
+{
+    m_element.invalidateInstances();
+}
+
+inline SVGElement::InstanceUpdateBlocker::InstanceUpdateBlocker(SVGElement& element)
+    : m_element(element)
+{
+    m_element.setInstanceUpdatesBlocked(true);
+}
+
+inline SVGElement::InstanceUpdateBlocker::~InstanceUpdateBlocker()
+{
+    ASSERT(m_element.instanceUpdatesBlocked());
+    m_element.setInstanceUpdatesBlocked(false);
+}
+
 inline bool Node::hasTagName(const SVGQualifiedName& name) const
 {
     return isSVGElement() && downcast<SVGElement>(*this).hasTagName(name);

Modified: trunk/Source/WebCore/svg/SVGElementInstance.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGElementInstance.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGElementInstance.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -167,31 +167,6 @@
     appendChildToContainer<SVGElementInstance, SVGElementInstance>(child.get(), *this);
 }
 
-void SVGElementInstance::invalidateAllInstancesOfElement(SVGElement* element)
-{
-    if (!element || !element->inDocument())
-        return;
-
-    if (element->instanceUpdatesBlocked())
-        return;
-
-    auto& instances = element->instances();
-    if (instances.isEmpty())
-        return;
-
-    // Mark all use elements referencing 'element' for rebuilding
-    do {
-        SVGElement* instance = *instances.begin();
-        if (SVGUseElement* element = instance->correspondingUseElement()) {
-            ASSERT(element->inDocument());
-            element->invalidateShadowTree();
-        }
-        instance->setCorrespondingElement(nullptr);
-    } while (!instances.isEmpty());
-
-    element->document().updateStyleIfNeeded();
-}
-
 EventTargetInterface SVGElementInstance::eventTargetInterface() const
 {
     return SVGElementInstanceEventTargetInterfaceType;
@@ -240,17 +215,4 @@
     return *eventTargetData();
 }
 
-SVGElementInstance::InstanceUpdateBlocker::InstanceUpdateBlocker(SVGElement* targetElement)
-    : m_targetElement(targetElement)
-{
-    if (m_targetElement)
-        m_targetElement->setInstanceUpdatesBlocked(true);
 }
-
-SVGElementInstance::InstanceUpdateBlocker::~InstanceUpdateBlocker()
-{
-    if (m_targetElement)
-        m_targetElement->setInstanceUpdatesBlocked(false);
-}
-   
-}

Modified: trunk/Source/WebCore/svg/SVGElementInstance.h (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGElementInstance.h	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGElementInstance.h	2015-02-03 16:58:08 UTC (rev 179548)
@@ -71,27 +71,6 @@
 
     Document* ownerDocument() const;
 
-    class InvalidationGuard {
-        WTF_MAKE_NONCOPYABLE(InvalidationGuard);
-    public:    
-        InvalidationGuard(SVGElement* element) : m_element(element) { }
-        ~InvalidationGuard() { SVGElementInstance::invalidateAllInstancesOfElement(m_element); }
-    private:
-        SVGElement* m_element;
-    };
-
-    class InstanceUpdateBlocker {
-        WTF_MAKE_NONCOPYABLE(InstanceUpdateBlocker);
-    public:
-        InstanceUpdateBlocker(SVGElement* targetElement);
-        ~InstanceUpdateBlocker();
-
-    private:
-        SVGElement* m_targetElement;
-    };
-    
-    static void invalidateAllInstancesOfElement(SVGElement*);
-
     using TreeShared<SVGElementInstance>::ref;
     using TreeShared<SVGElementInstance>::deref;
 

Modified: trunk/Source/WebCore/svg/SVGEllipseElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGEllipseElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGEllipseElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -108,7 +108,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     if (attrName == SVGNames::cxAttr
         || attrName == SVGNames::cyAttr

Modified: trunk/Source/WebCore/svg/SVGFEBlendElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGFEBlendElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGFEBlendElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -111,7 +111,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     if (attrName == SVGNames::modeAttr) {
         primitiveAttributeChanged(attrName);

Modified: trunk/Source/WebCore/svg/SVGFEColorMatrixElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGFEColorMatrixElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGFEColorMatrixElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -115,7 +115,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     if (attrName == SVGNames::typeAttr || attrName == SVGNames::valuesAttr) {
         primitiveAttributeChanged(attrName);

Modified: trunk/Source/WebCore/svg/SVGFECompositeElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGFECompositeElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGFECompositeElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -151,7 +151,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     if (attrName == SVGNames::operatorAttr
         || attrName == SVGNames::k1Attr

Modified: trunk/Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -257,7 +257,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     if (attrName == SVGNames::edgeModeAttr
         || attrName == SVGNames::divisorAttr

Modified: trunk/Source/WebCore/svg/SVGFEDiffuseLightingElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGFEDiffuseLightingElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGFEDiffuseLightingElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -174,7 +174,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
     
     if (attrName == SVGNames::surfaceScaleAttr
         || attrName == SVGNames::diffuseConstantAttr

Modified: trunk/Source/WebCore/svg/SVGFEDisplacementMapElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGFEDisplacementMapElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGFEDisplacementMapElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -132,7 +132,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
     
     if (attrName == SVGNames::xChannelSelectorAttr || attrName == SVGNames::yChannelSelectorAttr || attrName == SVGNames::scaleAttr) {
         primitiveAttributeChanged(attrName);

Modified: trunk/Source/WebCore/svg/SVGFEDropShadowElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGFEDropShadowElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGFEDropShadowElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -135,7 +135,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
     
     if (attrName == SVGNames::inAttr
         || attrName == SVGNames::stdDeviationAttr

Modified: trunk/Source/WebCore/svg/SVGFEGaussianBlurElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGFEGaussianBlurElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGFEGaussianBlurElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -130,7 +130,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
     
     if (attrName == SVGNames::inAttr
         || attrName == SVGNames::stdDeviationAttr

Modified: trunk/Source/WebCore/svg/SVGFEImageElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGFEImageElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGFEImageElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -155,7 +155,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
     
     if (attrName == SVGNames::preserveAspectRatioAttr) {
         invalidate();

Modified: trunk/Source/WebCore/svg/SVGFELightElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGFELightElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGFELightElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -170,7 +170,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
     
     if (attrName == SVGNames::azimuthAttr
         || attrName == SVGNames::elevationAttr

Modified: trunk/Source/WebCore/svg/SVGFEMergeNodeElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGFEMergeNodeElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGFEMergeNodeElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -81,7 +81,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     if (attrName == SVGNames::inAttr) {
         invalidateFilterPrimitiveParent(this);

Modified: trunk/Source/WebCore/svg/SVGFEMorphologyElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGFEMorphologyElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGFEMorphologyElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -141,7 +141,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
     
     if (attrName == SVGNames::operatorAttr || attrName == SVGNames::radiusAttr) {
         primitiveAttributeChanged(attrName);

Modified: trunk/Source/WebCore/svg/SVGFEOffsetElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGFEOffsetElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGFEOffsetElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -97,7 +97,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
     
     if (attrName == SVGNames::inAttr || attrName == SVGNames::dxAttr || attrName == SVGNames::dyAttr) {
         invalidate();

Modified: trunk/Source/WebCore/svg/SVGFESpecularLightingElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGFESpecularLightingElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGFESpecularLightingElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -185,7 +185,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
     
     if (attrName == SVGNames::surfaceScaleAttr
         || attrName == SVGNames::specularConstantAttr

Modified: trunk/Source/WebCore/svg/SVGFETileElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGFETileElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGFETileElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -81,7 +81,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     if (attrName == SVGNames::inAttr) {
         invalidate();

Modified: trunk/Source/WebCore/svg/SVGFETurbulenceElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGFETurbulenceElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGFETurbulenceElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -155,7 +155,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
     
     if (attrName == SVGNames::baseFrequencyAttr
         || attrName == SVGNames::numOctavesAttr

Modified: trunk/Source/WebCore/svg/SVGFilterElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGFilterElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGFilterElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -165,7 +165,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     if (attrName == SVGNames::xAttr
         || attrName == SVGNames::yAttr

Modified: trunk/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -112,7 +112,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);    
+    InstanceInvalidationGuard guard(*this);
     invalidate();
 }
 

Modified: trunk/Source/WebCore/svg/SVGForeignObjectElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGForeignObjectElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGForeignObjectElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -112,7 +112,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     if (attrName == SVGNames::widthAttr
         || attrName == SVGNames::heightAttr) {

Modified: trunk/Source/WebCore/svg/SVGGElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGGElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGGElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -82,7 +82,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     if (auto renderer = this->renderer())
         RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer);

Modified: trunk/Source/WebCore/svg/SVGGradientElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGGradientElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGGradientElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -119,7 +119,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
     
     if (RenderObject* object = renderer())
         object->setNeedsLayout();

Modified: trunk/Source/WebCore/svg/SVGGraphicsElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGGraphicsElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGGraphicsElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -137,7 +137,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     if (SVGTests::handleAttributeChange(this, attrName))
         return;

Modified: trunk/Source/WebCore/svg/SVGImageElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGImageElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGImageElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -122,7 +122,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     if (attrName == SVGNames::widthAttr
         || attrName == SVGNames::heightAttr) {

Modified: trunk/Source/WebCore/svg/SVGLineElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGLineElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGLineElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -107,7 +107,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
     
     bool isLengthAttribute = attrName == SVGNames::x1Attr
                           || attrName == SVGNames::y1Attr

Modified: trunk/Source/WebCore/svg/SVGLinearGradientElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGLinearGradientElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGLinearGradientElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -109,7 +109,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
     
     updateRelativeLengthsInformation();
 

Modified: trunk/Source/WebCore/svg/SVGMPathElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGMPathElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGMPathElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -140,7 +140,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     if (SVGURIReference::isKnownAttribute(attrName)) {
         buildPendingResource();

Modified: trunk/Source/WebCore/svg/SVGMarkerElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGMarkerElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGMarkerElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -166,7 +166,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
     
     if (attrName == SVGNames::refXAttr
         || attrName == SVGNames::refYAttr

Modified: trunk/Source/WebCore/svg/SVGMaskElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGMaskElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGMaskElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -134,7 +134,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     if (attrName == SVGNames::xAttr
         || attrName == SVGNames::yAttr

Modified: trunk/Source/WebCore/svg/SVGPathElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGPathElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGPathElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -259,7 +259,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     RenderSVGPath* renderer = downcast<RenderSVGPath>(this->renderer());
 

Modified: trunk/Source/WebCore/svg/SVGPatternElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGPatternElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGPatternElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -159,7 +159,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     if (attrName == SVGNames::xAttr
         || attrName == SVGNames::yAttr

Modified: trunk/Source/WebCore/svg/SVGPolyElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGPolyElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGPolyElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -109,7 +109,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     auto* renderer = downcast<RenderSVGShape>(this->renderer());
     if (!renderer)

Modified: trunk/Source/WebCore/svg/SVGRadialGradientElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGRadialGradientElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGRadialGradientElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -121,7 +121,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
     
     updateRelativeLengthsInformation();
         

Modified: trunk/Source/WebCore/svg/SVGRectElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGRectElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGRectElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -120,7 +120,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     if (attrName == SVGNames::xAttr
         || attrName == SVGNames::yAttr

Modified: trunk/Source/WebCore/svg/SVGSVGElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGSVGElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGSVGElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -300,7 +300,7 @@
             object->setNeedsTransformUpdate();
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     if (updateRelativeLengthsOrViewBox
         || SVGLangSpace::isKnownAttribute(attrName)

Modified: trunk/Source/WebCore/svg/SVGScriptElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGScriptElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGScriptElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -98,7 +98,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     if (attrName == SVGNames::typeAttr || attrName == HTMLNames::onerrorAttr)
         return;

Modified: trunk/Source/WebCore/svg/SVGStopElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGStopElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGStopElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -86,7 +86,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     if (attrName == SVGNames::offsetAttr) {
         if (auto renderer = this->renderer())

Modified: trunk/Source/WebCore/svg/SVGSymbolElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGSymbolElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGSymbolElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -88,7 +88,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     // Every other property change is ignored.
     if (attrName == SVGNames::viewBoxAttr)

Modified: trunk/Source/WebCore/svg/SVGTRefElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGTRefElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGTRefElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -206,7 +206,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     if (SVGURIReference::isKnownAttribute(attrName)) {
         buildPendingResource();

Modified: trunk/Source/WebCore/svg/SVGTextContentElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGTextContentElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGTextContentElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -268,7 +268,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     if (attrName == SVGNames::textLengthAttr)
         m_specifiedTextLength = m_textLength.value;

Modified: trunk/Source/WebCore/svg/SVGTextPathElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGTextPathElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGTextPathElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -112,7 +112,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     if (SVGURIReference::isKnownAttribute(attrName)) {
         buildPendingResource();

Modified: trunk/Source/WebCore/svg/SVGTextPositioningElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGTextPositioningElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGTextPositioningElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -141,7 +141,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     bool updateRelativeLengths = attrName == SVGNames::xAttr
                               || attrName == SVGNames::yAttr

Modified: trunk/Source/WebCore/svg/SVGUseElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/SVGUseElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/SVGUseElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -223,7 +223,7 @@
         return;
     }
 
-    SVGElementInstance::InvalidationGuard invalidationGuard(this);
+    InstanceInvalidationGuard guard(*this);
 
     if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr || attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr) {
         updateRelativeLengthsInformation();

Modified: trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp (179547 => 179548)


--- trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp	2015-02-03 14:17:12 UTC (rev 179547)
+++ trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp	2015-02-03 16:58:08 UTC (rev 179548)
@@ -499,7 +499,7 @@
     else if (attrName == SVGNames::attributeNameAttr)
         setAttributeName(constructQualifiedName(this, fastGetAttribute(SVGNames::attributeNameAttr)));
     else if (attrName.matches(XLinkNames::hrefAttr)) {
-        SVGElementInstance::InvalidationGuard invalidationGuard(this);
+        InstanceInvalidationGuard guard(*this);
         buildPendingResource();
     } else if (inDocument()) {
         if (attrName == SVGNames::beginAttr)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to