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

Issue 2095873004: Ink drops with touch input are redundant on Windows since the OS does something similar (Closed)

Created:
4 years, 6 months ago by kylix_rd
Modified:
4 years, 5 months ago
Reviewers:
Evan Stade, bruthig
CC:
chromium-reviews, tfarina, bruthig+ink_drop_chromium.org, dcheng, sky
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Don't show ink drops with touch events on Windows BUG=595315 TBR=bruthig@chromium.org Committed: https://crrev.com/d480e04cbde45c22342599468c3081f586b4523c Cr-Commit-Position: refs/heads/master@{#402239}

Patch Set 1 #

Total comments: 3

Patch Set 2 : Added comment to explain somewhat obtuse 'if' statement #

Total comments: 1

Patch Set 3 : Rework comments and the code based on feedback in the review #

Total comments: 1

Patch Set 4 : Spelling error correction #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -0 lines) Patch
M ui/views/animation/ink_drop_host_view.cc View 1 2 3 1 chunk +18 lines, -0 lines 8 comments Download

Messages

Total messages: 32 (11 generated)
kylix_rd
sky@, bruthig@ requested that you provide review cover for this CL since he's OOO until ...
4 years, 6 months ago (2016-06-24 17:22:48 UTC) #3
sky
+estade as he knows this code more than I. https://codereview.chromium.org/2095873004/diff/1/ui/views/animation/ink_drop_host_view.cc File ui/views/animation/ink_drop_host_view.cc (right): https://codereview.chromium.org/2095873004/diff/1/ui/views/animation/ink_drop_host_view.cc#newcode176 ui/views/animation/ink_drop_host_view.cc:176: ...
4 years, 6 months ago (2016-06-24 19:21:11 UTC) #5
Evan Stade
+bruthig (sadly ooo) is the only one who truly understands the InkDropState enum. https://codereview.chromium.org/2095873004/diff/1/ui/views/animation/ink_drop_host_view.cc File ...
4 years, 6 months ago (2016-06-24 20:28:30 UTC) #7
kylix_rd
https://codereview.chromium.org/2095873004/diff/1/ui/views/animation/ink_drop_host_view.cc File ui/views/animation/ink_drop_host_view.cc (right): https://codereview.chromium.org/2095873004/diff/1/ui/views/animation/ink_drop_host_view.cc#newcode176 ui/views/animation/ink_drop_host_view.cc:176: if ((state == InkDropState::ACTION_PENDING || On 2016/06/24 19:21:11, sky ...
4 years, 6 months ago (2016-06-24 20:32:18 UTC) #8
kylix_rd
On 2016/06/24 20:28:30, Evan Stade wrote: > +bruthig (sadly ooo) is the only one who ...
4 years, 6 months ago (2016-06-24 20:44:36 UTC) #9
Evan Stade
On 2016/06/24 20:44:36, kylix_rd wrote: > On 2016/06/24 20:28:30, Evan Stade wrote: > > +bruthig ...
4 years, 6 months ago (2016-06-24 21:28:32 UTC) #10
kylix_rd
Added comment to the code explaining logic behind the 'if' statement.
4 years, 5 months ago (2016-06-27 14:52:35 UTC) #11
Evan Stade
https://codereview.chromium.org/2095873004/diff/20001/ui/views/animation/ink_drop_host_view.cc File ui/views/animation/ink_drop_host_view.cc (right): https://codereview.chromium.org/2095873004/diff/20001/ui/views/animation/ink_drop_host_view.cc#newcode176 ui/views/animation/ink_drop_host_view.cc:176: // The reason for this code is to ensure ...
4 years, 5 months ago (2016-06-27 15:19:46 UTC) #12
kylix_rd
On 2016/06/27 15:19:46, Evan Stade wrote: > I think you're skipping ahead a bit here, ...
4 years, 5 months ago (2016-06-27 16:07:06 UTC) #13
Evan Stade
lgtm https://codereview.chromium.org/2095873004/diff/40001/ui/views/animation/ink_drop_host_view.cc File ui/views/animation/ink_drop_host_view.cc (right): https://codereview.chromium.org/2095873004/diff/40001/ui/views/animation/ink_drop_host_view.cc#newcode179 ui/views/animation/ink_drop_host_view.cc:179: // Don't transtion the ink-drop to a "pending" ...
4 years, 5 months ago (2016-06-27 16:42:52 UTC) #14
kylix_rd
I moved sky@ to the CC who deferred to estade@. TBR'd bruthig@ who is OOO.
4 years, 5 months ago (2016-06-27 16:50:02 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2095873004/60001
4 years, 5 months ago (2016-06-27 17:42:17 UTC) #20
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 5 months ago (2016-06-27 18:48:49 UTC) #22
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/d480e04cbde45c22342599468c3081f586b4523c Cr-Commit-Position: refs/heads/master@{#402239}
4 years, 5 months ago (2016-06-27 18:52:01 UTC) #24
bruthig
https://codereview.chromium.org/2095873004/diff/60001/ui/views/animation/ink_drop_host_view.cc File ui/views/animation/ink_drop_host_view.cc (right): https://codereview.chromium.org/2095873004/diff/60001/ui/views/animation/ink_drop_host_view.cc#newcode178 ui/views/animation/ink_drop_host_view.cc:178: if (event && event->IsGestureEvent()) { This would definitely benefit ...
4 years, 5 months ago (2016-06-30 00:23:11 UTC) #26
kylix_rd
https://codereview.chromium.org/2095873004/diff/60001/ui/views/animation/ink_drop_host_view.cc File ui/views/animation/ink_drop_host_view.cc (right): https://codereview.chromium.org/2095873004/diff/60001/ui/views/animation/ink_drop_host_view.cc#newcode189 ui/views/animation/ink_drop_host_view.cc:189: ink_drop_->GetTargetInkDropState() == InkDropState::HIDDEN) On 2016/06/30 00:23:11, bruthig wrote: > ...
4 years, 5 months ago (2016-06-30 13:39:37 UTC) #27
bruthig
https://codereview.chromium.org/2095873004/diff/60001/ui/views/animation/ink_drop_host_view.cc File ui/views/animation/ink_drop_host_view.cc (right): https://codereview.chromium.org/2095873004/diff/60001/ui/views/animation/ink_drop_host_view.cc#newcode189 ui/views/animation/ink_drop_host_view.cc:189: ink_drop_->GetTargetInkDropState() == InkDropState::HIDDEN) On 2016/06/30 13:39:37, kylix_rd wrote: > ...
4 years, 5 months ago (2016-06-30 17:21:49 UTC) #28
kylix_rd
https://codereview.chromium.org/2095873004/diff/60001/ui/views/animation/ink_drop_host_view.cc File ui/views/animation/ink_drop_host_view.cc (right): https://codereview.chromium.org/2095873004/diff/60001/ui/views/animation/ink_drop_host_view.cc#newcode178 ui/views/animation/ink_drop_host_view.cc:178: if (event && event->IsGestureEvent()) { On 2016/06/30 00:23:11, bruthig ...
4 years, 5 months ago (2016-06-30 17:31:25 UTC) #29
bruthig
https://codereview.chromium.org/2095873004/diff/60001/ui/views/animation/ink_drop_host_view.cc File ui/views/animation/ink_drop_host_view.cc (right): https://codereview.chromium.org/2095873004/diff/60001/ui/views/animation/ink_drop_host_view.cc#newcode178 ui/views/animation/ink_drop_host_view.cc:178: if (event && event->IsGestureEvent()) { On 2016/06/30 17:31:25, kylix_rd ...
4 years, 5 months ago (2016-06-30 17:35:36 UTC) #30
kylix_rd
On 2016/06/30 17:35:36, bruthig wrote: > https://codereview.chromium.org/2095873004/diff/60001/ui/views/animation/ink_drop_host_view.cc > File ui/views/animation/ink_drop_host_view.cc (right): > > https://codereview.chromium.org/2095873004/diff/60001/ui/views/animation/ink_drop_host_view.cc#newcode178 > ...
4 years, 5 months ago (2016-06-30 18:27:58 UTC) #31
bruthig
4 years, 5 months ago (2016-07-01 14:18:57 UTC) #32
Message was sent while issue was closed.
On 2016/06/30 18:27:58, kylix_rd wrote:
> On 2016/06/30 17:35:36, bruthig wrote:
> >
>
https://codereview.chromium.org/2095873004/diff/60001/ui/views/animation/ink_...
> > File ui/views/animation/ink_drop_host_view.cc (right):
> > 
> >
>
https://codereview.chromium.org/2095873004/diff/60001/ui/views/animation/ink_...
> > ui/views/animation/ink_drop_host_view.cc:178: if (event &&
> > event->IsGestureEvent()) {
> > On 2016/06/30 17:31:25, kylix_rd wrote:
> > > On 2016/06/30 00:23:11, bruthig wrote:
> > > > This would definitely benefit from some tests.
> > > 
> > > I presume you're referring to the whole block and not just the above test?
> > 
> > Correct, but at least the number of test cases required should be reduced
with
> > the simplified logic.
> > 
> >
>
https://codereview.chromium.org/2095873004/diff/60001/ui/views/animation/ink_...
> > ui/views/animation/ink_drop_host_view.cc:189:
> ink_drop_->GetTargetInkDropState()
> > == InkDropState::HIDDEN)
> > On 2016/06/30 17:31:25, kylix_rd wrote:
> > > On 2016/06/30 17:21:49, bruthig wrote:
> > > > > > After thinking about this a bit more, does the following logic
> simplify
> > > > > things? 
> > > > > > Essentially we would only prevent ripples from transitioning from
> HIDDEN
> > > to
> > > > > > visible on gesture events, unless it is an ACTIVATED state.
> > > > > > 
> > > > > > if (event &&
> > > > > >     event->IsGestureEvent() &&
> > > > > >     ink_drop_->GetTargetInkDropState() == HIDDEN &&
> > > > > >     state != ACTIVATED) {
> > > > > >   return;
> > > > > > }
> > > > > 
> > > > > What about DEACTIVATED? Would you not still want to allow that through
> as
> > > > well?
> > > > > At least according to the comments in ink_drop_state.h.
> > > > 
> > > > The DEACTIVATED animations should all make it through because the
> > > > ink_drop_->GetTargetInkDropState() should never be HIDDEN when a request
> for
> > > > DEACTIVED happens. i.e. the DEACTIVATED state should be preceded by an
> > > ACTIVATED
> > > > state and the ACTIVATED animations are shown for gestures.  Even if we
> > somehow
> > > > got a request to show the DEACTIVATED animation when
> GetTargetInkDropState()
> > > is
> > > > HIDDEN, I think it would be reasonable to not show it.
> > > 
> > > Aside from this logic being a little more complicated than necessary, are
> > there
> > > any cases not taken into account?
> > 
> > Nothing specific to this CL that I can think of.  There are still problems
> with
> > multiple input sources interacting with a View but that is definitely
outside
> > the scope of this change.
> > 
> > > 
> > > Either way, I can create a new CL with your suggestions.
> > 
> > Awesome, thanks :)  Sorry I wasn't more on the ball earlier.
> 
> Do you have any objections to this code going out in M53. I can get the tests
> written and the logic tweaked by late next week (U.S. Holidays on 4th & 5th).
> The expected M53 branch, however, is tomorrow. Otherwise, I'll need to get it
> merged over to the branch.

This is quite a small change and since branch point just happened.  It probably
makes sense to merge your fixes back.

Powered by Google App Engine
This is Rietveld 408576698