Bug 1160014 part 3 - Backout code from bug 634586. r=jimm

The code was for improving fullscreen transition. However, it doesn't seem to
be an improvment anymore. Instead, it causes various bugs like bug 649067,
bug 646374, bug 1053783. Also see bug 634586 comment 33 which shows that this
code causes performance issue on slow machine. According to my test, removing
this code could improve the speed switching to fullscreen from normal mode.
This commit is contained in:
Xidorn Quan 2015-07-11 10:08:59 +10:00
parent ca6c7c1ec6
commit bd2a74a405

View File

@ -2875,26 +2875,16 @@ nsWindow::MakeFullScreen(bool aFullScreen, nsIScreen* aTargetScreen)
// If we are going fullscreen, the window size continues to change
// and the window will be reflow again then.
UpdateNonClientMargins(mSizeMode, /* Reflow */ !aFullScreen);
bool visible = mIsVisible;
if (mOldSizeMode == nsSizeMode_Normal)
Show(false);
// Will call hide chrome, reposition window. Note this will
// also cache dimensions for restoration, so it should only
// be called once per fullscreen request.
nsresult rv = nsBaseWidget::MakeFullScreen(aFullScreen, aTargetScreen);
if (visible) {
Show(true);
Invalidate();
if (!aFullScreen && mOldSizeMode == nsSizeMode_Normal) {
// Ensure the window exiting fullscreen get activated. Window
// activation was bypassed by SetSizeMode, and hiding window for
// transition could also blur the current window.
DispatchFocusToTopLevelWindow(true);
}
if (mIsVisible && !aFullScreen && mOldSizeMode == nsSizeMode_Normal) {
// Ensure the window exiting fullscreen get activated. Window
// activation might be bypassed in SetSizeMode.
DispatchFocusToTopLevelWindow(true);
}
// Notify the taskbar that we have exited full screen mode.