[webkit-reviews] review granted: [Bug 42244] SVGFilterElement & SVGFE*Element don't support dynamic invalidation, when attributes change : [Attachment 63445] Patch for feSpotLight properties (v2)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 4 06:49:15 PDT 2010


Nikolas Zimmermann <zimmermann at kde.org> has granted Zoltan Herczeg
<zherczeg at webkit.org>'s request for review:
Bug 42244: SVGFilterElement & SVGFE*Element don't support dynamic invalidation,
when attributes change
https://bugs.webkit.org/show_bug.cgi?id=42244

Attachment 63445: Patch for feSpotLight properties (v2)
https://bugs.webkit.org/attachment.cgi?id=63445&action=review

------- Additional Comments from Nikolas Zimmermann <zimmermann at kde.org>
r=me, with one comment:
WebCore/svg/SVGFilterElement.h:65
 +		if (parent->hasTagName(SVGNames::filterTag)) {

I'd prefer another way to write this function:

static void invalidateFilter(SVGElement* element)
{
    ASSERT(element);
    if (!element->inDocument())
	return;
    Node* parent = element->parentNode();
    while (parent && !parent->hasTagName(SVGNames::filterTag))
	parent = parent->parentNode();

    if (!parent)
	return;

    ASSERT(parent->hasTagName(SVGNames::filterTag));
    if (RenderObject* renderer = parent->renderer())
	renderer->setNeedsLayout(true);
}

Please modify to use more early returns before landing :-)


More information about the webkit-reviews mailing list