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

Unified Diff: third_party/WebKit/Source/core/input/EventHandler.cpp

Issue 2540573002: Don't enter gesture event handling when a frame is detached. (Closed)
Patch Set: Fix Created 4 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/input/EventHandler.cpp
diff --git a/third_party/WebKit/Source/core/input/EventHandler.cpp b/third_party/WebKit/Source/core/input/EventHandler.cpp
index 9650421690c6b997d82c351d627217e073780bd6..bb4e6b8bc2434d80589a0622c233c6a5ee0339bf 100644
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
@@ -1339,6 +1339,8 @@ WebInputEventResult EventHandler::handleGestureEvent(
WebInputEventResult EventHandler::handleGestureEvent(
const GestureEventWithHitTestResults& targetedEvent) {
TRACE_EVENT0("input", "EventHandler::handleGestureEvent");
+ if (!m_frame->host())
+ return WebInputEventResult::NotHandled;
// Propagation to inner frames is handled below this function.
ASSERT(m_frame == m_frame->localFrameRoot());
@@ -1370,12 +1372,17 @@ WebInputEventResult EventHandler::handleGestureEventInFrame(
WebInputEventResult EventHandler::handleGestureScrollEvent(
const PlatformGestureEvent& gestureEvent) {
TRACE_EVENT0("input", "EventHandler::handleGestureScrollEvent");
+ if (!m_frame->host())
+ return WebInputEventResult::NotHandled;
return m_scrollManager->handleGestureScrollEvent(gestureEvent);
}
WebInputEventResult EventHandler::handleGestureScrollEnd(
const PlatformGestureEvent& gestureEvent) {
+ if (!m_frame->host())
+ return WebInputEventResult::NotHandled;
+
return m_scrollManager->handleGestureScrollEnd(gestureEvent);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698