Backed out 2 changesets (bug 1447056) for bc perma-failures in browser/base/content/test/performance/browser_windowopen_reflows.js on a CLOSED TREE

Backed out changeset 1caa948c67f3 (bug 1447056)
Backed out changeset 85bfd88be225 (bug 1447056)
This commit is contained in:
Margareta Eliza Balazs 2018-03-22 22:12:08 +02:00
Родитель 2a7fb98abb
Коммит c3a803bc43
2 изменённых файлов: 7 добавлений и 21 удалений

Просмотреть файл

@ -93,7 +93,6 @@ nsXULWindow::nsXULWindow(uint32_t aChromeFlags)
mContinueModalLoop(false),
mDebuting(false),
mChromeLoaded(false),
mSizingShellFromXUL(false),
mShowAfterLoad(false),
mIntrinsicallySized(false),
mCenterAfterLoad(false),
@ -578,11 +577,6 @@ NS_IMETHODIMP nsXULWindow::GetUnscaledDevicePixelsPerCSSPixel(double *aScale)
NS_IMETHODIMP nsXULWindow::SetPositionDesktopPix(int32_t aX, int32_t aY)
{
mWindow->Move(aX, aY);
if (mSizingShellFromXUL) {
// If we're invoked for sizing from XUL, we want to neither ignore anything
// nor persist anything, since it's already the value in XUL.
return NS_OK;
}
if (!mChromeLoaded) {
// If we're called before the chrome is loaded someone obviously wants this
// window at this position. We don't persist this one-time position.
@ -622,11 +616,6 @@ NS_IMETHODIMP nsXULWindow::SetSize(int32_t aCX, int32_t aCY, bool aRepaint)
DesktopToLayoutDeviceScale scale = mWindow->GetDesktopToDeviceScale();
DesktopSize size = LayoutDeviceIntSize(aCX, aCY) / scale;
mWindow->Resize(size.width, size.height, aRepaint);
if (mSizingShellFromXUL) {
// If we're invoked for sizing from XUL, we want to neither ignore anything
// nor persist anything, since it's already the value in XUL.
return NS_OK;
}
if (!mChromeLoaded) {
// If we're called before the chrome is loaded someone obviously wants this
// window at this size & in the normal size mode (since it is the only mode
@ -660,11 +649,6 @@ NS_IMETHODIMP nsXULWindow::SetPositionAndSize(int32_t aX, int32_t aY,
DesktopRect rect = LayoutDeviceIntRect(aX, aY, aCX, aCY) / scale;
mWindow->Resize(rect.X(), rect.Y(), rect.Width(), rect.Height(),
!!(aFlags & nsIBaseWindow::eRepaint));
if (mSizingShellFromXUL) {
// If we're invoked for sizing from XUL, we want to neither ignore anything
// nor persist anything, since it's already the value in XUL.
return NS_OK;
}
if (!mChromeLoaded) {
// If we're called before the chrome is loaded someone obviously wants this
// window at this size and position. We don't persist this one-time setting.
@ -1302,12 +1286,18 @@ nsXULWindow::SetSpecifiedSize(int32_t aSpecWidth, int32_t aSpecHeight)
NS_ASSERTION(mWindow, "we expected to have a window already");
int32_t currWidth = 0;
int32_t currHeight = 0;
GetSize(&currWidth, &currHeight); // returns device pixels
// convert specified values to device pixels, and resize if needed
double cssToDevPx = mWindow ? mWindow->GetDefaultScale().scale : 1.0;
aSpecWidth = NSToIntRound(aSpecWidth * cssToDevPx);
aSpecHeight = NSToIntRound(aSpecHeight * cssToDevPx);
mIntrinsicallySized = false;
SetSize(aSpecWidth, aSpecHeight, false);
if (aSpecWidth != currWidth || aSpecHeight != currHeight) {
SetSize(aSpecWidth, aSpecHeight, false);
}
}
/* Miscellaneous persistent attributes are attributes named in the
@ -2279,9 +2269,6 @@ nsXULWindow::BeforeStartLayout()
void
nsXULWindow::SizeShell()
{
AutoRestore<bool> sizingShellFromXUL(mSizingShellFromXUL);
mSizingShellFromXUL = true;
int32_t specWidth = -1, specHeight = -1;
bool gotSize = false;
bool isContent = false;

Просмотреть файл

@ -157,7 +157,6 @@ protected:
bool mContinueModalLoop;
bool mDebuting; // being made visible right now
bool mChromeLoaded; // True when chrome has loaded
bool mSizingShellFromXUL; // true when in SizeShell()
bool mShowAfterLoad;
bool mIntrinsicallySized;
bool mCenterAfterLoad;