Clean up ContainerNode::childrenChanged
[WebKit-https.git] / Source / WebCore / svg / SVGFELightElement.cpp
index 5d2e526..298d56c 100644 (file)
@@ -207,17 +207,18 @@ void SVGFELightElement::svgAttributeChanged(const QualifiedName& attrName)
     ASSERT_NOT_REACHED();
 }
 
-void SVGFELightElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
+void SVGFELightElement::childrenChanged(const ChildChange& change)
 {
-    SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
+    SVGElement::childrenChanged(change);
 
-    if (!changedByParser) {
-        if (ContainerNode* parent = parentNode()) {
-            RenderObject* renderer = parent->renderer();
-            if (renderer && renderer->isSVGResourceFilterPrimitive())
-                RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
-        }
-    }
+    if (change.source == ChildChangeSourceParser)
+        return;
+    ContainerNode* parent = parentNode();
+    if (!parent)
+        return;
+    RenderObject* renderer = parent->renderer();
+    if (renderer && renderer->isSVGResourceFilterPrimitive())
+        RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
 }
 
 }