Index: third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp |
diff --git a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp |
index 847e5eefc2226e0f4a018ff85ae6fc4228edbf9d..7a34abe7b39a89c3e2238cb0808a96e47af3f62e 100644 |
--- a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp |
+++ b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp |
@@ -408,10 +408,9 @@ static bool ExpandSelectionToGranularity(LocalFrame& frame, |
return false; |
if (new_range.IsCollapsed()) |
return false; |
- TextAffinity affinity = frame.Selection().GetSelectionInDOMTree().Affinity(); |
- frame.Selection().SetSelectedRange(new_range, affinity, |
- SelectionDirectionalMode::kNonDirectional, |
- FrameSelection::kCloseTyping); |
+ frame.Selection().SetSelection( |
+ SelectionInDOMTree::Builder().SetBaseAndExtent(new_range).Build(), |
+ FrameSelection::kCloseTyping); |
return true; |
} |