[chromium] updateRect is incorrect when contentBounds != bounds
authorshawnsingh@chromium.org <shawnsingh@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jan 2012 02:45:03 +0000 (02:45 +0000)
committershawnsingh@chromium.org <shawnsingh@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jan 2012 02:45:03 +0000 (02:45 +0000)
commit87799bbb16a1eee0525df43d598eff0d8dd42276
treea381843ce8ad714bf23e78a6e637561fe7a3b8ba
parent6a231ac5c2f5615a4657d1686f95d1182b86d715
[chromium] updateRect is incorrect when contentBounds != bounds
https://bugs.webkit.org/show_bug.cgi?id=72919

Reviewed by James Robinson.

Source/WebCore:

Unit test added to TiledLayerChromiumTest.cpp

The m_updateRect member in LayerChromium types is used to track
what was painted for that layer. For tiled layers (especially
image layers), the updateRect was being given with respect to the
size of the content, rather than the size of the layer. This patch
adds a conversion so that updateRect is always with respect to the
layer size, so that damage tracking will work correctly in those
cases.

* platform/graphics/chromium/LayerChromium.h:
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::updateCompositorResources):

Source/WebKit/chromium:

* tests/TiledLayerChromiumTest.cpp:
(WTF::FakeTiledLayerWithScaledBounds::FakeTiledLayerWithScaledBounds):
(WTF::FakeTiledLayerWithScaledBounds::setContentBounds):
(WTF::FakeTiledLayerWithScaledBounds::contentBounds):
(WTF::FakeTiledLayerWithScaledBounds::updateRect):
(WTF::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@105680 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/LayerChromium.h
Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp