Change "client" coordinates back to match scrolling coordinates
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Jul 2017 18:07:31 +0000 (18:07 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Jul 2017 18:07:31 +0000 (18:07 +0000)
commit57c4ab790bc3305db3f4e94d43371bc2b8e956fc
tree6904737931c85fddf7b2a658c8cd7f4ff8d6624e
parent3230f2a995d8cd8aa7c12ef30431166c3966048e
Change "client" coordinates back to match scrolling coordinates
https://bugs.webkit.org/show_bug.cgi?id=174734
rdar://problem/33336930

Reviewed by Tim Horton.

Baidu.com (which uses jQuery), and various iOS apps make the assumption that getBoundingClientRect() returns a rectangle
that can be used to set or compare with the scroll position. With visual viewports, that assumption is no longer valid
when the page is zoomed, or when the keyboard has caused the visual viewport to detach from the layout viewport.

At this point the compatibility cost of shipping layout viewport-based client rects seems higher than the gain, so revert
to the shipping behavior. This reverts r216803, and will re-introduce bugs that occurred on zoomed pages on macOS,
many of which are noted in webkit.org/b/170981.

* page/FrameView.cpp:
(WebCore::FrameView::documentToClientOffset):

LayoutTests:
Revert "client" coordinates to be in scrolling coordinates
https://bugs.webkit.org/show_bug.cgi?id=174734
rdar://problem/33336930

Reviewed by Tim Horton.

Rebaseline.

* fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-mainframe-expected.txt:
* fast/visual-viewport/client-coordinates-relative-to-layout-viewport-expected.txt:
* fast/visual-viewport/client-rects-relative-to-layout-viewport-expected.txt:
* fast/visual-viewport/zoomed-fixed-expected.txt:
* fast/visual-viewport/zoomed-fixed-header-and-footer-expected.txt:
* fast/zooming/client-rect-in-fixed-zoomed-expected.txt:
* platform/ios-wk2/fast/visual-viewport/client-rects-relative-to-layout-viewport-expected.txt:
* platform/ios-wk2/imported/w3c/web-platform-tests/cssom-view/elementFromPoint-expected.txt: Added.
* platform/ios/fast/visual-viewport/zoomed-fixed-expected.txt:
* platform/ios/fast/visual-viewport/zoomed-fixed-header-and-footer-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219829 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-mainframe-expected.txt
LayoutTests/fast/visual-viewport/client-coordinates-relative-to-layout-viewport-expected.txt
LayoutTests/fast/visual-viewport/client-rects-relative-to-layout-viewport-expected.txt
LayoutTests/fast/visual-viewport/zoomed-fixed-expected.txt
LayoutTests/fast/visual-viewport/zoomed-fixed-header-and-footer-expected.txt
LayoutTests/fast/zooming/client-rect-in-fixed-zoomed-expected.txt
LayoutTests/platform/ios-wk2/fast/visual-viewport/client-rects-relative-to-layout-viewport-expected.txt
LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/cssom-view/elementFromPoint-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios/fast/visual-viewport/zoomed-fixed-expected.txt
LayoutTests/platform/ios/fast/visual-viewport/zoomed-fixed-header-and-footer-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/page/FrameView.cpp