Chromium Code Reviews| Index: Source/web/WebPluginScrollbarImpl.cpp |
| diff --git a/Source/web/WebPluginScrollbarImpl.cpp b/Source/web/WebPluginScrollbarImpl.cpp |
| index 3b136b784d54369e314910ae5496743a526ddeb7..dd35e273116ac8186008f58910352b14a3781212 100644 |
| --- a/Source/web/WebPluginScrollbarImpl.cpp |
| +++ b/Source/web/WebPluginScrollbarImpl.cpp |
| @@ -217,12 +217,12 @@ void WebPluginScrollbarImpl::setDocumentSize(int size) |
| void WebPluginScrollbarImpl::scroll(ScrollDirection direction, ScrollGranularity granularity, float multiplier) |
| { |
| - blink::ScrollDirection dir; |
| + blink::ScrollDirectionPhysical dir; |
| bool horizontal = m_scrollbar->orientation() == HorizontalScrollbar; |
| if (direction == ScrollForward) |
| - dir = horizontal ? ScrollRight : ScrollDown; |
| + dir = horizontal ? ScrollPhysicalRight : ScrollPhysicalDown; |
| else |
| - dir = horizontal ? ScrollLeft : ScrollUp; |
| + dir = horizontal ? ScrollPhysicalLeft : ScrollPhysicalUp; |
| m_group->scroll(dir, static_cast<blink::ScrollGranularity>(granularity), multiplier); |
| } |
| @@ -358,7 +358,7 @@ bool WebPluginScrollbarImpl::onKeyDown(const WebInputEvent& event) |
| blink::ScrollGranularity scrollGranularity; |
| if (WebViewImpl::mapKeyCodeForScroll(keyCode, &scrollDirection, &scrollGranularity)) { |
| // Will return false if scroll direction wasn't compatible with this scrollbar. |
| - return m_group->scroll(scrollDirection, scrollGranularity); |
| + return m_group->scroll(toPhysicalDirection(scrollDirection, true, true), scrollGranularity); |
|
bokan
2015/05/21 18:54:43
I'd rather make WebViewImpl::mapKeyCodeForScroll u
|
| } |
| return false; |
| } |