[SVG] Cached filter results are not invalidated on repaint rect change
authorfmalita@chromium.org <fmalita@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Feb 2013 03:58:18 +0000 (03:58 +0000)
committerfmalita@chromium.org <fmalita@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Feb 2013 03:58:18 +0000 (03:58 +0000)
commit58a79e543781c8a6d78d859327c7a22d9747252d
treea66f5bd54f0148382496e6852bd395204b12e9be
parentdfd6e67c09b1acee6ceeed40601b7e8580a54a6d
[SVG] Cached filter results are not invalidated on repaint rect change
https://bugs.webkit.org/show_bug.cgi?id=106221

Reviewed by Dean Jackson.

Source/WebCore:

Since the cached filter results are not invalidated for different repaint rects, we need
to render the content of the whole filter region upfront (otherwise elements not visible
during the initial paint due to scrolling/window size/etc. are never redrawn).

Tests: svg/filters/filter-hidden-content-expected.svg
       svg/filters/filter-hidden-content.svg

* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::applyResource):
(WebCore::RenderSVGResourceFilter::drawingRegion):
(WebCore):
* rendering/svg/RenderSVGResourceFilter.h:
(FilterData):
(RenderSVGResourceFilter):
Track the filter drawing region in FilterData.

* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::~SVGRenderingContext):
(WebCore::SVGRenderingContext::prepareToRenderSVGContent):
* rendering/svg/SVGRenderingContext.h:
Update paintInfo.rect to cover the whole drawing region while rendering filter content, and
restore it when done.

LayoutTests:

* svg/filters/filter-hidden-content-expected.svg: Added.
* svg/filters/filter-hidden-content.svg: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142955 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/chromium-linux/svg/filters/filter-hidden-content-expected.png [new file with mode: 0644]
LayoutTests/platform/chromium-linux/svg/filters/filter-hidden-content-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/TestExpectations
LayoutTests/platform/efl/TestExpectations
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/mac/TestExpectations
LayoutTests/platform/qt/TestExpectations
LayoutTests/svg/filters/filter-hidden-content.svg [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp
Source/WebCore/rendering/svg/RenderSVGResourceFilter.h
Source/WebCore/rendering/svg/SVGRenderingContext.cpp
Source/WebCore/rendering/svg/SVGRenderingContext.h