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

Issue 21967002: UpdateWindowTitle before SetInitialBounds in Widget::Init. (Closed)

Created:
7 years, 4 months ago by msw
Modified:
7 years, 4 months ago
CC:
chromium-reviews, tfarina, Ben Goodger (Google), sadrul
Visibility:
Public.

Description

UpdateWindowTitle before SetInitialBounds in Widget::Init. Reverse the ordering of these Widget::Init operations. BubbleFrameView uses title/close presence for sizing. (requires title/close to be set before bounds init) DialogDelegate::CreateNewStyleFrameView did this explicitly. (that changed in http://crrev.com/214637, seems less hacky) Add a unit test, and cleanup a related test. BUG=267343 TEST=Dialogs are sized properly, especially non-tab/content-modal dialogs (add wifi, import lock, screen sharing, etc.); see the bug and its dups for examples. R=sky@chromium.org,ben@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=215805

Patch Set 1 #

Patch Set 2 : Add a comment and a dialog unit test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -25 lines) Patch
M ui/views/widget/widget.cc View 1 1 chunk +3 lines, -1 line 0 comments Download
M ui/views/window/dialog_delegate_unittest.cc View 1 3 chunks +48 lines, -24 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
msw
Hey Ben and Scott, please take a look; thanks! I think ordering UpdateWindowTitle nearer to ...
7 years, 4 months ago (2013-08-02 22:12:20 UTC) #1
sky
Please add a comment describing UpdateWindowTitle() needs to be before setting bounds as well as ...
7 years, 4 months ago (2013-08-05 16:34:11 UTC) #2
msw
On 2013/08/05 16:34:11, sky wrote: > Please add a comment describing UpdateWindowTitle() needs to be ...
7 years, 4 months ago (2013-08-05 23:11:41 UTC) #3
sky
LGTM - it would be nice to have a test that doesn't depend upon the ...
7 years, 4 months ago (2013-08-06 00:03:40 UTC) #4
msw
On 2013/08/06 00:03:40, sky wrote: > LGTM - it would be nice to have a ...
7 years, 4 months ago (2013-08-06 00:12:59 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/21967002/27001
7 years, 4 months ago (2013-08-06 00:38:30 UTC) #6
commit-bot: I haz the power
Change committed as 215805
7 years, 4 months ago (2013-08-06 05:46:27 UTC) #7
sky
7 years, 4 months ago (2013-08-06 14:21:36 UTC) #8
I was thinking more of a test that didn't rely on frame style at all.
By that I mean a test that created custom views and overrode
GetPreferredSize based on title.

On Mon, Aug 5, 2013 at 5:12 PM,  <msw@chromium.org> wrote:
> On 2013/08/06 00:03:40, sky wrote:
>>
>> LGTM - it would be nice to have a test that doesn't depend upon the new
>> style,
>> but I'm ok with this.
>
>
> Unfortunately the old style's frame has the same size regardless of the
> title
> presence. I could check that the title is set in a new
> TestBubbleFrameView::GetPreferredSize subclass override, but I thought that
> seemed a bit overkill. Would you like me to try that or some other approach?
>
> https://codereview.chromium.org/21967002/

Powered by Google App Engine
This is Rietveld 408576698