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

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2762553002: Add canUpdateLayout & canHandleGestureEvent to WebViewClient. (Closed)
Patch Set: Fix merge issues. Created 3 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: third_party/WebKit/Source/web/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index cd796ba53c2654ab0fea667de05b153925d3df33..d4dc19b1f7a23d1eb207cf395e559b7c9db4050a 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -695,8 +695,9 @@ bool WebViewImpl::scrollBy(const WebFloatSize& delta,
WebInputEventResult WebViewImpl::handleGestureEvent(
const WebGestureEvent& event) {
- if (!m_client)
+ if (!m_client || !m_client->canHandleGestureEvent()) {
return WebInputEventResult::NotHandled;
+ }
WebInputEventResult eventResult = WebInputEventResult::NotHandled;
bool eventCancelled = false; // for disambiguation
@@ -3647,7 +3648,7 @@ void WebViewImpl::postLayoutResize(WebLocalFrameImpl* webframe) {
void WebViewImpl::layoutUpdated(WebLocalFrameImpl* webframe) {
LocalFrame* frame = webframe->frame();
- if (!m_client || !frame->isMainFrame())
+ if (!m_client || !m_client->canUpdateLayout() || !frame->isMainFrame())
return;
if (m_shouldAutoResize) {
« no previous file with comments | « content/shell/test_runner/web_view_test_client.cc ('k') | third_party/WebKit/Source/web/tests/FrameTestHelpers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698