<rdar://problem/9095366> With a non-1 page scale, scrolling to reveal selection fails
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Apr 2011 02:13:10 +0000 (02:13 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Apr 2011 02:13:10 +0000 (02:13 +0000)
commit1d49dc0648927f61bc88a9343a138afafacf7a6b
treeab0cd371d4d77a53ed1be4b8c6cd426d9757bc27
parenta9185c96f02190bdc591927aebaaa27f2f488671
<rdar://problem/9095366> With a non-1 page scale, scrolling to reveal selection fails
https://bugs.webkit.org/show_bug.cgi?id=59046

Reviewed by Maciej Stachowiak.

Source/WebCore:

Test: fast/transforms/selection-bounds-in-transformed-view.html

* rendering/RenderObject.cpp:
(WebCore::RenderObject::repaintUsingContainer): If the repaint container is the RenderView, and
it has a composited layer that paints straight to the window, then translate from view coordinates
to window coordinates here.
* rendering/RenderView.cpp:
(WebCore::RenderView::mapLocalToContainer): Do not apply our transform if we are the painting root.
(WebCore::RenderView::computeRectForRepaint): Ditto. Applying the transform here was compensating
for not applying it in RenderObject::repaintUsingContainer(), but for purposes other than repainting,
such as computing selection bounds, this function was returning the wrong results.

LayoutTests:

* fast/transforms/selection-bounds-in-transformed-view-expected.txt: Added.
* fast/transforms/selection-bounds-in-transformed-view.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@84454 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/transforms/selection-bounds-in-transformed-view-expected.txt [new file with mode: 0644]
LayoutTests/fast/transforms/selection-bounds-in-transformed-view.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderView.cpp