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

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

Issue 1868473002: Use PositionMoveType::GraphemeBoundary (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove PositionMoveType::CodePoint Created 4 years, 8 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/BreakBlockquoteCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/BreakBlockquoteCommand.cpp b/third_party/WebKit/Source/core/editing/commands/BreakBlockquoteCommand.cpp
index 2554c8fb9c316c0e837d56d86a045569dc5afd42..1aeabed38f0d4292613e0cc1a551c4ca67dd6d90 100644
--- a/third_party/WebKit/Source/core/editing/commands/BreakBlockquoteCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/BreakBlockquoteCommand.cpp
@@ -133,16 +133,12 @@ void BreakBlockquoteCommand::doApply(EditingState* editingState)
// Don't move a line break just after the caret. Doing so would create an extra, empty paragraph
// in the new blockquote.
if (lineBreakExistsAtVisiblePosition(visiblePos)) {
- // TODO(yosin) We should use |PositionMoveType::Character| for
- // |nextPositionOf()| to avoid editing middle of character.
- pos = nextPositionOf(pos, PositionMoveType::CodePoint);
+ pos = nextPositionOf(pos, PositionMoveType::GraphemeCluster);
}
// Adjust the position so we don't split at the beginning of a quote.
while (isFirstVisiblePositionInNode(createVisiblePosition(pos), toHTMLQuoteElement(enclosingNodeOfType(pos, isMailHTMLBlockquoteElement)))) {
- // TODO(yosin) We should use |PositionMoveType::Character| for
- // |previousPositionOf()| to avoid editing middle character.
- pos = previousPositionOf(pos, PositionMoveType::CodePoint);
+ pos = previousPositionOf(pos, PositionMoveType::GraphemeCluster);
}
// startNode is the first node that we need to move to the new blockquote.

Powered by Google App Engine
This is Rietveld 408576698