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

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

Issue 2912233002: Prune ComputeVisibleSelectionInDOMTreeDeprecated from Editor::InsertLineBreak/ParagraphSeparator (Closed)
Patch Set: Created 3 years, 7 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/Editor.cpp
diff --git a/third_party/WebKit/Source/core/editing/Editor.cpp b/third_party/WebKit/Source/core/editing/Editor.cpp
index 1fb0a01f1af8490f2f61f66ae7e3dd5284b6d974..93907179857f5e272c6c10e3c4b373324f6c3feb 100644
--- a/third_party/WebKit/Source/core/editing/Editor.cpp
+++ b/third_party/WebKit/Source/core/editing/Editor.cpp
@@ -1089,10 +1089,8 @@ bool Editor::InsertLineBreak() {
if (!CanEdit())
return false;
- VisiblePosition caret = GetFrame()
- .Selection()
- .ComputeVisibleSelectionInDOMTreeDeprecated()
- .VisibleStart();
+ VisiblePosition caret =
+ GetFrame().Selection().ComputeVisibleSelectionInDOMTree().VisibleStart();
bool align_to_edge = IsEndOfEditableOrNonEditableContent(caret);
DCHECK(GetFrame().GetDocument());
if (!TypingCommand::InsertLineBreak(*GetFrame().GetDocument()))
@@ -1111,10 +1109,8 @@ bool Editor::InsertParagraphSeparator() {
if (!CanEditRichly())
return InsertLineBreak();
- VisiblePosition caret = GetFrame()
- .Selection()
- .ComputeVisibleSelectionInDOMTreeDeprecated()
- .VisibleStart();
+ VisiblePosition caret =
+ GetFrame().Selection().ComputeVisibleSelectionInDOMTree().VisibleStart();
bool align_to_edge = IsEndOfEditableOrNonEditableContent(caret);
DCHECK(GetFrame().GetDocument());
EditingState editing_state;
« 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