Commit 189708d4 authored by Zhuoyu Qian's avatar Zhuoyu Qian Committed by Commit Bot

Remove the dependence of Editor::Command in SelectionController.cpp.

Use Editor::ExecuteCommand() instead of Editor::CreateCommand().Execute()
to avoid the dependence of Editor::Command in SelectionController.cpp
Signed-off-by: default avatarZhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: I3d0a46689014d7a059d2df56c7bb9d4299ed219f
Reviewed-on: https://chromium-review.googlesource.com/964026Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543330}
parent 3a0a6cdd
...@@ -1178,9 +1178,8 @@ bool SelectionController::HandlePasteGlobalSelection( ...@@ -1178,9 +1178,8 @@ bool SelectionController::HandlePasteGlobalSelection(
Frame* focus_frame = Frame* focus_frame =
frame_->GetPage()->GetFocusController().FocusedOrMainFrame(); frame_->GetPage()->GetFocusController().FocusedOrMainFrame();
// Do not paste here if the focus was moved somewhere else. // Do not paste here if the focus was moved somewhere else.
if (frame_ == focus_frame && if (frame_ == focus_frame)
frame_->GetEditor().Behavior().SupportsGlobalSelection()) return frame_->GetEditor().ExecuteCommand("PasteGlobalSelection");
return frame_->GetEditor().CreateCommand("PasteGlobalSelection").Execute();
return false; return false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment