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

Issue 353643002: MacViews: Implement Set/Get*Bounds for NativeWidgetMac (Closed)

Created:
6 years, 6 months ago by tapted
Modified:
6 years, 6 months ago
Reviewers:
Robert Sesek, Andre, sky
CC:
chromium-reviews, tfarina, ben+views_chromium.org, tdanderson+views_chromium.org, chrome-apps-syd-reviews_chromium.org, mac-views-reviews_chromium.org
Project:
chromium
Visibility:
Public.

Description

MacViews: Implement Set/Get*Bounds for NativeWidgetMac. In toolkit-views, "Bounds" corresponds to the NSWindow frame (including titlebar and borders). This CL maps that onto NSWindow in InitNativeWidget, GetWindowBoundsInScreen, GetClientAreaBoundsInScreen, SetBounds and SetSize, performing the required coordinate system conversions. 5 more views_unittests pass after this: BubbleDelegateTest.NonClientHitTest CustomFrameViewTest.{CannotMaximizeHidesButton, DefaultButtonLayout, LeadingButtonLayout}, ViewTest.ConversionsToFromScreen. The CL also adds a cross-platform WidgetTest.GetWindowBoundsInScreen to ensure the behavior is consistent across platforms, and because there wasn't really anything to cover just bounds setting (e.g. to verify the coordinate flipping Cocoa needs to do). BUG=378134 TEST=views_unittests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=279975 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=280005

Patch Set 1 #

Patch Set 2 : git-cl-format #

Patch Set 3 : Refine #

Total comments: 8

Patch Set 4 : rebase:no-op? #

Patch Set 5 : Fix origin for SetSize, respond to comments #

Patch Set 6 : import Foundation.h for NSRect #

Unified diffs Side-by-side diffs Delta from patch set Stats (+172 lines, -16 lines) Patch
M ui/gfx/gfx.gyp View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
A ui/gfx/mac/coordinate_conversion.h View 1 2 3 4 5 1 chunk +26 lines, -0 lines 0 comments Download
A ui/gfx/mac/coordinate_conversion.mm View 1 2 3 4 1 chunk +37 lines, -0 lines 0 comments Download
M ui/views/widget/native_widget_mac.mm View 1 2 3 4 5 chunks +48 lines, -16 lines 0 comments Download
M ui/views/widget/widget_unittest.cc View 1 2 3 4 1 chunk +59 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
tapted
Hi Robert and Scott, please take a look. Note that on aura, client area bounds ...
6 years, 6 months ago (2014-06-25 10:55:56 UTC) #1
sky
LGTM https://codereview.chromium.org/353643002/diff/80001/ui/gfx/mac/point_utils.h File ui/gfx/mac/point_utils.h (right): https://codereview.chromium.org/353643002/diff/80001/ui/gfx/mac/point_utils.h#newcode26 ui/gfx/mac/point_utils.h:26: #endif // UI_GFX_MAC_POINT_UTILS_H_ On 2014/06/25 10:55:56, tapted wrote: ...
6 years, 6 months ago (2014-06-25 16:52:22 UTC) #2
Robert Sesek
LGTM https://codereview.chromium.org/353643002/diff/80001/ui/gfx/mac/point_utils.h File ui/gfx/mac/point_utils.h (right): https://codereview.chromium.org/353643002/diff/80001/ui/gfx/mac/point_utils.h#newcode5 ui/gfx/mac/point_utils.h:5: #ifndef UI_GFX_MAC_POINT_UTILS_H_ Tests for these functions would be ...
6 years, 6 months ago (2014-06-25 17:06:05 UTC) #3
Andre
https://codereview.chromium.org/353643002/diff/80001/ui/views/widget/native_widget_mac.mm File ui/views/widget/native_widget_mac.mm (right): https://codereview.chromium.org/353643002/diff/80001/ui/views/widget/native_widget_mac.mm#newcode242 ui/views/widget/native_widget_mac.mm:242: NSRect content_rect = [window contentRectForFrameRect:frame_rect]; Isn't this supposed to ...
6 years, 6 months ago (2014-06-25 17:59:51 UTC) #4
tapted
Thanks all! https://codereview.chromium.org/353643002/diff/80001/ui/gfx/mac/point_utils.h File ui/gfx/mac/point_utils.h (right): https://codereview.chromium.org/353643002/diff/80001/ui/gfx/mac/point_utils.h#newcode5 ui/gfx/mac/point_utils.h:5: #ifndef UI_GFX_MAC_POINT_UTILS_H_ On 2014/06/25 17:06:04, rsesek wrote: ...
6 years, 6 months ago (2014-06-26 08:44:32 UTC) #5
tapted
The CQ bit was checked by tapted@chromium.org
6 years, 6 months ago (2014-06-26 08:45:05 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tapted@chromium.org/353643002/140001
6 years, 6 months ago (2014-06-26 08:46:59 UTC) #7
commit-bot: I haz the power
Change committed as 279975
6 years, 6 months ago (2014-06-26 10:04:25 UTC) #8
tapted
A revert of this CL has been created in https://codereview.chromium.org/351603004/ by tapted@chromium.org. The reason for ...
6 years, 6 months ago (2014-06-26 10:23:34 UTC) #9
tapted
The CQ bit was checked by tapted@chromium.org
6 years, 6 months ago (2014-06-26 12:38:32 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tapted@chromium.org/353643002/220001
6 years, 6 months ago (2014-06-26 12:39:57 UTC) #11
commit-bot: I haz the power
6 years, 6 months ago (2014-06-26 14:37:26 UTC) #12
Message was sent while issue was closed.
Change committed as 280005

Powered by Google App Engine
This is Rietveld 408576698