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

Unified Diff: third_party/WebKit/Source/core/editing/SelectionController.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 | « no previous file | third_party/WebKit/Source/core/input/GestureManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/SelectionController.cpp
diff --git a/third_party/WebKit/Source/core/editing/SelectionController.cpp b/third_party/WebKit/Source/core/editing/SelectionController.cpp
index a38381e9c24ff9ec7cdfc6856a1c536d1eb71c1c..566b973ec53c575209479bc98b3f355d8554d464 100644
--- a/third_party/WebKit/Source/core/editing/SelectionController.cpp
+++ b/third_party/WebKit/Source/core/editing/SelectionController.cpp
@@ -652,9 +652,6 @@ void SelectionController::setNonDirectionalSelectionIfNeeded(
void SelectionController::setCaretAtHitTestResult(
const HitTestResult& hitTestResult) {
Node* innerNode = hitTestResult.innerNode();
- if (!innerNode)
- return;
-
const VisiblePositionInFlatTree& visibleHitPos =
visiblePositionOfHitTestResult(hitTestResult);
const VisiblePositionInFlatTree& visiblePos =
@@ -892,8 +889,6 @@ bool SelectionController::handleGestureLongPress(
return false;
Node* innerNode = hitTestResult.innerNode();
- if (!innerNode)
- return false;
innerNode->document().updateStyleAndLayoutTree();
bool innerNodeIsSelectable = hasEditableStyle(*innerNode) ||
innerNode->isTextNode() ||
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/input/GestureManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698