| Index: ui/views/controls/textfield/native_textfield_views.cc
|
| diff --git a/ui/views/controls/textfield/native_textfield_views.cc b/ui/views/controls/textfield/native_textfield_views.cc
|
| index c56f876ee3d7723d83a1bc7f049a6010e7e306be..915a05ee6ec3f70f4b904e7d5ce5e17a8a734c4b 100644
|
| --- a/ui/views/controls/textfield/native_textfield_views.cc
|
| +++ b/ui/views/controls/textfield/native_textfield_views.cc
|
| @@ -105,13 +105,10 @@ NativeTextfieldViews::~NativeTextfieldViews() {
|
| bool NativeTextfieldViews::OnMousePressed(const MouseEvent& event) {
|
| OnBeforeUserAction();
|
| TrackMouseClicks(event);
|
| -
|
| - // Allow the textfield/omnibox to optionally handle the mouse pressed event.
|
| - // This should be removed once native textfield implementations are
|
| - // consolidated to textfield.
|
| + // TODO: Remove once NativeTextfield implementations are consolidated to
|
| + // Textfield.
|
| if (!textfield_->OnMousePressed(event))
|
| HandleMousePressEvent(event);
|
| -
|
| OnAfterUserAction();
|
| return true;
|
| }
|
| @@ -129,14 +126,21 @@ bool NativeTextfieldViews::OnMouseDragged(const MouseEvent& event) {
|
| return true;
|
|
|
| OnBeforeUserAction();
|
| - if (MoveCursorTo(event.location(), true))
|
| - SchedulePaint();
|
| + // TODO: Remove once NativeTextfield implementations are consolidated to
|
| + // Textfield.
|
| + if (!textfield_->OnMouseDragged(event)) {
|
| + if (MoveCursorTo(event.location(), true))
|
| + SchedulePaint();
|
| + }
|
| OnAfterUserAction();
|
| return true;
|
| }
|
|
|
| void NativeTextfieldViews::OnMouseReleased(const MouseEvent& event) {
|
| OnBeforeUserAction();
|
| + // TODO: Remove once NativeTextfield implementations are consolidated to
|
| + // Textfield.
|
| + textfield_->OnMouseReleased(event);
|
| // Cancel suspected drag initiations, the user was clicking in the selection.
|
| if (initiating_drag_ && MoveCursorTo(event.location(), false))
|
| SchedulePaint();
|
|
|