Commit c1207e6e authored by erikchen's avatar erikchen Committed by Commit bot

mac: Fix a logic error in presentation_mode_controller.

The method -shouldShowMenubarInImmersiveFullscreen failed to take into
consideration whether the screen containing the window had a menu bar.

BUG=NONE
TEST=On OSX 10.9 or OSX 10.10, set the screensHaveSeparateSpaces setting to NO.
On a second monitor, fullscreen a youtube video. Move the mouse to the top of
screen. The tabstrip should appear, and should not have extra space for a menu
bar. Prior to this CL, there would be extra space for a non-existent menu bar.

Review URL: https://codereview.chromium.org/645643004

Cr-Commit-Position: refs/heads/master@{#299011}
parent ab8d5b55
......@@ -180,8 +180,8 @@ OSStatus MenuBarRevealHandler(EventHandlerCallRef handler,
- (void)showActiveWindowUI;
- (void)hideActiveWindowUI;
// In Immersive Fullscreen, the menubar is visible iff. toolbarFraction_ >=
// 1.0.
// Whether the menu bar should be shown in immersive fullscreen for the screen
// that contains the window.
- (BOOL)shouldShowMenubarInImmersiveFullscreen;
@end
......@@ -745,7 +745,7 @@ OSStatus MenuBarRevealHandler(EventHandlerCallRef handler,
}
- (BOOL)shouldShowMenubarInImmersiveFullscreen {
return toolbarFraction_ >= 1.0;
return [self doesScreenHaveMenuBar] && toolbarFraction_ > 0.99;
}
@end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment