DescriptionMacViews: 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 #
Messages
Total messages: 12 (0 generated)
|