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

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

Issue 1308323004: Introduce absoluteCaretBoundsOf() for VisiblePosition (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-28T19:12:35 Rebase Created 5 years, 4 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 | « Source/core/editing/VisiblePosition.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/commands/DeleteSelectionCommand.cpp
diff --git a/Source/core/editing/commands/DeleteSelectionCommand.cpp b/Source/core/editing/commands/DeleteSelectionCommand.cpp
index da6c8f2c2e8b9beefe6cf472850eff16c8dc3787..bbad8d433d2111ea1317251eaa7d439700016f40 100644
--- a/Source/core/editing/commands/DeleteSelectionCommand.cpp
+++ b/Source/core/editing/commands/DeleteSelectionCommand.cpp
@@ -653,7 +653,7 @@ void DeleteSelectionCommand::mergeParagraphs()
// The rule for merging into an empty block is: only do so if its farther to the right.
// FIXME: Consider RTL.
- if (!m_startsAtEmptyLine && isStartOfParagraph(mergeDestination) && startOfParagraphToMove.absoluteCaretBounds().x() > mergeDestination.absoluteCaretBounds().x()) {
+ if (!m_startsAtEmptyLine && isStartOfParagraph(mergeDestination) && absoluteCaretBoundsOf(startOfParagraphToMove).x() > absoluteCaretBoundsOf(mergeDestination).x()) {
if (isHTMLBRElement(*mostForwardCaretPosition(mergeDestination.deepEquivalent()).anchorNode())) {
removeNodeAndPruneAncestors(mostForwardCaretPosition(mergeDestination.deepEquivalent()).anchorNode());
m_endingPosition = startOfParagraphToMove.deepEquivalent();
« no previous file with comments | « Source/core/editing/VisiblePosition.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698