зеркало из https://github.com/mozilla/pjs.git
Back out patch for bug 295994
This commit is contained in:
Родитель
7afa0a23a3
Коммит
fa933887f9
|
@ -47,14 +47,6 @@ include $(topsrcdir)/config/rules.mk
|
|||
_TEST_FILES = test_bug330705-2.xul \
|
||||
test_bug233643.xul \
|
||||
$(NULL)
|
||||
|
||||
_CHROME_FILES = \
|
||||
test_bug398289.html \
|
||||
398289-resource.xul \
|
||||
$(NULL)
|
||||
|
||||
libs:: $(_TEST_FILES)
|
||||
$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
|
||||
|
||||
libs:: $(_CHROME_FILES)
|
||||
$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
|
||||
|
|
|
@ -1274,33 +1274,14 @@ nsXULDocument::Persist(const nsAString& aID,
|
|||
}
|
||||
|
||||
|
||||
PRBool
|
||||
nsXULDocument::IsCapabilityEnabled(const char* aCapabilityLabel)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
// NodePrincipal is guarantied to be non-null
|
||||
PRBool enabled = PR_FALSE;
|
||||
rv = NodePrincipal()->IsCapabilityEnabled(aCapabilityLabel, nsnull, &enabled);
|
||||
if (NS_FAILED(rv))
|
||||
return PR_FALSE;
|
||||
|
||||
return enabled;
|
||||
}
|
||||
|
||||
|
||||
nsresult
|
||||
nsXULDocument::Persist(nsIContent* aElement, PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute)
|
||||
{
|
||||
// For non-chrome documents, persistance is simply broken
|
||||
if (!IsCapabilityEnabled("UniversalBrowserWrite"))
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
// First make sure we _have_ a local store to stuff the persisted
|
||||
// information into. (We might not have one if profile information
|
||||
// hasn't been loaded yet...)
|
||||
if (!mLocalStore)
|
||||
if (! mLocalStore)
|
||||
return NS_OK;
|
||||
|
||||
nsresult rv;
|
||||
|
@ -2085,26 +2066,13 @@ nsXULDocument::PrepareToLoadPrototype(nsIURI* aURI, const char* aCommand,
|
|||
nsresult
|
||||
nsXULDocument::ApplyPersistentAttributes()
|
||||
{
|
||||
// For non-chrome documents, persistance is simply broken
|
||||
if (!IsCapabilityEnabled("UniversalBrowserRead"))
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
// Add all of the 'persisted' attributes into the content
|
||||
// model.
|
||||
if (!mLocalStore)
|
||||
if (! mLocalStore)
|
||||
return NS_OK;
|
||||
|
||||
mApplyingPersistedAttrs = PR_TRUE;
|
||||
ApplyPersistentAttributesInternal();
|
||||
mApplyingPersistedAttrs = PR_FALSE;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
nsresult
|
||||
nsXULDocument::ApplyPersistentAttributesInternal()
|
||||
{
|
||||
nsCOMArray<nsIContent> elements;
|
||||
|
||||
nsCAutoString docurl;
|
||||
|
@ -2151,6 +2119,8 @@ nsXULDocument::ApplyPersistentAttributesInternal()
|
|||
ApplyPersistentAttributesToElements(resource, elements);
|
||||
}
|
||||
|
||||
mApplyingPersistedAttrs = PR_FALSE;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -3057,7 +3027,8 @@ nsXULDocument::ResumeWalk()
|
|||
rv = ResolveForwardReferences();
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
ApplyPersistentAttributes();
|
||||
rv = ApplyPersistentAttributes();
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
mStillWalking = PR_FALSE;
|
||||
if (mPendingSheets == 0) {
|
||||
|
|
|
@ -201,7 +201,6 @@ protected:
|
|||
PRBool* aFailureFromContent);
|
||||
|
||||
nsresult ApplyPersistentAttributes();
|
||||
nsresult ApplyPersistentAttributesInternal();
|
||||
nsresult ApplyPersistentAttributesToElements(nsIRDFResource* aResource,
|
||||
nsCOMArray<nsIContent>& aElements);
|
||||
|
||||
|
@ -238,9 +237,6 @@ protected:
|
|||
|
||||
static PRLogModuleInfo* gXULLog;
|
||||
|
||||
PRBool
|
||||
IsCapabilityEnabled(const char* aCapabilityLabel);
|
||||
|
||||
nsresult
|
||||
Persist(nsIContent* aElement, PRInt32 aNameSpaceID, nsIAtom* aAttribute);
|
||||
|
||||
|
|
|
@ -622,6 +622,7 @@ skip-if(MOZ_WIDGET_TOOLKIT!="windows") == 391045.html 391045-ref.html # windows-
|
|||
== 397428-1.html 397428-1-ref.html
|
||||
== 397844-1.xhtml 397844-1-ref.xhtml
|
||||
== 398101-1.html 398101-1-ref.html
|
||||
== 398289-1.html 398289-1-ref.html
|
||||
== 398144-1.html 398144-1-ref.html
|
||||
== 398797-1a.html 398797-1-ref.html
|
||||
== 398797-1b.html 398797-1-ref.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче