Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Unified Diff: Source/web/WebViewImpl.cpp

Issue 197213011: Selectively disable rubber banding on mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index 8836341267581ea88fede135a0af516a7b3bfb95..e40b087dc3e4b28bfdad49e634bfc7544925bd63 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -547,10 +547,10 @@ void WebViewImpl::handleMouseUp(LocalFrame& mainFrame, const WebMouseEvent& even
#endif
}
-bool WebViewImpl::handleMouseWheel(LocalFrame& mainFrame, const WebMouseWheelEvent& event)
+bool WebViewImpl::handleMouseWheel(LocalFrame& mainFrame, const WebMouseWheelEvent& event, bool canRubberbandLeft, bool canRubberbandRight)
{
hidePopups();
- return PageWidgetEventHandler::handleMouseWheel(mainFrame, event);
+ return PageWidgetEventHandler::handleMouseWheel(mainFrame, event, canRubberbandLeft, canRubberbandRight);
}
void WebViewImpl::scrollBy(const WebFloatSize& delta)
@@ -571,7 +571,7 @@ void WebViewImpl::scrollBy(const WebFloatSize& delta)
syntheticWheel.modifiers = m_flingModifier;
if (m_page && m_page->mainFrame() && m_page->mainFrame()->view())
- handleMouseWheel(*m_page->mainFrame(), syntheticWheel);
+ handleMouseWheel(*m_page->mainFrame(), syntheticWheel, false, false);
} else {
WebGestureEvent syntheticGestureEvent;
@@ -1752,6 +1752,10 @@ const WebInputEvent* WebViewImpl::m_currentInputEvent = 0;
bool WebViewImpl::handleInputEvent(const WebInputEvent& inputEvent)
{
+ return handleInputEvent(inputEvent, true, true);
+}
+bool WebViewImpl::handleInputEvent(const WebInputEvent& inputEvent, bool canRubberbandLeft, bool canRubberbandRight)
+{
TRACE_EVENT0("input", "WebViewImpl::handleInputEvent");
// If we've started a drag and drop operation, ignore input events until
// we're done.
@@ -1805,7 +1809,7 @@ bool WebViewImpl::handleInputEvent(const WebInputEvent& inputEvent)
return true;
}
- return PageWidgetDelegate::handleInputEvent(m_page.get(), *this, inputEvent);
+ return PageWidgetDelegate::handleInputEvent(m_page.get(), *this, inputEvent, canRubberbandLeft, canRubberbandRight);
}
void WebViewImpl::setCursorVisibilityState(bool isVisible)

Powered by Google App Engine
This is Rietveld 408576698