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

Issue 2709283002: Avoid to change layer type in InkDropHostView::AddInkDropLayer (Closed)

Created:
3 years, 10 months ago by yiyix
Modified:
3 years, 10 months ago
Reviewers:
sky
CC:
chromium-reviews, tfarina, bruthig+ink_drop_chromium.org, dcheng, varkha, bruthig
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoid to change layer type in InkDropHostView::AddInkDropLayer Driving by the fact that the layer type of a view can be changed after landing cl https://codereview.chromium.org/2639203007. It's possible that classes that extends InkDropHostView (ex: Button) created a LAYER_SOLID_COLOR S as its layer type, then by calling InkDropHostView::AddInkDropLayer, S is destroyed and a new LAYER_TEXTURED T is created by calling "SetPaintToLayer();". Add check such that no new layer is created if the view has a layer already. BUG=680536 Review-Url: https://codereview.chromium.org/2709283002 Cr-Commit-Position: refs/heads/master@{#453067} Committed: https://chromium.googlesource.com/chromium/src/+/49f6290b07b97c200fbf8737be29107ca99f923e

Patch Set 1 #

Total comments: 2

Patch Set 2 : add comments #

Total comments: 2

Patch Set 3 : change approach #

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

Messages

Total messages: 22 (9 generated)
yiyix
@sky, could you please review this change?
3 years, 10 months ago (2017-02-22 20:52:23 UTC) #4
sky
https://codereview.chromium.org/2709283002/diff/1/ui/views/animation/ink_drop_host_view.cc File ui/views/animation/ink_drop_host_view.cc (right): https://codereview.chromium.org/2709283002/diff/1/ui/views/animation/ink_drop_host_view.cc#newcode129 ui/views/animation/ink_drop_host_view.cc:129: DCHECK(!layer() || layer()->type() == ui::LAYER_TEXTURED); Please add a comment ...
3 years, 10 months ago (2017-02-22 21:29:49 UTC) #5
yiyix
@sky, could you please take another look? Thank you very much https://codereview.chromium.org/2709283002/diff/1/ui/views/animation/ink_drop_host_view.cc File ui/views/animation/ink_drop_host_view.cc (right): ...
3 years, 10 months ago (2017-02-22 23:15:39 UTC) #7
sky
https://codereview.chromium.org/2709283002/diff/20001/ui/views/animation/ink_drop_host_view.cc File ui/views/animation/ink_drop_host_view.cc (right): https://codereview.chromium.org/2709283002/diff/20001/ui/views/animation/ink_drop_host_view.cc#newcode132 ui/views/animation/ink_drop_host_view.cc:132: SetPaintToLayer(); Is this the problematic line? If we only ...
3 years, 10 months ago (2017-02-23 00:58:35 UTC) #8
yiyix
On 2017/02/23 00:58:35, sky wrote: > https://codereview.chromium.org/2709283002/diff/20001/ui/views/animation/ink_drop_host_view.cc > File ui/views/animation/ink_drop_host_view.cc (right): > > https://codereview.chromium.org/2709283002/diff/20001/ui/views/animation/ink_drop_host_view.cc#newcode132 > ...
3 years, 10 months ago (2017-02-23 23:05:10 UTC) #9
sky
https://codereview.chromium.org/2709283002/diff/20001/ui/views/animation/ink_drop_host_view.cc File ui/views/animation/ink_drop_host_view.cc (right): https://codereview.chromium.org/2709283002/diff/20001/ui/views/animation/ink_drop_host_view.cc#newcode132 ui/views/animation/ink_drop_host_view.cc:132: SetPaintToLayer(); On 2017/02/23 00:58:35, sky wrote: > Is this ...
3 years, 10 months ago (2017-02-24 00:58:44 UTC) #10
sky
On 2017/02/24 00:58:44, sky wrote: > https://codereview.chromium.org/2709283002/diff/20001/ui/views/animation/ink_drop_host_view.cc > File ui/views/animation/ink_drop_host_view.cc (right): > > https://codereview.chromium.org/2709283002/diff/20001/ui/views/animation/ink_drop_host_view.cc#newcode132 > ...
3 years, 10 months ago (2017-02-24 01:02:56 UTC) #11
yiyix
On 2017/02/24 00:58:44, sky wrote: > https://codereview.chromium.org/2709283002/diff/20001/ui/views/animation/ink_drop_host_view.cc > File ui/views/animation/ink_drop_host_view.cc (right): > > https://codereview.chromium.org/2709283002/diff/20001/ui/views/animation/ink_drop_host_view.cc#newcode132 > ...
3 years, 10 months ago (2017-02-24 18:50:31 UTC) #12
yiyix
On 2017/02/24 01:02:56, sky wrote: > On 2017/02/24 00:58:44, sky wrote: > > > https://codereview.chromium.org/2709283002/diff/20001/ui/views/animation/ink_drop_host_view.cc ...
3 years, 10 months ago (2017-02-24 18:51:44 UTC) #13
yiyix
@sky, could you take another look? Thank you
3 years, 10 months ago (2017-02-24 20:57:09 UTC) #16
sky
LGTM
3 years, 10 months ago (2017-02-24 21:28:26 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/2709283002/40001
3 years, 10 months ago (2017-02-25 03:44:50 UTC) #19
commit-bot: I haz the power
3 years, 10 months ago (2017-02-25 04:33:19 UTC) #22
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/49f6290b07b97c200fbf8737be29...

Powered by Google App Engine
This is Rietveld 408576698