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

Unified Diff: third_party/WebKit/Source/core/editing/SelectionController.cpp

Issue 2537243002: Adding |Node::layoutObject()| null check to |setCaretAtHitTestResult()| (Closed)
Patch Set: 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/editing/SelectionController.cpp
diff --git a/third_party/WebKit/Source/core/editing/SelectionController.cpp b/third_party/WebKit/Source/core/editing/SelectionController.cpp
index ef28dcf60498451a8d8fe22ea842de0e731d32df..f0efc8647377abcc6146ddeec405df94300d33db 100644
--- a/third_party/WebKit/Source/core/editing/SelectionController.cpp
+++ b/third_party/WebKit/Source/core/editing/SelectionController.cpp
@@ -652,7 +652,7 @@ void SelectionController::setNonDirectionalSelectionIfNeeded(
bool SelectionController::setCaretAtHitTestResult(
const HitTestResult& hitTestResult) {
Node* innerNode = hitTestResult.innerNode();
- if (!innerNode)
+ if (!innerNode || !innerNode->layoutObject())
yosin_UTC9 2016/11/30 02:01:48 It is strange that HitTestResult picks up "display
amaralp 2016/12/01 01:25:34 I didn't think it was possible for the HitTestResu
yosin_UTC9 2016/12/01 01:51:09 We need to find where we call HitTestResult::setIn
return false;
const VisiblePositionInFlatTree& visibleHitPos =
« 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