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

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

Issue 2537243002: Adding |Node::layoutObject()| null check to |setCaretAtHitTestResult()| (Closed)
Patch Set: pulling hitTest sanity check out of selection controller Created 4 years 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 | « third_party/WebKit/Source/core/editing/SelectionController.cpp ('k') | 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/GestureManager.cpp
diff --git a/third_party/WebKit/Source/core/input/GestureManager.cpp b/third_party/WebKit/Source/core/input/GestureManager.cpp
index 530aa2361e6114eccbf1c958911a20146224372f..66d5cf873c64101bb723488bd79f0c74cc54bfe1 100644
--- a/third_party/WebKit/Source/core/input/GestureManager.cpp
+++ b/third_party/WebKit/Source/core/input/GestureManager.cpp
@@ -318,7 +318,9 @@ WebInputEventResult GestureManager::handleGestureLongPress(
return WebInputEventResult::HandledSystem;
}
- if (m_selectionController->handleGestureLongPress(gestureEvent,
+ Node* innerNode = hitTestResult.innerNode();
+ if (innerNode && innerNode->layoutObject() &&
+ m_selectionController->handleGestureLongPress(gestureEvent,
hitTestResult)) {
m_mouseEventManager->focusDocumentView();
return WebInputEventResult::HandledSystem;
@@ -332,7 +334,9 @@ WebInputEventResult GestureManager::handleGestureLongTap(
#if !OS(ANDROID)
if (m_longTapShouldInvokeContextMenu) {
m_longTapShouldInvokeContextMenu = false;
- m_selectionController->handleGestureLongTap(targetedEvent);
+ Node* innerNode = targetedEvent.hitTestResult().innerNode();
+ if (innerNode && innerNode->layoutObject())
+ m_selectionController->handleGestureLongTap(targetedEvent);
return sendContextMenuEventForGesture(targetedEvent);
}
#endif
@@ -341,7 +345,9 @@ WebInputEventResult GestureManager::handleGestureLongTap(
WebInputEventResult GestureManager::handleGestureTwoFingerTap(
const GestureEventWithHitTestResults& targetedEvent) {
- m_selectionController->handleGestureTwoFingerTap(targetedEvent);
+ Node* innerNode = targetedEvent.hitTestResult().innerNode();
+ if (innerNode && innerNode->layoutObject())
+ m_selectionController->handleGestureTwoFingerTap(targetedEvent);
return sendContextMenuEventForGesture(targetedEvent);
}
« no previous file with comments | « third_party/WebKit/Source/core/editing/SelectionController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698