call base SetAspectRatio in NativeWindowMac implementation

This commit is contained in:
leethomas 2016-05-22 17:22:57 -07:00
parent ac6e4aff5e
commit 09de0c2766

View file

@ -708,12 +708,13 @@ bool NativeWindowMac::IsResizable() {
void NativeWindowMac::SetAspectRatio(double aspect_ratio,
const gfx::Size& extra_size) {
NativeWindow::SetAspectRatio(aspect_ratio, 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();