diff --git a/dom/xul/XULDocument.cpp b/dom/xul/XULDocument.cpp index 686a035a18c..fa87020f90e 100644 --- a/dom/xul/XULDocument.cpp +++ b/dom/xul/XULDocument.cpp @@ -924,23 +924,6 @@ XULDocument::AttributeWillChange(nsIDocument* aDocument, } } -static bool -ShouldPersistAttribute(nsIDocument* aDocument, Element* aElement) -{ - if (aElement->IsXULElement(nsGkAtoms::window)) { - if (nsCOMPtr window = aDocument->GetWindow()) { - bool isFullscreen; - window->GetFullScreen(&isFullscreen); - if (isFullscreen) { - // Don't persist attributes if it is window element and - // we are in fullscreen state. - return false; - } - } - } - return true; -} - void XULDocument::AttributeChanged(nsIDocument* aDocument, Element* aElement, int32_t aNameSpaceID, @@ -1016,19 +999,18 @@ XULDocument::AttributeChanged(nsIDocument* aDocument, bool listener, resolved; CheckBroadcasterHookup(aElement, &listener, &resolved); - if (ShouldPersistAttribute(aDocument, aElement)) { - // See if there is anything we need to persist in the localstore. - // - // XXX Namespace handling broken :-( - nsString persist; - aElement->GetAttr(kNameSpaceID_None, nsGkAtoms::persist, persist); - if (!persist.IsEmpty() && - // XXXldb This should check that it's a token, not just a substring. - persist.Find(nsDependentAtomString(aAttribute)) >= 0) { + // See if there is anything we need to persist in the localstore. + // + // XXX Namespace handling broken :-( + nsAutoString persist; + aElement->GetAttr(kNameSpaceID_None, nsGkAtoms::persist, persist); + if (!persist.IsEmpty()) { + // XXXldb This should check that it's a token, not just a substring. + if (persist.Find(nsDependentAtomString(aAttribute)) >= 0) { nsContentUtils::AddScriptRunner(NS_NewRunnableMethodWithArgs - - (this, &XULDocument::DoPersist, aElement, - kNameSpaceID_None, aAttribute)); + + (this, &XULDocument::DoPersist, aElement, kNameSpaceID_None, + aAttribute)); } } } diff --git a/xpfe/appshell/nsXULWindow.cpp b/xpfe/appshell/nsXULWindow.cpp index 030f37e4ed2..0265860831a 100644 --- a/xpfe/appshell/nsXULWindow.cpp +++ b/xpfe/appshell/nsXULWindow.cpp @@ -1436,16 +1436,6 @@ NS_IMETHODIMP nsXULWindow::SavePersistentAttributes() if (!mDocShell) return NS_ERROR_FAILURE; - nsCOMPtr domWindow; - GetWindowDOMWindow(getter_AddRefs(domWindow)); - if (domWindow) { - bool isFullscreen; - domWindow->GetFullScreen(&isFullscreen); - if (isFullscreen) { - return NS_OK; - } - } - nsCOMPtr docShellElement = GetWindowDOMElement(); if (!docShellElement) return NS_ERROR_FAILURE;