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

Issue 2502813003: MacViews: Set initial window size constraints in OnWidgetInitDone rather than OnRootViewLayout. (Closed)

Created:
4 years, 1 month ago by tapted
Modified:
4 years, 1 month ago
Reviewers:
karandeepb
CC:
chromium-reviews, tfarina, mac-reviews_chromium.org, chrome-apps-syd-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MacViews: Set initial window size constraints in OnWidgetInitDone rather than OnRootViewLayout. OnWidgetInitDone() didn't exist when size constraints were implemented for MacViews. The non-client view is added immediately *after* the call NativeWidget*::InitNativeWidget() so, to ensure size constraints correctly accounted for size constraints from the NonClientView, it was necessary to update them in OnRootViewLayout(). However, this is called a lot, and gfx::ApplyNSWindowSizeConstraints(..) is surprisingly CPU intensive within AppKit code. OnWidgetInitDone() is a much better place for applying size constraints from the non-client view. It was introduced in r368141 specifically to fix problems synchronising with the client area size. BUG=665280 TEST=Covered by existing tests. Committed: https://crrev.com/8a4c12c91010469d7f39332b5d54e61583b5ca4d Cr-Commit-Position: refs/heads/master@{#432821}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -6 lines) Patch
M ui/views/widget/native_widget_mac.mm View 2 chunks +4 lines, -6 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 19 (11 generated)
tapted
Hi Karan, please take a look.
4 years, 1 month ago (2016-11-15 04:03:59 UTC) #7
karandeepb
On 2016/11/15 04:03:59, tapted wrote: > Hi Karan, please take a look. Some thoughts/questions- 1) ...
4 years, 1 month ago (2016-11-16 06:30:16 UTC) #10
karandeepb
On 2016/11/16 06:30:16, karandeepb wrote: > On 2016/11/15 04:03:59, tapted wrote: > > Hi Karan, ...
4 years, 1 month ago (2016-11-16 06:30:43 UTC) #11
tapted
On 2016/11/16 06:30:43, karandeepb wrote: > On 2016/11/16 06:30:16, karandeepb wrote: > > On 2016/11/15 ...
4 years, 1 month ago (2016-11-17 07:56:36 UTC) #12
karandeepb
LGTM.
4 years, 1 month ago (2016-11-17 08:24:55 UTC) #13
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/2502813003/1
4 years, 1 month ago (2016-11-17 08:26:50 UTC) #15
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 1 month ago (2016-11-17 09:05:38 UTC) #17
commit-bot: I haz the power
4 years, 1 month ago (2016-11-17 09:08:19 UTC) #19
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/8a4c12c91010469d7f39332b5d54e61583b5ca4d
Cr-Commit-Position: refs/heads/master@{#432821}

Powered by Google App Engine
This is Rietveld 408576698