WebCore: https://bugs.webkit.org/show_bug.cgi?id=48545, Home/End, PageUp/PageDwn...
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Dec 2010 20:14:28 +0000 (20:14 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Dec 2010 20:14:28 +0000 (20:14 +0000)
commit01c22e96d29b3eeb1faa9cbb011ac6c2b080e0c8
tree346cb5aadbffc5c39e286dcf50e7f8afa60735a8
parentd457a0458f0a09f9d4addcc0d84e51cfec0965e5
WebCore: https://bugs.webkit.org/show_bug.cgi?id=48545, Home/End, PageUp/PageDwn should respect writing-mode.

Reviewed by Sam Weinig.

Add logical scrolling to WebCore.  It basically mirrors physical scrolling but works in abstract logical
directions and only converts to physical when it's time to attempt the scroll.

Also fixed bugs in scrollRecursively and logicalScrollRecursively where overflow sections in containing
frames got skipped over.

Made the resetting of the inline axis scroll position on Home/End Mac-specific for overflow sections.

* WebCore.exp.in:
* page/EventHandler.cpp:
(WebCore::EventHandler::logicalScrollOverflow):
(WebCore::EventHandler::scrollRecursively):
(WebCore::EventHandler::logicalScrollRecursively):
* page/EventHandler.h:
* page/FrameView.cpp:
(WebCore::FrameView::isVerticalDocument):
(WebCore::FrameView::isFlippedDocument):
* page/FrameView.h:
* platform/ScrollTypes.h:
(WebCore::logicalToPhysical):
* platform/ScrollView.cpp:
(WebCore::ScrollView::scroll):
(WebCore::ScrollView::logicalScroll):
* platform/ScrollView.h:
(WebCore::ScrollView::isVerticalDocument):
(WebCore::ScrollView::isFlippedDocument):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::logicalScroll):
* rendering/RenderBox.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scroll):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::logicalScroll):
* rendering/RenderListBox.h:
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::logicalScroll):
* rendering/RenderTextControlSingleLine.h:

WebKit2: https://bugs.webkit.org/show_bug.cgi?id=48545, Home/End, PageUp/PageDwn should respect writing-mode.  Use
logical scrolling instead of physical scrolling for those keys in WebKit2.

Reviewed by Sam Weinig.

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::logicalScroll):
(WebKit::WebPage::performDefaultBehaviorForKeyEvent):
* WebProcess/WebPage/qt/WebPageQt.cpp:
(WebKit::logicalScroll):
(WebKit::WebPage::performDefaultBehaviorForKeyEvent):
* WebProcess/WebPage/win/WebPageWin.cpp:
(WebKit::logicalScroll):
(WebKit::WebPage::performDefaultBehaviorForKeyEvent):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@73941 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
WebCore/ChangeLog
WebCore/WebCore.exp.in
WebCore/page/EventHandler.cpp
WebCore/page/EventHandler.h
WebCore/page/FrameView.cpp
WebCore/page/FrameView.h
WebCore/platform/ScrollTypes.h
WebCore/platform/ScrollView.cpp
WebCore/platform/ScrollView.h
WebCore/rendering/RenderBox.cpp
WebCore/rendering/RenderBox.h
WebCore/rendering/RenderLayer.cpp
WebCore/rendering/RenderListBox.cpp
WebCore/rendering/RenderListBox.h
WebCore/rendering/RenderTextControlSingleLine.cpp
WebCore/rendering/RenderTextControlSingleLine.h
WebKit2/ChangeLog
WebKit2/WebProcess/WebPage/mac/WebPageMac.mm
WebKit2/WebProcess/WebPage/qt/WebPageQt.cpp
WebKit2/WebProcess/WebPage/win/WebPageWin.cpp