| 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 2163dbded451db87a95c4695aca638cc52c1ffb1..92a51e10e192ed3d39ff99305ea0eb9085b8339f 100644
|
| --- a/ui/views/controls/textfield/native_textfield_views.cc
|
| +++ b/ui/views/controls/textfield/native_textfield_views.cc
|
| @@ -299,7 +299,8 @@ void NativeTextfieldViews::WriteDragDataForView(views::View* sender,
|
|
|
| int NativeTextfieldViews::GetDragOperationsForView(views::View* sender,
|
| const gfx::Point& p) {
|
| - if (!textfield_->IsEnabled() || !GetRenderText()->IsPointInSelection(p))
|
| + if (!textfield_->IsEnabled() || textfield_->IsPassword()
|
| + || !GetRenderText()->IsPointInSelection(p))
|
| return ui::DragDropTypes::DRAG_NONE;
|
| if (sender == this && !textfield_->read_only())
|
| return ui::DragDropTypes::DRAG_MOVE | ui::DragDropTypes::DRAG_COPY;
|
| @@ -398,7 +399,7 @@ void NativeTextfieldViews::UpdateFont() {
|
| }
|
|
|
| void NativeTextfieldViews::UpdateIsPassword() {
|
| - model_->set_is_password(textfield_->IsPassword());
|
| + GetRenderText()->SetIsPassword(textfield_->IsPassword());
|
| OnCaretBoundsChanged();
|
| SchedulePaint();
|
| OnTextInputTypeChanged();
|
| @@ -533,9 +534,9 @@ bool NativeTextfieldViews::IsCommandIdEnabled(int command_id) const {
|
| string16 result;
|
| switch (command_id) {
|
| case IDS_APP_CUT:
|
| - return editable && model_->HasSelection();
|
| + return editable && model_->HasSelection() && !textfield_->IsPassword();
|
| case IDS_APP_COPY:
|
| - return model_->HasSelection();
|
| + return model_->HasSelection() && !textfield_->IsPassword();
|
| case IDS_APP_PASTE:
|
| ViewsDelegate::views_delegate->GetClipboard()
|
| ->ReadText(ui::Clipboard::BUFFER_STANDARD, &result);
|
|
|