This commit is contained in:
leethomas 2016-05-22 17:00:14 -07:00
parent 7aaf974362
commit ac6e4aff5e

View file

@ -709,6 +709,11 @@ bool NativeWindowMac::IsResizable() {
void NativeWindowMac::SetAspectRatio(double aspect_ratio,
const gfx::Size& extra_size) {
// We can't just pass the aspect ratio to Cocoa, since our API receives
// it as a float, and Cocoa expects an NSRect with explicit width & height
// arguments. Instead we derive those args ourselves from the given aspect
// ratio.
gfx::Size windowSize = this->GetSize();
gfx::Size contentSize = this->GetContentSize();