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

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

Issue 2374183004: Make non-null VisibleSelections creatable only by createVisibleSelection[Deprecated] (Closed)
Patch Set: Fix mac compile error Created 4 years, 3 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
Index: third_party/WebKit/Source/core/editing/GranularityStrategy.cpp
diff --git a/third_party/WebKit/Source/core/editing/GranularityStrategy.cpp b/third_party/WebKit/Source/core/editing/GranularityStrategy.cpp
index 04d955b5a2450a8ed390690edac5fb15d58b4423..9d3840bed42d6ec914e989410787af24b626e44e 100644
--- a/third_party/WebKit/Source/core/editing/GranularityStrategy.cpp
+++ b/third_party/WebKit/Source/core/editing/GranularityStrategy.cpp
@@ -72,7 +72,7 @@ VisibleSelection CharacterGranularityStrategy::updateExtent(const IntPoint& exte
const VisibleSelection& selection = frame->selection().selection();
if (selection.visibleBase().deepEquivalent() == extentPosition.deepEquivalent())
return selection;
- return VisibleSelection(selection.visibleBase(), extentPosition);
+ return createVisibleSelectionDeprecated(selection.visibleBase(), extentPosition);
}
DirectionGranularityStrategy::DirectionGranularityStrategy()
@@ -144,7 +144,7 @@ VisibleSelection DirectionGranularityStrategy::updateExtent(const IntPoint& exte
// strategy if we detect that the text's baseline coordinate changed
// without a line change.
if (verticalChange && inSameLine(newOffsetExtentPosition, oldOffsetExtentPosition))
- return VisibleSelection(selection.visibleBase(), newOffsetExtentPosition);
+ return createVisibleSelectionDeprecated(selection.visibleBase(), newOffsetExtentPosition);
int oldExtentBaseOrder = selection.isBaseFirst() ? 1 : -1;

Powered by Google App Engine
This is Rietveld 408576698