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

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

Issue 358553004: Added text filtering to Overview Mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed fix for textfield crash on destruction while handling key Created 6 years, 6 months 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
« no previous file with comments | « ui/views/controls/textfield/textfield.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/textfield/textfield.cc
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
index cb3e5423814432168664c60ec7a6ce84ce167ebc..a8a0544420e045e049fc71ed431996ddb9600229 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -409,6 +409,11 @@ void Textfield::UseDefaultSelectionTextColor() {
SchedulePaint();
}
+void Textfield::SetShadows(const gfx::ShadowValues& shadows) {
+ shadows_ = shadows;
msw 2014/07/03 05:28:55 Just set the shadows on the RenderText here, you d
Nina 2014/07/04 13:56:48 Done.
+ SchedulePaint();
+}
+
SkColor Textfield::GetSelectionBackgroundColor() const {
return use_default_selection_background_color_ ?
GetNativeTheme()->GetSystemColor(
@@ -601,7 +606,7 @@ bool Textfield::OnMousePressed(const ui::MouseEvent& event) {
ui::Clipboard::GetForCurrentThread(),
ui::CLIPBOARD_TYPE_SELECTION).WriteText(base::string16());
OnAfterUserAction();
- } else if(!read_only()) {
+ } else if (!read_only()) {
PasteSelectionClipboard(event);
}
}
@@ -1588,6 +1593,8 @@ void Textfield::PaintTextAndCursor(gfx::Canvas* canvas) {
// Draw the text, cursor, and selection.
render_text->set_cursor_visible(cursor_visible_ && !drop_cursor_visible_ &&
!HasSelection());
+ render_text->set_shadows(shadows_);
+
render_text->Draw(canvas);
// Draw the detached drop cursor that marks where the text will be dropped.
« no previous file with comments | « ui/views/controls/textfield/textfield.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698