Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: ui/views/controls/textfield/textfield.cc

Issue 2413223003: Views:: Make Labels support text selection. (Closed)
Patch Set: Fix text selection background color on Windows. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/views/controls/textfield/textfield.cc
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
index 2ab27564ee4b4354f377bcfe825d7b0d4949d4b7..2071b04a2284431a82adbeb3e9ad6d88e60d96c9 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -257,11 +257,6 @@ Textfield::Textfield()
View::SetBorder(std::unique_ptr<Border>(new FocusableBorder()));
SetFocusBehavior(FocusBehavior::ALWAYS);
-// On Linux, middle click should update or paste the selection clipboard.
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
- selection_controller_.set_handles_selection_clipboard(true);
-#endif
-
// These allow BrowserView to pass edit commands from the Chrome menu to us
// when we're focused by simply asking the FocusManager to
// ProcessAccelerator() with the relevant accelerators.
@@ -1762,6 +1757,10 @@ bool Textfield::IsReadOnly() const {
return read_only();
}
+bool Textfield::SupportsDrag() const {
+ return true;
+}
+
void Textfield::SetTextBeingDragged(bool value) {
initiating_drag_ = value;
}

Powered by Google App Engine
This is Rietveld 408576698