author | Markus Stange <mstange@themasta.com> |
Thu, 13 Mar 2014 13:21:56 +0100 | |
changeset 173408 | 0daba7f5bcf763af075a4758f1a69f6c479a838f |
parent 173407 | 7f90960c05da0ad96b6e8e81a024cf58ef3641dc |
child 173409 | ae9df661d3a4770db82371356363eadba2e64524 |
push id | 26403 |
push user | ryanvm@gmail.com |
push date | Thu, 13 Mar 2014 19:32:04 +0000 |
treeherder | mozilla-central@fe40387eba1a [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | smichaud |
bugs | 968838 |
milestone | 30.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
widget/cocoa/nsCocoaWindow.h | file | annotate | diff | comparison | revisions | |
widget/cocoa/nsCocoaWindow.mm | file | annotate | diff | comparison | revisions |
--- a/widget/cocoa/nsCocoaWindow.h +++ b/widget/cocoa/nsCocoaWindow.h @@ -394,14 +394,15 @@ protected: // (MakeFullScreen() call) to EnteredFullScreen() bool mModal; bool mUsesNativeFullScreen; // only true on Lion if SetShowsFullScreenButton(true); bool mIsAnimationSuppressed; bool mInReportMoveEvent; // true if in a call to ReportMoveEvent(). + bool mInResize; // true if in a call to DoResize(). int32_t mNumModalDescendents; InputContext mInputContext; }; #endif // nsCocoaWindow_h_
--- a/widget/cocoa/nsCocoaWindow.mm +++ b/widget/cocoa/nsCocoaWindow.mm @@ -30,16 +30,17 @@ #include "nsCocoaFeatures.h" #include "nsIScreenManager.h" #include "nsIWidgetListener.h" #include "nsIPresShell.h" #include "gfxPlatform.h" #include "qcms.h" +#include "mozilla/AutoRestore.h" #include "mozilla/BasicEvents.h" #include "mozilla/Preferences.h" #include <algorithm> namespace mozilla { namespace layers { class LayerManager; } @@ -107,16 +108,17 @@ nsCocoaWindow::nsCocoaWindow() , mWindowMadeHere(false) , mSheetNeedsShow(false) , mFullScreen(false) , mInFullScreenTransition(false) , mModal(false) , mUsesNativeFullScreen(false) , mIsAnimationSuppressed(false) , mInReportMoveEvent(false) +, mInResize(false) , mNumModalDescendents(0) { } void nsCocoaWindow::DestroyNativeWindow() { NS_OBJC_BEGIN_TRY_ABORT_BLOCK; @@ -1328,20 +1330,23 @@ NS_METHOD nsCocoaWindow::MakeFullScreen( // Coordinates are global display pixels nsresult nsCocoaWindow::DoResize(double aX, double aY, double aWidth, double aHeight, bool aRepaint, bool aConstrainToCurrentScreen) { NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT; - if (!mWindow) { + if (!mWindow || mInResize) { return NS_OK; } + AutoRestore<bool> reentrantResizeGuard(mInResize); + mInResize = true; + // ConstrainSize operates in device pixels, so we need to convert using // the backing scale factor here CGFloat scale = BackingScaleFactor(); int32_t width = NSToIntRound(aWidth * scale); int32_t height = NSToIntRound(aHeight * scale); ConstrainSize(&width, &height); nsIntRect newBounds(NSToIntRound(aX), NSToIntRound(aY),