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

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

Issue 2442673002: Get rid of createVisibleSelection() taking one Position (Closed)
Patch Set: 2016-10-24T17:42:38 Created 4 years, 2 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/ApplyBlockElementCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp b/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
index 510ebf148c61bfe1822878fee1f804fbcb9e94c5..b4625c54d0a663a586c76a599af6fb8444d5d93b 100644
--- a/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
@@ -139,8 +139,10 @@ void ApplyBlockElementCommand::formatSelection(
return;
document().updateStyleAndLayoutIgnorePendingStylesheets();
setEndingSelection(createVisibleSelection(
- Position::beforeNode(placeholder), TextAffinity::Downstream,
- endingSelection().isDirectional()));
+ SelectionInDOMTree::Builder()
+ .collapse(Position::beforeNode(placeholder))
+ .setIsDirectional(endingSelection().isDirectional())
+ .build()));
return;
}

Powered by Google App Engine
This is Rietveld 408576698