| Index: content/browser/renderer_host/input/touch_selection_controller_client_child_frame.cc
|
| diff --git a/content/browser/renderer_host/input/touch_selection_controller_client_child_frame.cc b/content/browser/renderer_host/input/touch_selection_controller_client_child_frame.cc
|
| index 0cd3bf9b9be90ea1f21d07aa95d40c41559bd253..6d4902908af89f672e369c1c19b0f8251e77c33a 100644
|
| --- a/content/browser/renderer_host/input/touch_selection_controller_client_child_frame.cc
|
| +++ b/content/browser/renderer_host/input/touch_selection_controller_client_child_frame.cc
|
| @@ -125,19 +125,10 @@ bool TouchSelectionControllerClientChildFrame::IsCommandIdEnabled(
|
| int command_id) const {
|
| bool editable = rwhv_->GetTextInputType() != ui::TEXT_INPUT_TYPE_NONE;
|
| bool readable = rwhv_->GetTextInputType() != ui::TEXT_INPUT_TYPE_PASSWORD;
|
| - // TODO(wjmaclean): The test for has_selection should be changed to
|
| - //
|
| - // rwhv_->GetSelectionRange(&selection_range);
|
| - // bool has_selection = !selection_range.is_empty();
|
| - //
|
| - // like in TouchSelectionControllerClientAura. Unfortunately this fails here
|
| - // due to https://crbug.com/723790, which means that the first text
|
| - // selected in an oopif subframe when it acquires focus will fail to send
|
| - // a FrameHostMsg_SelectionChanged, meaning the TextInputManager won't
|
| - // know about the new selection.
|
| - bool has_selection = selection_start_.type() != gfx::SelectionBound::EMPTY &&
|
| - selection_end_.type() != gfx::SelectionBound::EMPTY &&
|
| - selection_start_ != selection_end_;
|
| +
|
| + gfx::Range selection_range;
|
| + bool has_selection =
|
| + rwhv_->GetSelectionRange(&selection_range) && !selection_range.is_empty();
|
| switch (command_id) {
|
| case IDS_APP_CUT:
|
| return editable && readable && has_selection;
|
|
|