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

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

Issue 2932293002: Early return if SelectionInDOMTree is None at LayoutSelection::CalcSelectionPaintRange. (Closed)
Patch Set: Created 3 years, 6 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
« 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/LayoutSelection.cpp
diff --git a/third_party/WebKit/Source/core/editing/LayoutSelection.cpp b/third_party/WebKit/Source/core/editing/LayoutSelection.cpp
index 3beb0274d57c55771ddea0e7a79747ee84b50166..6791a46b05dc91a2a0745b149e667e521505bad5 100644
--- a/third_party/WebKit/Source/core/editing/LayoutSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/LayoutSelection.cpp
@@ -318,6 +318,11 @@ void LayoutSelection::ClearSelection() {
static SelectionPaintRange CalcSelectionPaintRange(
const FrameSelection& frame_selection) {
+ const SelectionInDOMTree& selection_in_dom =
+ frame_selection.GetSelectionInDOMTree();
+ if (selection_in_dom.IsNone())
+ return SelectionPaintRange();
+
const VisibleSelectionInFlatTree& original_selection =
frame_selection.ComputeVisibleSelectionInFlatTree();
// Construct a new VisibleSolution, since visibleSelection() is not
« 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