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

Issue 1155008: Adds the ability to display text in a textfield when the text is (Closed)

Created:
10 years, 9 months ago by sky
Modified:
9 years, 7 months ago
Reviewers:
oshima
CC:
chromium-reviews, ben+cc_chromium.org, Elliot Glaysher
Visibility:
Public.

Description

Adds the ability to display text in a textfield when the text is empty. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=42353

Patch Set 1 #

Patch Set 2 : Fixes windows build #

Total comments: 8

Patch Set 3 : Updates #

Unified diffs Side-by-side diffs Delta from patch set Stats (+166 lines, -17 lines) Patch
A views/controls/textfield/gtk_views_entry.h View 1 chunk +52 lines, -0 lines 0 comments Download
A views/controls/textfield/gtk_views_entry.cc View 1 2 1 chunk +64 lines, -0 lines 0 comments Download
M views/controls/textfield/native_textfield_gtk.h View 2 chunks +7 lines, -0 lines 0 comments Download
M views/controls/textfield/native_textfield_gtk.cc View 1 2 4 chunks +25 lines, -17 lines 0 comments Download
M views/controls/textfield/textfield.h View 1 3 chunks +15 lines, -0 lines 0 comments Download
M views/examples/textfield_example.h View 1 chunk +1 line, -0 lines 0 comments Download
M views/views.gyp View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
sky
10 years, 9 months ago (2010-03-22 19:15:19 UTC) #1
sky
Elliot is OOO today. Oshima, could you take a look? Thanks, -Scott
10 years, 9 months ago (2010-03-22 21:48:33 UTC) #2
oshima
Ok, will do today. - oshima On 2010/03/22 21:48:33, sky wrote: > Elliot is OOO ...
10 years, 9 months ago (2010-03-22 22:12:40 UTC) #3
oshima
please move the kPasswordChar to anonymous namespace (it's my fault), then LGTM On 2010/03/22 22:12:40, ...
10 years, 9 months ago (2010-03-22 23:22:59 UTC) #4
oshima
oops,forgot to send this. (still lgtm with kPasswordChar change) http://codereview.chromium.org/1155008/diff/3001/4001 File views/controls/textfield/gtk_views_entry.cc (right): http://codereview.chromium.org/1155008/diff/3001/4001#newcode26 views/controls/textfield/gtk_views_entry.cc:26: ...
10 years, 9 months ago (2010-03-22 23:23:27 UTC) #5
sky
New snapshot pushed. http://codereview.chromium.org/1155008/diff/3001/4001 File views/controls/textfield/gtk_views_entry.cc (right): http://codereview.chromium.org/1155008/diff/3001/4001#newcode26 views/controls/textfield/gtk_views_entry.cc:26: if (host && event->window == entry->text_area ...
10 years, 9 months ago (2010-03-23 15:43:40 UTC) #6
oshima
10 years, 9 months ago (2010-03-23 16:43:24 UTC) #7
On Tue, Mar 23, 2010 at 8:43 AM, <sky@chromium.org> wrote:

> New snapshot pushed.
>
>
>
> http://codereview.chromium.org/1155008/diff/3001/4001
> File views/controls/textfield/gtk_views_entry.cc (right):
>
> http://codereview.chromium.org/1155008/diff/3001/4001#newcode26
> views/controls/textfield/gtk_views_entry.cc:26: if (host &&
> event->window == entry->text_area &&
> On 2010/03/22 23:23:27, oshima wrote:
>
>> just curious. when the above condition (with window) fails?
>>
>
> event->window == entry->text_area ?
> GtkEntry internally creates a separate window (text_area). This function
> gets called for both windows and I only want to paint on the one that
> draws the actual text. I'll add a comment.
>
>
> http://codereview.chromium.org/1155008/diff/3001/4001#newcode40
> views/controls/textfield/gtk_views_entry.cc:40:
> gfx::Canvas::TEXT_ALIGN_LEFT);
> On 2010/03/22 23:23:27, oshima wrote:
>
>> Will this do the right thing for RTL? or just add TODO if not.
>>
>
> Done.
>
>
> http://codereview.chromium.org/1155008/diff/3001/4003
> File views/controls/textfield/native_textfield_gtk.cc (right):
>
> http://codereview.chromium.org/1155008/diff/3001/4003#newcode20
> views/controls/textfield/native_textfield_gtk.cc:20: static const char
> kPasswordChar = '*';
> On 2010/03/22 23:23:27, oshima wrote:
>
>> This is my fault, but it's better to move to anonymous namespace, then
>>
> we don't
>
>> need static.
>>
>
> Why is an anonymous namespace better than static?
>
>
static works only for objects, but namespace works for declarations as well.
It won't make much difference in this case, but if it requires private type
as well,
you can put them in the same anonymous namespace.
It's minor, so you can keep it if you feel strongly about it.


> http://codereview.chromium.org/1155008/diff/3001/4003#newcode252
> views/controls/textfield/native_textfield_gtk.cc:252:
> NativeControlCreated(textfield);
> On 2010/03/22 23:23:27, oshima wrote:
>
>> you don't need textfield, but it's up to you.
>>
>
> Done.
>
>
> http://codereview.chromium.org/1155008
>

Powered by Google App Engine
This is Rietveld 408576698