haikuwebkit/LayoutTests/scrollbars/scrolling-by-page-accountin...

11 lines
415 B
Plaintext
Raw Permalink Normal View History

Scrolling with spacebar on a page with fixed header breaks reading flow https://bugs.webkit.org/show_bug.cgi?id=135506 Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-08-28 Reviewed by Simon Fraser. Source/WebCore: When scrolling by page, find the height of any bar that is obscuring the top or bottom of the page, and substract that height from the step to scroll. Tests: scrollbars/scrolling-backward-by-page-accounting-bottom-fixed-elements-on-keyboard-spacebar.html scrollbars/scrolling-backward-by-page-on-keyboard-spacebar.html scrollbars/scrolling-by-page-accounting-oversized-fixed-elements-on-keyboard-spacebar.html scrollbars/scrolling-by-page-accounting-top-fixed-elements-on-keyboard-spacebar.html scrollbars/scrolling-by-page-accounting-top-fixed-elements-with-negative-top-on-keyboard-spacebar.html scrollbars/scrolling-by-page-ignoring-hidden-fixed-elements-on-keyboard-spacebar.html scrollbars/scrolling-by-page-ignoring-transparent-fixed-elements-on-keyboard-spacebar.html scrollbars/scrolling-by-page-on-keyboard-spacebar.html * WebCore.exp.in: * page/FrameView.cpp: (WebCore::FrameView::adjustScrollStepForFixedContent): * page/FrameView.h: * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::adjustScrollStepForFixedContent): (WebCore::ScrollableArea::scroll): * platform/ScrollableArea.h: LayoutTests: There was pretty much no test coverage for scrolling by page, add some tests. * fast/events/scrollbar-double-click-expected.txt: * platform/mac-wk1/TestExpectations: * scrollbars/scrolling-backward-by-page-accounting-bottom-fixed-elements-on-keyboard-spacebar-expected.txt: Added. * scrollbars/scrolling-backward-by-page-accounting-bottom-fixed-elements-on-keyboard-spacebar.html: Added. * scrollbars/scrolling-backward-by-page-on-keyboard-spacebar-expected.txt: Added. * scrollbars/scrolling-backward-by-page-on-keyboard-spacebar.html: Added. * scrollbars/scrolling-by-page-accounting-oversized-fixed-elements-on-keyboard-spacebar-expected.txt: Added. * scrollbars/scrolling-by-page-accounting-oversized-fixed-elements-on-keyboard-spacebar.html: Added. * scrollbars/scrolling-by-page-accounting-top-fixed-elements-on-keyboard-spacebar-expected.txt: Added. * scrollbars/scrolling-by-page-accounting-top-fixed-elements-on-keyboard-spacebar.html: Added. * scrollbars/scrolling-by-page-accounting-top-fixed-elements-with-negative-top-on-keyboard-spacebar-expected.txt: Added. * scrollbars/scrolling-by-page-accounting-top-fixed-elements-with-negative-top-on-keyboard-spacebar.html: Added. * scrollbars/scrolling-by-page-ignoring-hidden-fixed-elements-on-keyboard-spacebar-expected.txt: Added. * scrollbars/scrolling-by-page-ignoring-hidden-fixed-elements-on-keyboard-spacebar.html: Added. * scrollbars/scrolling-by-page-ignoring-transparent-fixed-elements-on-keyboard-spacebar-expected.txt: Added. * scrollbars/scrolling-by-page-ignoring-transparent-fixed-elements-on-keyboard-spacebar.html: Added. * scrollbars/scrolling-by-page-on-keyboard-spacebar-expected.txt: Added. * scrollbars/scrolling-by-page-on-keyboard-spacebar.html: Added. Canonical link: https://commits.webkit.org/154176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173074 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-08-28 20:01:18 +00:00
Test scrolling with page granularity by using the space bar excludes the height of fixed element covering the full page width. In this case, the cumulative size of both bars is larger than the threshold, and only 120px are removed from the 240px fixed height.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS Scrolled to 480
PASS successfullyParsed is true
TEST COMPLETE