Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/Editor.cpp |
| diff --git a/third_party/WebKit/Source/core/editing/Editor.cpp b/third_party/WebKit/Source/core/editing/Editor.cpp |
| index 147b10fa09c203c7d4978f25893ff29ef469de4d..6011a271e56e41e680b1c6717d3fc6655e6a4142 100644 |
| --- a/third_party/WebKit/Source/core/editing/Editor.cpp |
| +++ b/third_party/WebKit/Source/core/editing/Editor.cpp |
| @@ -156,7 +156,6 @@ Editor::RevealSelectionScope::~RevealSelectionScope() { |
| // TODO(yosin): We should make |Editor::selectionForCommand()| to return |
| // |SelectionInDOMTree| instead of |VisibleSelection|. |
| VisibleSelection Editor::selectionForCommand(Event* event) { |
| - frame().selection().updateIfNeeded(); |
|
Xiaocheng
2017/02/24 18:06:06
Is this a mis-removal?
yosin_UTC9
2017/02/25 01:02:03
Yes, good catch!
This is over removal. I should mo
|
| VisibleSelection selection = |
| frame().selection().computeVisibleSelectionInDOMTreeDeprecated(); |
| if (!event) |
| @@ -926,9 +925,7 @@ static VisibleSelection correctedVisibleSelection( |
| !passedSelection.extent().isConnected()) |
| return VisibleSelection(); |
| DCHECK(!passedSelection.base().document()->needsLayoutTreeUpdate()); |
| - VisibleSelection correctedSelection = passedSelection; |
| - correctedSelection.updateIfNeeded(); |
| - return correctedSelection; |
| + return createVisibleSelection(passedSelection.asSelection()); |
| } |
| void Editor::unappliedEditing(UndoStep* cmd) { |