| Index: ui/views/controls/textfield/textfield.cc
|
| diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
|
| index 19e5c2ca689acbd6ab7cc7c045d7ef6bdd536c3e..0c29323db680d8575f88dc353a4915ac50f637d2 100644
|
| --- a/ui/views/controls/textfield/textfield.cc
|
| +++ b/ui/views/controls/textfield/textfield.cc
|
| @@ -1488,6 +1488,9 @@ bool Textfield::IsTextEditCommandEnabled(ui::TextEditCommand command) const {
|
| return editable && !result.empty();
|
| case ui::TextEditCommand::SELECT_ALL:
|
| return !text().empty();
|
| + case ui::TextEditCommand::TRANSPOSE:
|
| + return editable && !model_->HasSelection() &&
|
| + !model_->HasCompositionText();
|
| case ui::TextEditCommand::MOVE_DOWN:
|
| case ui::TextEditCommand::MOVE_DOWN_AND_MODIFY_SELECTION:
|
| case ui::TextEditCommand::MOVE_PAGE_DOWN:
|
| @@ -1681,6 +1684,9 @@ void Textfield::ExecuteTextEditCommand(ui::TextEditCommand command) {
|
| case ui::TextEditCommand::SELECT_ALL:
|
| SelectAll(false);
|
| break;
|
| + case ui::TextEditCommand::TRANSPOSE:
|
| + text_changed = cursor_changed = model_->Transpose();
|
| + break;
|
| case ui::TextEditCommand::MOVE_DOWN:
|
| case ui::TextEditCommand::MOVE_DOWN_AND_MODIFY_SELECTION:
|
| case ui::TextEditCommand::MOVE_PAGE_DOWN:
|
|
|