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

Issue 3175027: Cleanup: Remove dead code, use early returns to reduce indenting, shorten.... (Closed)

Created:
10 years, 4 months ago by Peter Kasting
Modified:
9 years, 7 months ago
Reviewers:
oshima, sky
CC:
chromium-reviews, ben+cc_chromium.org, James Su
Visibility:
Public.

Description

Cleanup: Remove dead code, use early returns to reduce indenting, shorten. This makes one behavioral change: a mouse release with a successful HitTest and |canceled| true will set the state to HOT instead of NORMAL. This seemed more correct to me. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=56766

Patch Set 1 #

Total comments: 2

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -112 lines) Patch
M views/controls/button/custom_button.h View 1 chunk +0 lines, -7 lines 0 comments Download
M views/controls/button/custom_button.cc View 1 9 chunks +70 lines, -105 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
Peter Kasting
10 years, 4 months ago (2010-08-19 21:21:15 UTC) #1
sky
Just a couple of style suggestions. LGTM otherwise http://codereview.chromium.org/3175027/diff/1/2 File views/controls/button/custom_button.cc (right): http://codereview.chromium.org/3175027/diff/1/2#newcode74 views/controls/button/custom_button.cc:74: if ...
10 years, 4 months ago (2010-08-19 21:44:43 UTC) #2
Peter Kasting
How about the new snap, are those two places any better?
10 years, 4 months ago (2010-08-19 21:50:00 UTC) #3
sky
Yes, thanks. LGTM
10 years, 4 months ago (2010-08-19 21:51:19 UTC) #4
oshima
Hi, Looks like this changed the behavior of CustomButton::OnKeyPress. Is it intentional? Hitting tab (to ...
10 years, 3 months ago (2010-08-31 23:25:03 UTC) #5
Peter Kasting
On 2010/08/31 23:25:03, oshima wrote: > Looks like this changed the behavior of CustomButton::OnKeyPress. Reading ...
10 years, 3 months ago (2010-08-31 23:31:09 UTC) #6
sky
I believe tab key handling is in the focus manager or accelerator processing. -Scott On ...
10 years, 3 months ago (2010-08-31 23:40:01 UTC) #7
oshima
On 2010/08/31 23:31:09, Peter Kasting wrote: > On 2010/08/31 23:25:03, oshima wrote: > > Looks ...
10 years, 3 months ago (2010-08-31 23:43:11 UTC) #8
Peter Kasting
On 2010/08/31 23:43:11, oshima wrote: > On 2010/08/31 23:31:09, Peter Kasting wrote: > > On ...
10 years, 3 months ago (2010-08-31 23:48:09 UTC) #9
oshima
10 years, 3 months ago (2010-08-31 23:48:39 UTC) #10
correction.

On Tue, Aug 31, 2010 at 4:43 PM, <oshima@chromium.org> wrote:

> On 2010/08/31 23:31:09, Peter Kasting wrote:
>
>> On 2010/08/31 23:25:03, oshima wrote:
>> > Looks like this changed the behavior of CustomButton::OnKeyPress.
>>
>
>  Reading through OnKeyPress(), the function behaves identically to before.
>>  Are
>> you sure this change is at fault?
>>
>
> It used to return false when the event is not handled, and it now returns
> true
> if it's not disabled, regardless of being handled or not.
> I made a fix and can check it if if it looks good to you.
>
> http://codereview.chromium.org/3276007
>
>
>   Note that CustomButton doesn't handle the tab
>> key at all.
>>
>
> focus manager now checks tab only if key event is not handled (see r54947),
> and
> custom button is eating tab event before it's being handled by focus
> manager.
>
>
WidgetGtk now checks tab before passing it to focus manager. James can
explain it better than me. (James?)
I'm not sure which change has to be fixed, but this was working with old
logic at least.

- oshima


>
>
> http://codereview.chromium.org/3175027/show
>

Powered by Google App Engine
This is Rietveld 408576698