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

Unified Diff: third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp

Issue 2366693005: Mark paragraph-related functions deprecated in VisibleUnits (Closed)
Patch Set: Add output for DCHECK 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/commands/InsertLineBreakCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp b/third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp
index c5223d9c288820983bea980d7c2eb56f4465000b..53a1fcf6c87eaa8f7e8418921e7269bb14282ba7 100644
--- a/third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp
@@ -95,7 +95,7 @@ void InsertLineBreakCommand::doApply(EditingState* editingState)
// FIXME: Need to merge text nodes when inserting just after or before text.
- if (isEndOfParagraph(caret) && !lineBreakExistsAtVisiblePosition(caret)) {
+ if (isEndOfParagraphDeprecated(caret) && !lineBreakExistsAtVisiblePosition(caret)) {
bool needExtraLineBreak = !isHTMLHRElement(*pos.anchorNode()) && !isHTMLTableElement(*pos.anchorNode());
insertNodeAt(nodeToInsert, pos, editingState);
@@ -127,7 +127,7 @@ void InsertLineBreakCommand::doApply(EditingState* editingState)
return;
// Insert an extra br or '\n' if the just inserted one collapsed.
- if (!isStartOfParagraph(VisiblePosition::beforeNode(nodeToInsert))) {
+ if (!isStartOfParagraphDeprecated(VisiblePosition::beforeNode(nodeToInsert))) {
insertNodeBefore(nodeToInsert->cloneNode(false), nodeToInsert, editingState);
if (editingState->isAborted())
return;

Powered by Google App Engine
This is Rietveld 408576698