https://bugs.webkit.org/show_bug.cgi?id=68457
<rdar://problem/
10154777>
Reviewed by Darin Adler.
Invalidate the filter's cache when style changes take place so that style changes are respected.
Test: svg/filters/animate-fill.svg
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96052
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-09-26 Tim Horton <timothy_horton@apple.com>
+
+ <animateColor> applied to filtered ellipse does not update
+ https://bugs.webkit.org/show_bug.cgi?id=68457
+ <rdar://problem/10154777>
+
+ Reviewed by Darin Adler.
+
+ Test that changing the fill on a filtered shape properly invalidates the filtered result.
+
+ * svg/filters/animate-fill-expected.png: Added.
+ * svg/filters/animate-fill-expected.txt: Added.
+ * svg/filters/animate-fill.svg: Added.
+
2011-09-26 Mihai Parparita <mihaip@chromium.org>
Remove failing expectations for some ruby tests, since they were
--- /dev/null
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 111x111
+ RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+ RenderSVGResourceFilter {filter} [id="filt"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+ [feOffset dx="0.00" dy="0.00"]
+ [SourceGraphic]
+ RenderSVGPath {rect} at (0,0) size 111x111 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
+ [filter="filt"] RenderSVGResourceFilter {filter} at (-10,-10) size 120x120
--- /dev/null
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <title>The rectangle should rapidly animate to green.</title>
+<defs>
+ <filter id="filt">
+ <feOffset />
+ </filter>
+</defs>
+<rect id="rect" width="100px" height="100px" x="0" y="0" fill="red" filter="url(#filt)" />
+<script>
+ function finish()
+ {
+ document.getElementById('rect').setAttribute('fill', 'green');
+
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+ }
+
+ if (window.layoutTestController) {
+ layoutTestController.waitUntilDone();
+ layoutTestController.display();
+ }
+
+ setTimeout(finish, 0);
+</script>
+</svg>
+2011-09-26 Tim Horton <timothy_horton@apple.com>
+
+ <animateColor> applied to filtered ellipse does not update
+ https://bugs.webkit.org/show_bug.cgi?id=68457
+ <rdar://problem/10154777>
+
+ Reviewed by Darin Adler.
+
+ Invalidate the filter's cache when style changes take place so that style changes are respected.
+
+ Test: svg/filters/animate-fill.svg
+
+ * rendering/svg/SVGResourcesCache.cpp:
+ (WebCore::SVGResourcesCache::clientStyleChanged):
+ (WebCore::SVGResourcesCache::clientUpdatedFromElement):
+
2011-09-26 Max Perepelitsyn <pph34r@gmail.com>
Set but unused variables cleanup in v8 bindings (gcc 4.6)
if (diff == StyleDifferenceEqual)
return;
- // In this case the proper SVGFE*Element will imply whether the modifided CSS properties implies a relayout or repaint.
+ // 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;
SVGResourcesCache* cache = resourcesCacheFromRenderObject(renderer);
cache->removeResourcesFromRenderObject(renderer);
cache->addResourcesFromRenderObject(renderer, newStyle);
+
+ SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(renderer);
+ if (!resources)
+ return;
+
+ resources->removeClientFromCache(renderer);
}
void SVGResourcesCache::clientDestroyed(RenderObject* renderer)