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-13 20:44:36 +10:00
parent bb3b5284af
commit af90cc112e

View File

@ -2876,26 +2876,16 @@ nsWindow::MakeFullScreen(bool aFullScreen, nsIScreen* aTargetScreen)
// 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) {
if (mIsVisible && !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.
// activation might be bypassed in SetSizeMode.
DispatchFocusToTopLevelWindow(true);
}
}
// Notify the taskbar that we have exited full screen mode.
if (!aFullScreen && taskbarInfo) {