Chromium Code Reviews| 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..4898ebe492584f67141df52675ffe54d4246ef55 100644 |
| --- a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp |
| +++ b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp |
| @@ -408,10 +408,12 @@ 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) |
| + .SetAffinity(VP_DEFAULT_AFFINITY) |
|
yosin_UTC9
2017/05/22 04:59:44
nit: We don't need to call |SetAffinity(VP_DEFAULT
tanvir
2017/05/22 12:29:46
Done.
|
| + .SetIsDirectional(false) |
|
yosin_UTC9
2017/05/22 04:59:43
nit: No need to call |SetIsDirectional()|. The def
tanvir
2017/05/22 12:29:46
Done.
|
| + .Build(), |
| + FrameSelection::kCloseTyping); |
| return true; |
| } |