SVG: "filter" race condition may prevent SVG elements from being re-drawn
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Dec 2011 14:45:03 +0000 (14:45 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Dec 2011 14:45:03 +0000 (14:45 +0000)
commit572b5e0ddd9d1f1e17bf4cf6cc3d95bc07dd9e7a
treef6a9a3f4e0cc93e77db349a1f60dd5789cfea0eb
parent22d39d34583da927096eb16e1ea66053ee8288e4
SVG: "filter" race condition may prevent SVG elements from being re-drawn
https://bugs.webkit.org/show_bug.cgi?id=53088

Patch by Branimir Lambov <blambov@google.com> on 2011-12-22
Reviewed by Nikolas Zimmermann.

Source/WebCore:

Added code to explicitly invalidate data cached by filters applied to
an invalidated object or one of its parents.

Test: svg/filters/filter-refresh.svg

* rendering/svg/RenderSVGResource.cpp:
(WebCore::RenderSVGResource::removeFromFilterCache):
(WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation):
Added code to invalidate any filters applied to any of the parents.
* rendering/svg/RenderSVGResource.h:
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):
Replaced a duplicate of RenderSVGResource::
markForLayoutAndParentResourceInvalidation with a call to the method.
* rendering/svg/SVGResourcesCache.cpp:
(WebCore::SVGResourcesCache::clientLayoutChanged):
Removed filter invalidation code as this function would not be called if
the filter isn't already invalidated.
(WebCore::SVGResourcesCache::clientStyleChanged):
(WebCore::SVGResourcesCache::clientUpdatedFromElement):
Replaced filter invalidation with a markForLayoutAndParentResourceInvalidation
call as all filters in the ancestor chain need to be invalidated.

LayoutTests:

Added code to explicitly invalidate data cached by filters applied to
an invalidated object or one of its parents.

* platform/mac/svg/filters/filter-refresh-expected.png: Added.
* platform/mac/svg/filters/filter-refresh-expected.txt: Added.
* svg/filters/filter-refresh.svg: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@103539 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac/svg/filters/filter-refresh-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/filters/filter-refresh-expected.txt [new file with mode: 0644]
LayoutTests/svg/filters/filter-refresh.svg [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/svg/RenderSVGResource.cpp
Source/WebCore/rendering/svg/RenderSVGResource.h
Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp
Source/WebCore/rendering/svg/SVGResourcesCache.cpp