Bug 868730 - Make nsDocument::ResetStylesheetsToURI return void; r=mounir

This commit is contained in:
Ms2ger 2013-05-10 09:13:37 +02:00
parent cbd5d22f79
commit b151a55d94
3 changed files with 4 additions and 7 deletions

View File

@ -2198,10 +2198,10 @@ nsDocument::RemoveStyleSheetsFromStyleSets(nsCOMArray<nsIStyleSheet>& aSheets, n
}
nsresult
void
nsDocument::ResetStylesheetsToURI(nsIURI* aURI)
{
NS_PRECONDITION(aURI, "Null URI passed to ResetStylesheetsToURI");
MOZ_ASSERT(aURI);
mozAutoDocUpdate upd(this, UPDATE_STYLE, true);
RemoveDocStyleSheetsFromStyleSets();
@ -2257,8 +2257,6 @@ nsDocument::ResetStylesheetsToURI(nsIURI* aURI)
if (shell) {
FillStyleSet(shell->StyleSet());
}
return NS_OK;
}
static bool

View File

@ -1150,7 +1150,7 @@ protected:
void RemoveDocStyleSheetsFromStyleSets();
void RemoveStyleSheetsFromStyleSets(nsCOMArray<nsIStyleSheet>& aSheets,
nsStyleSet::sheetType aType);
nsresult ResetStylesheetsToURI(nsIURI* aURI);
void ResetStylesheetsToURI(nsIURI* aURI);
void FillStyleSet(nsStyleSet* aStyleSet);
// Return whether all the presshells for this document are safe to flush

View File

@ -433,8 +433,7 @@ XULDocument::StartDocumentLoad(const char* aCommand, nsIChannel* aChannel,
NS_GetFinalChannelURI(aChannel, getter_AddRefs(mDocumentURI));
NS_ENSURE_SUCCESS(rv, rv);
rv = ResetStylesheetsToURI(mDocumentURI);
if (NS_FAILED(rv)) return rv;
ResetStylesheetsToURI(mDocumentURI);
RetrieveRelevantHeaders(aChannel);