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

Issue 1566313002: Remove layout during paint in Tab (Closed)

Created:
4 years, 11 months ago by enne (OOO)
Modified:
4 years, 11 months ago
Reviewers:
miu, sky
CC:
chromium-reviews, danakj, miu+watch_chromium.org, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove layout during paint in Tab I am trying to separate out changing compositor layer sizes in the middle of paint. Blink no longer does this at all, and this appears to be one (or the only) remaining place that continues to do this. In order to support this, the compositor has to have some confusing logic to keep around several values and pick the real one that I'd like to remove. (See: strict property checking in cc) It appears that icons and media indicators will get a layout the next time Tab::SetData is called, so does not need to be re-checked during paint. The close button is not the same (which may be hidden in cases where only the active tab shows it) and so needs to be checked in ActiveStateChanged. R=sky@chromium.org,miu@chromium.org Committed: https://crrev.com/7624ce8b98f34253f57889ed41a30a6bbf2a5bb5 Cr-Commit-Position: refs/heads/master@{#369551}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Unconditionally call layout in ActiveStateChanged #

Total comments: 2

Patch Set 3 : Fix tests #

Patch Set 4 : Remove extraneous changes #

Total comments: 8

Patch Set 5 : Add new function to Tab instead of calling Layout #

Patch Set 6 : With sky's changes to fake controller #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -26 lines) Patch
M chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.cc View 1 2 3 4 5 1 chunk +5 lines, -1 line 0 comments Download
M chrome/browser/ui/views/tabs/tab.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/tabs/tab.cc View 1 2 chunks +2 lines, -10 lines 0 comments Download
M chrome/browser/ui/views/tabs/tab_strip.cc View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/tabs/tab_strip_unittest.cc View 1 2 5 chunks +0 lines, -15 lines 0 comments Download

Messages

