haikuwebkit/LayoutTests/fast/events/drag-select-when-zoomed-wit...

10 lines
523 B
Plaintext
Raw Permalink Normal View History

REGRESSION (r209299): Selection is broken when you zoom in webpage using trackpad https://bugs.webkit.org/show_bug.cgi?id=166472 rdar://problem/29675551 Reviewed by Tim Horton. Source/WebCore: r209299 broke autoscroll in zoomed pages because it changed RenderLayer::scrollRectToVisible() to shrink viewRect by page scale. This is incorrect for all callers of scrollRectToVisible, since the "absoluteRect" passed in is actually in zoomed document coordinates for all the callers I tested. This code is also fixed to account for headers and footers. getRectToExpose() takes rectangles in "scroll view contents" coordinates (i.e. including header, and zoomed document), so doesn't need the separate visibleRectRelativeToDocument parameter. Tests: fast/events/autoscroll-main-document.html fast/events/autoscroll-when-zoomed.html fast/events/drag-select-when-zoomed-with-header.html fast/events/drag-select-when-zoomed.html fast/scrolling/scroll-to-anchor-zoomed-header.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollRectToVisible): (WebCore::RenderLayer::getRectToExpose): * rendering/RenderLayer.h: Tools: These changes are necessary to allow the mouse to leave the WTR window while drag-scrolling, to test autoscroll. Previously, we were never calling -mouseDragged (which DRT does); we'd always go through mouseMoved, which hits an early return in WebViewImpl::mouseMoved() when the point is outside the view. * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::mouseMoveTo): LayoutTests: Add some test coverage for autoscroll of the main document. I could only get this working in WebKitTestRunner, not DumpRenderTree. * TestExpectations: * fast/events/autoscroll-main-document-expected.txt: Added. * fast/events/autoscroll-main-document.html: Added. * fast/events/autoscroll-when-zoomed-expected.txt: Added. * fast/events/autoscroll-when-zoomed.html: Added. * fast/events/drag-select-when-zoomed-expected.txt: Added. * fast/events/drag-select-when-zoomed-with-header-expected.txt: Added. * fast/events/drag-select-when-zoomed-with-header.html: Added. * fast/events/drag-select-when-zoomed.html: Added. * fast/scrolling/scroll-to-anchor-zoomed-header-expected.txt: Added. * fast/scrolling/scroll-to-anchor-zoomed-header.html: Added. * fast/transforms/selection-bounds-in-transformed-view.html: Revert the target scroll position to what it was before r209299, and improve the failure output. * platform/ios-simulator/TestExpectations: * platform/mac-wk2/TestExpectations: Canonical link: https://commits.webkit.org/183751@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-12-25 23:57:40 +00:00
This test ensures that drag-selecting works correctly in scaled pages.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
PASS firstRange.startOffset is 79
PASS firstRange.endOffset is 103
PASS successfullyParsed is true
TEST COMPLETE