Make sure to update the sheet even if the URI has not changed if something else

that matters (type, media, etc) has changed.  Bug 303313, r+sr=peterv


git-svn-id: svn://10.0.0.236/trunk@185844 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2005-12-09 19:20:42 +00:00
parent 09fb0311d4
commit ca7e6121f6
7 changed files with 44 additions and 11 deletions

View File

@@ -189,7 +189,8 @@ const PRBool kBlockByDefault=PR_TRUE;
NS_IMETHODIMP
nsStyleLinkElement::UpdateStyleSheet(nsIDocument *aOldDocument,
nsICSSLoaderObserver* aObserver)
nsICSSLoaderObserver* aObserver,
PRBool aForceUpdate)
{
if (mStyleSheet && aOldDocument) {
// We're removing the link element from the document, unload the
@@ -228,7 +229,7 @@ nsStyleLinkElement::UpdateStyleSheet(nsIDocument *aOldDocument,
PRBool isInline;
GetStyleSheetURL(&isInline, getter_AddRefs(uri));
if (mStyleSheet && !isInline && uri) {
if (!aForceUpdate && mStyleSheet && !isInline && uri) {
nsCOMPtr<nsIURI> oldURI;
mStyleSheet->GetSheetURI(getter_AddRefs(oldURI));