Fix repainting of slow repaint objects in WK1 when page scale is applied
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 23 Oct 2016 02:43:42 +0000 (02:43 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 23 Oct 2016 02:43:42 +0000 (02:43 +0000)
commitf8f95542837ed818dec4390a4e6200d5f641ca62
treeeef55b8cb4e7f0bd313e69b5f010c547c4bcbd23
parentb64cc337c967fe1da1bfca429d4aedb6553bf3ea
Fix repainting of slow repaint objects in WK1 when page scale is applied
https://bugs.webkit.org/show_bug.cgi?id=163854

Reviewed by Zalan Bujtas.

Source/WebCore:

RenderObject::repaintSlowRepaintObject() always set the repaint container to the RenderView
if it was null. This is before the call to clippedOverflowRectForRepaint(). If that function
is called with a null repaintContainer, it maps the rect up through the RenderView's transform
(which represents page scale), which is what we want here. Passing the RenderView itself
stops the transform from being applied, which led to the bug.

WebKit2 doesn't suffer from this bug because containerForRepaint() always returns the
composited RenderView.

Test: fast/repaint/zoomed-fixed-background.html

* rendering/RenderObject.cpp:
(WebCore::RenderObject::repaintSlowRepaintObject):

LayoutTests:

Test that logs the repaint rect after scrolling a page with an element
with a fixed background. The WebKit1 result is the interesting one.

* fast/repaint/zoomed-fixed-background-expected.txt: Added.
* fast/repaint/zoomed-fixed-background.html: Added.
* platform/mac-wk1/fast/repaint/zoomed-fixed-background-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207721 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/repaint/zoomed-fixed-background-expected.txt [new file with mode: 0644]
LayoutTests/fast/repaint/zoomed-fixed-background.html [new file with mode: 0644]
LayoutTests/platform/mac-wk1/fast/repaint/zoomed-fixed-background-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderObject.cpp