Total messages: 30 (5 generated)
enne (OOO)
4 years, 11 months ago (2016-01-08 00:05:11 UTC) #1
miu
Mostly looks good. However, one important consideration: https://codereview.chromium.org/1566313002/diff/1/chrome/browser/ui/views/tabs/tab.cc File chrome/browser/ui/views/tabs/tab.cc (right): https://codereview.chromium.org/1566313002/diff/1/chrome/browser/ui/views/tabs/tab.cc#newcode549 chrome/browser/ui/views/tabs/tab.cc:549: if (ShouldShowCloseBox() ...
4 years, 11 months ago (2016-01-08 00:25:39 UTC) #2
enne (OOO)
https://codereview.chromium.org/1566313002/diff/1/chrome/browser/ui/views/tabs/tab.cc File chrome/browser/ui/views/tabs/tab.cc (right): https://codereview.chromium.org/1566313002/diff/1/chrome/browser/ui/views/tabs/tab.cc#newcode549 chrome/browser/ui/views/tabs/tab.cc:549: if (ShouldShowCloseBox() != showing_close_button_) On 2016/01/08 at 00:25:39, miu ...
4 years, 11 months ago (2016-01-08 01:46:25 UTC) #3
miu
lgtm
4 years, 11 months ago (2016-01-08 07:13:30 UTC) #4
sky
In general how are you going to ensure no one attempts to change the layer ...
4 years, 11 months ago (2016-01-08 16:40:32 UTC) #5
enne (OOO)
On 2016/01/08 at 16:40:32, sky wrote: > In general how are you going to ensure ...
4 years, 11 months ago (2016-01-08 18:22:28 UTC) #6
sky
Ok, LGTM
4 years, 11 months ago (2016-01-08 18:24:51 UTC) #7
sky
By which I mean I missed miu's reasoning, which looks right.
4 years, 11 months ago (2016-01-08 18:25:09 UTC) #8
enne (OOO)
Thanks. :)
4 years, 11 months ago (2016-01-08 18:25:44 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1566313002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1566313002/20001
4 years, 11 months ago (2016-01-08 18:25:58 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/149884) linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, ...
4 years, 11 months ago (2016-01-08 18:52:44 UTC) #13
enne (OOO)
Oops, my apologies for not fixing these tests first. I thought they'd be in views_unittests, ...
4 years, 11 months ago (2016-01-12 21:16:06 UTC) #14
sky
As to the test failure. What specific part of the test are you referring to ...
4 years, 11 months ago (2016-01-12 22:29:11 UTC) #15
enne (OOO)
On 2016/01/12 at 22:29:11, sky wrote: > As to the test failure. What specific part ...
4 years, 11 months ago (2016-01-12 22:36:29 UTC) #16
sky
https://codereview.chromium.org/1566313002/diff/60001/chrome/browser/ui/views/tabs/tab_strip.cc File chrome/browser/ui/views/tabs/tab_strip.cc (right): https://codereview.chromium.org/1566313002/diff/60001/chrome/browser/ui/views/tabs/tab_strip.cc#newcode733 chrome/browser/ui/views/tabs/tab_strip.cc:733: tab_at(i)->Layout(); On 2016/01/12 22:36:28, enne wrote: > On 2016/01/12 ...
4 years, 11 months ago (2016-01-12 22:41:02 UTC) #17
sky
On 2016/01/12 22:41:02, sky wrote: > https://codereview.chromium.org/1566313002/diff/60001/chrome/browser/ui/views/tabs/tab_strip.cc > File chrome/browser/ui/views/tabs/tab_strip.cc (right): > > https://codereview.chromium.org/1566313002/diff/60001/chrome/browser/ui/views/tabs/tab_strip.cc#newcode733 > ...
4 years, 11 months ago (2016-01-12 22:47:41 UTC) #18
enne (OOO)
On 2016/01/12 at 22:47:41, sky wrote: > On 2016/01/12 22:41:02, sky wrote: > > https://codereview.chromium.org/1566313002/diff/60001/chrome/browser/ui/views/tabs/tab_strip.cc ...
4 years, 11 months ago (2016-01-12 22:54:54 UTC) #19
sky
https://codereview.chromium.org/1566313002/diff/60001/chrome/browser/ui/views/tabs/tab_strip.cc File chrome/browser/ui/views/tabs/tab_strip.cc (right): https://codereview.chromium.org/1566313002/diff/60001/chrome/browser/ui/views/tabs/tab_strip.cc#newcode1149 chrome/browser/ui/views/tabs/tab_strip.cc:1149: int old_active = controller_->GetActiveIndex(); On 2016/01/12 22:54:54, enne wrote: ...
4 years, 11 months ago (2016-01-13 00:41:09 UTC) #20
enne (OOO)
On 2016/01/13 at 00:41:09, sky wrote: > https://codereview.chromium.org/1566313002/diff/60001/chrome/browser/ui/views/tabs/tab_strip.cc > File chrome/browser/ui/views/tabs/tab_strip.cc (right): > > https://codereview.chromium.org/1566313002/diff/60001/chrome/browser/ui/views/tabs/tab_strip.cc#newcode1149 ...
4 years, 11 months ago (2016-01-13 21:44:12 UTC) #21
sky
On 2016/01/13 21:44:12, enne wrote: > On 2016/01/13 at 00:41:09, sky wrote: > > > ...
4 years, 11 months ago (2016-01-14 04:05:27 UTC) #22
enne (OOO)
Thank you so much. I didn't mean for you to just hand me a patch. ...
4 years, 11 months ago (2016-01-14 18:02:18 UTC) #23
sky
LGTM - I wasn't sure how involved the test change was, so I poked at ...
4 years, 11 months ago (2016-01-14 20:38:24 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1566313002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1566313002/100001
4 years, 11 months ago (2016-01-14 20:44:32 UTC) #27
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 11 months ago (2016-01-14 21:42:51 UTC) #28
commit-bot: I haz the power
4 years, 11 months ago (2016-01-14 22:03:41 UTC) #30
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/7624ce8b98f34253f57889ed41a30a6bbf2a5bb5
Cr-Commit-Position: refs/heads/master@{#369551}

Powered by Google App Engine
This is Rietveld 408576698