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

Unified Diff: third_party/WebKit/Source/core/editing/commands/TypingCommand.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
« no previous file with comments | « third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp ('k') | 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/commands/TypingCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp b/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
index 92571856b9e6118a1ae7383fcd6fdf6bc92f8add..8450f5cac749066cd9300b7c694f8b6c467094a2 100644
--- a/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
@@ -520,7 +520,7 @@ void TypingCommand::deleteKeyPressed(TextGranularity granularity, bool killRing,
return;
// If the caret is at the start of a paragraph after a table, move content into the last table cell.
- if (isStartOfParagraph(visibleStart) && tableElementJustBefore(previousPositionOf(visibleStart, CannotCrossEditingBoundary))) {
+ if (isStartOfParagraphDeprecated(visibleStart) && tableElementJustBefore(previousPositionOf(visibleStart, CannotCrossEditingBoundary))) {
// Unless the caret is just before a table. We don't want to move a table into the last table cell.
if (tableElementJustAfter(visibleStart))
return;
@@ -609,7 +609,7 @@ void TypingCommand::forwardDeleteKeyPressed(TextGranularity granularity, bool ki
Node* enclosingTableCell = enclosingNodeOfType(visibleEnd.deepEquivalent(), &isTableCell);
if (enclosingTableCell && visibleEnd.deepEquivalent() == VisiblePosition::lastPositionInNode(enclosingTableCell).deepEquivalent())
return;
- if (visibleEnd.deepEquivalent() == endOfParagraph(visibleEnd).deepEquivalent())
+ if (visibleEnd.deepEquivalent() == endOfParagraphDeprecated(visibleEnd).deepEquivalent())
downstreamEnd = mostForwardCaretPosition(nextPositionOf(visibleEnd, CannotCrossEditingBoundary).deepEquivalent());
// When deleting tables: Select the table first, then perform the deletion
if (isDisplayInsideTable(downstreamEnd.computeContainerNode()) && downstreamEnd.computeOffsetInContainerNode() <= caretMinOffset(downstreamEnd.computeContainerNode())) {
@@ -619,7 +619,7 @@ void TypingCommand::forwardDeleteKeyPressed(TextGranularity granularity, bool ki
}
// deleting to end of paragraph when at end of paragraph needs to merge the next paragraph (if any)
- if (granularity == ParagraphBoundary && selectionModifier.selection().isCaret() && isEndOfParagraph(selectionModifier.selection().visibleEnd()))
+ if (granularity == ParagraphBoundary && selectionModifier.selection().isCaret() && isEndOfParagraphDeprecated(selectionModifier.selection().visibleEnd()))
selectionModifier.modify(FrameSelection::AlterationExtend, DirectionForward, CharacterGranularity);
selectionToDelete = selectionModifier.selection();
« no previous file with comments | « third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698