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; |
} |