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

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

Issue 2373483003: Ensure valid VisiblePosition input for absoluteCaretBoundsOf (Closed)
Patch Set: 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/DeleteSelectionCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp b/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
index c2614e5db7ac9ee1518d313168510d24652391d6..d7f311dcfbbd03234a13721d14f76aca5026de09 100644
--- a/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
@@ -687,7 +687,7 @@ void DeleteSelectionCommand::mergeParagraphs(EditingState* editingState)
// The rule for merging into an empty block is: only do so if its farther to the right.
// FIXME: Consider RTL.
- if (!m_startsAtEmptyLine && isStartOfParagraphDeprecated(mergeDestination) && absoluteCaretBoundsOf(startOfParagraphToMove).x() > absoluteCaretBoundsOf(mergeDestination).x()) {
+ if (!m_startsAtEmptyLine && isStartOfParagraphDeprecated(mergeDestination) && absoluteCaretBoundsOfDeprecated(startOfParagraphToMove).x() > absoluteCaretBoundsOfDeprecated(mergeDestination).x()) {
if (isHTMLBRElement(*mostForwardCaretPosition(mergeDestination.deepEquivalent()).anchorNode())) {
removeNodeAndPruneAncestors(mostForwardCaretPosition(mergeDestination.deepEquivalent()).anchorNode(), editingState);
if (editingState->isAborted())

Powered by Google App Engine
This is Rietveld 408576698