summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authoravayvod@chromium.org <avayvod@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-02 04:10:57 +0000
committeravayvod@chromium.org <avayvod@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-02 04:10:57 +0000
commit96cf77c0ebc06d9ad8c872a8e90927c00f996a20 (patch)
tree6148f0c26106a94b2c088b4abf7b5ddff05ced44 /views
parent9620ba04d8ef64c87c688e97a6eb6a6637c543a0 (diff)
downloadchromium_src-96cf77c0ebc06d9ad8c872a8e90927c00f996a20.zip
chromium_src-96cf77c0ebc06d9ad8c872a8e90927c00f996a20.tar.gz
chromium_src-96cf77c0ebc06d9ad8c872a8e90927c00f996a20.tar.bz2
Textfield draws the right part of its parent's background as its background.
Set the right background for existing user controls view. BUG=chromium-os:8101 TEST=Check username and password text fields on existing or new user pods for light gray borders around them. Borders should not be visible. Review URL: http://codereview.chromium.org/4127009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64715 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/controls/textfield/gtk_views_entry.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/views/controls/textfield/gtk_views_entry.cc b/views/controls/textfield/gtk_views_entry.cc
index eaf4459..c8e03ce 100644
--- a/views/controls/textfield/gtk_views_entry.cc
+++ b/views/controls/textfield/gtk_views_entry.cc
@@ -17,11 +17,21 @@ G_DEFINE_TYPE(GtkViewsEntry, gtk_views_entry, GTK_TYPE_ENTRY)
static gint gtk_views_entry_expose_event(GtkWidget *widget,
GdkEventExpose *event) {
+ views::NativeTextfieldGtk* host = GTK_VIEWS_ENTRY(widget)->host;
+#if defined(OS_CHROMEOS)
+ // Draw textfield background over the default white rectangle.
+ if (event->window == widget->window) {
+ gfx::CanvasSkiaPaint canvas(event);
+ if (!canvas.is_empty() && host) {
+ host->textfield()->PaintBackground(&canvas);
+ }
+ }
+#endif
+
gint result = GTK_WIDGET_CLASS(gtk_views_entry_parent_class)->expose_event(
widget, event);
GtkEntry* entry = GTK_ENTRY(widget);
- views::NativeTextfieldGtk* host = GTK_VIEWS_ENTRY(widget)->host;
// Internally GtkEntry creates an additional window (text_area) that the
// text is drawn to. We only need paint after that window has painted.