[webkit-reviews] review granted: [Bug 87573] Avoid updateFromElement() usage in SVG : [Attachment 144197] Patch v2

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat May 26 02:07:35 PDT 2012


Ryosuke Niwa <rniwa at webkit.org> has granted Nikolas Zimmermann
<zimmermann at kde.org>'s request for review:
Bug 87573: Avoid updateFromElement() usage in SVG
https://bugs.webkit.org/show_bug.cgi?id=87573

Attachment 144197: Patch v2
https://bugs.webkit.org/attachment.cgi?id=144197&action=review

------- Additional Comments from Ryosuke Niwa <rniwa at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=144197&action=review


> Source/WebCore/rendering/svg/SVGResourcesCache.cpp:140
> -    if (diff == StyleDifferenceEqual)
> +    if (diff == StyleDifferenceEqual || !renderer->parent())
>	   return;
>  
>      // In this case the proper SVGFE*Element will decide whether the
modified CSS properties require a relayout or repaint.
>      if (renderer->isSVGResourceFilterPrimitive() && diff ==
StyleDifferenceRepaint)
>	   return;
>  
> -    clientUpdatedFromElement(renderer, newStyle);
> +    SVGResourcesCache* cache = resourcesCacheFromRenderObject(renderer);
> +    cache->removeResourcesFromRenderObject(renderer);
> +    cache->addResourcesFromRenderObject(renderer, newStyle);

I think this function deserves a little clarifying why we would want to
remove/add the resource here.


More information about the webkit-reviews mailing list