Event target rects on the top level document shouldn't be clipped.
authorleviw@chromium.org <leviw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Jan 2013 00:31:57 +0000 (00:31 +0000)
committerleviw@chromium.org <leviw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Jan 2013 00:31:57 +0000 (00:31 +0000)
commite8e34169f7689851f23e90a01b2a34347f5eeb35
tree123ee1dceae0bed5bf1cf3cbe5c2fd1106027464
parent04fa0963ed74b21014613a9dc0cc27728b08f91a
Event target rects on the top level document shouldn't be clipped.
https://bugs.webkit.org/show_bug.cgi?id=107339

Reviewed by James Robinson.

Source/WebCore:

clippedOverflowRectForRepaint clips the top-level RenderView to the viewport, which
is wrong for generating event target rects, as the result will not extend to the bounds
of the document on pages that scroll. Changing the top-level view to use documentRect
instead.

Tests updated to cover bug: platform/chromium/fast/events/touch/touch-hit-rects-in-iframe.html
                            platform/chromium/fast/events/touch/compositor-touch-hit-rects.html

* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::accumulateRendererTouchEventTargetRects): Use converToRootView instead of
a loop around convertToContaining view. This is not a change in behavior.
(WebCore::accumulateDocumentEventTargetRects): Switch to use documentRect instead of
clippedOverflowRectForRepaint for the top-level Document, and use converToRootView
to put rects in the coordinates of the top-level document.

LayoutTests:

Updating existing tests to cover this issue.

* platform/chromium-linux/platform/chromium/fast/events/touch/compositor-touch-hit-rects-expected.txt:
* platform/chromium/fast/events/touch/compositor-touch-hit-rects.html:
* platform/chromium/fast/events/touch/touch-hit-rects-in-iframe-expected.txt:
* platform/chromium/fast/events/touch/touch-hit-rects-in-iframe.html:
* platform/chromium/fast/events/touch/resources/frame-with-document-touch-handler.html: Added.
* platform/chromium/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@140370 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/chromium-linux/platform/chromium/fast/events/touch/compositor-touch-hit-rects-expected.txt
LayoutTests/platform/chromium/TestExpectations
LayoutTests/platform/chromium/fast/events/touch/compositor-touch-hit-rects.html
LayoutTests/platform/chromium/fast/events/touch/resources/frame-with-document-touch-handler.html [new file with mode: 0644]
LayoutTests/platform/chromium/fast/events/touch/touch-hit-rects-in-iframe-expected.txt
LayoutTests/platform/chromium/fast/events/touch/touch-hit-rects-in-iframe.html
Source/WebCore/ChangeLog
Source/WebCore/page/scrolling/ScrollingCoordinator.cpp