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

Issue 2743743003: GridLayout: Guard against layout queries while adding a view. (Closed)

Created:
3 years, 9 months ago by tapted
Modified:
3 years, 9 months ago
Reviewers:
Peter Kasting
CC:
chromium-reviews, tfarina, chrome-apps-syd-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

GridLayout: Guard against layout queries while adding a view. Adds a DCHECK to GridLayout to ensure client code doesn't ask it to perform layout calculations while inside GridLayout::AddViewState(). GridLayout has not yet updated its internal data structures, so it can only give invalid results at this point. Adds a BrowserDialogTest for the edit bookmark view which would have triggered this DCHECK without the fix in r455438. Adds a DCHECK_DEATH test for GridLayout. BUG=699912, 699390 Review-Url: https://codereview.chromium.org/2743743003 Cr-Commit-Position: refs/heads/master@{#456638} Committed: https://chromium.googlesource.com/chromium/src/+/4d775162580774ccfaed86a8dcf2ac6564198d93

Patch Set 1 #

Patch Set 2 : Add tests #

Patch Set 3 : selfnits #

Patch Set 4 : Rebase for BUILD.gn conflict #

Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -0 lines) Patch
A chrome/browser/ui/views/bookmarks/bookmark_editor_view_browsertest.cc View 1 2 1 chunk +30 lines, -0 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/layout/grid_layout.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M ui/views/layout/grid_layout_unittest.cc View 1 2 3 chunks +56 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (21 generated)
tapted
Hi Peter, please take a look
3 years, 9 months ago (2017-03-13 06:19:00 UTC) #16
Peter Kasting
LGTM The only thing I don't love about this is explicitly testing for the DCHECK ...
3 years, 9 months ago (2017-03-13 22:40:00 UTC) #17
tapted
On 2017/03/13 22:40:00, Peter Kasting wrote: > LGTM > > The only thing I don't ...
3 years, 9 months ago (2017-03-14 00:57:46 UTC) #18
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/2743743003/40001
3 years, 9 months ago (2017-03-14 00:58:13 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/384519)
3 years, 9 months ago (2017-03-14 01:07:58 UTC) #22
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/2743743003/60001
3 years, 9 months ago (2017-03-14 05:40:28 UTC) #25
commit-bot: I haz the power
3 years, 9 months ago (2017-03-14 06:42:32 UTC) #28
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/4d775162580774ccfaed86a8dcf2...

Powered by Google App Engine
This is Rietveld 408576698