Backed out 4 changesets (bug 1656526) for Browser-chrome failures in toolkit/xre/test/browser_checkdllblockliststate.js. CLOSED TREE
Backed out changeset 24648c48a49c (bug 1656526) Backed out changeset 472b724994eb (bug 1656526) Backed out changeset 6fbb7e7ac121 (bug 1656526) Backed out changeset 88ff36a4bcfb (bug 1656526)
This commit is contained in:
@@ -62,10 +62,6 @@
|
||||
#include "mozilla/dom/LoadURIOptionsBinding.h"
|
||||
#include "mozilla/EventDispatcher.h"
|
||||
|
||||
#ifdef XP_WIN
|
||||
# include "mozilla/EarlyBlankWindow.h"
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_NEW_XULSTORE
|
||||
# include "mozilla/XULStore.h"
|
||||
#endif
|
||||
@@ -1748,17 +1744,18 @@ nsresult AppWindow::GetPersistentValue(const nsAtom* aAttr, nsAString& aValue) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult AppWindow::GetDocXulStoreKeys(nsString& aUriSpec,
|
||||
nsString& aWindowElementId) {
|
||||
nsresult AppWindow::SetPersistentValue(const nsAtom* aAttr,
|
||||
const nsAString& aValue) {
|
||||
nsCOMPtr<dom::Element> docShellElement = GetWindowDOMElement();
|
||||
if (!docShellElement) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
docShellElement->GetId(aWindowElementId);
|
||||
nsAutoString windowElementId;
|
||||
docShellElement->GetId(windowElementId);
|
||||
// Match the behavior of XULPersist and only persist values if the element
|
||||
// has an ID.
|
||||
if (aWindowElementId.IsEmpty()) {
|
||||
if (windowElementId.IsEmpty()) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -1773,45 +1770,7 @@ nsresult AppWindow::GetDocXulStoreKeys(nsString& aUriSpec,
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
aUriSpec = NS_ConvertUTF8toUTF16(utf8uri);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult AppWindow::MaybeSaveEarlyWindowPersistentValues(
|
||||
const LayoutDeviceIntRect& aRect) {
|
||||
#ifdef XP_WIN
|
||||
nsAutoString uri;
|
||||
nsAutoString windowElementId;
|
||||
nsresult rv = GetDocXulStoreKeys(uri, windowElementId);
|
||||
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
if (!windowElementId.EqualsLiteral("main-window") ||
|
||||
!uri.EqualsLiteral("chrome://browser/content/browser.xhtml")) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
PersistEarlyBlankWindowValues(aRect.X(), aRect.Y(), aRect.Width(),
|
||||
aRect.Height(),
|
||||
mWindow->GetDefaultScale().scale);
|
||||
#endif
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult AppWindow::SetPersistentValue(const nsAtom* aAttr,
|
||||
const nsAString& aValue) {
|
||||
nsAutoString uri;
|
||||
nsAutoString windowElementId;
|
||||
nsresult rv = GetDocXulStoreKeys(uri, windowElementId);
|
||||
|
||||
if (NS_FAILED(rv) || windowElementId.IsEmpty()) {
|
||||
return rv;
|
||||
}
|
||||
NS_ConvertUTF8toUTF16 uri(utf8uri);
|
||||
|
||||
nsAutoString maybeConvertedValue(aValue);
|
||||
if (aAttr == nsGkAtoms::width || aAttr == nsGkAtoms::height) {
|
||||
@@ -1919,8 +1878,6 @@ NS_IMETHODIMP AppWindow::SavePersistentAttributes() {
|
||||
}
|
||||
}
|
||||
|
||||
Unused << MaybeSaveEarlyWindowPersistentValues(rect);
|
||||
|
||||
if (mPersistentAttributesDirty & PAD_MISC) {
|
||||
nsSizeMode sizeMode = mWindow->SizeMode();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user