diff --git a/content/base/src/nsStyleLinkElement.cpp b/content/base/src/nsStyleLinkElement.cpp index 06513a09c95..a8e260d6d11 100644 --- a/content/base/src/nsStyleLinkElement.cpp +++ b/content/base/src/nsStyleLinkElement.cpp @@ -314,8 +314,12 @@ nsStyleLinkElement::DoUpdateStyleSheet(nsIDocument *aOldDocument, rv = doc->CSSLoader()-> LoadStyleLink(thisContent, uri, title, media, isAlternate, aObserver, &isAlternate); - if (rv == NS_ERROR_FILE_NOT_FOUND) { + if (NS_FAILED(rv)) { + // Don't propagate LoadStyleLink() errors further than this, since some + // consumers (e.g. nsXMLContentSink) will completely abort on innocuous + // things like a stylesheet load being blocked by the security system. doneLoading = PR_TRUE; + isAlternate = PR_FALSE; rv = NS_OK; } } diff --git a/content/svg/content/src/nsSVGUseElement.cpp b/content/svg/content/src/nsSVGUseElement.cpp index 1e218f76bc7..632ddad207a 100644 --- a/content/svg/content/src/nsSVGUseElement.cpp +++ b/content/svg/content/src/nsSVGUseElement.cpp @@ -377,6 +377,15 @@ nsSVGUseElement::CreateAnonymousContent() } } + // Set up its base URI correctly + nsCOMPtr baseURI = targetContent->GetBaseURI(); + if (!baseURI) + return nsnull; + nsCAutoString spec; + baseURI->GetSpec(spec); + newcontent->SetAttr(kNameSpaceID_XML, nsGkAtoms::base, + NS_ConvertUTF8toUTF16(spec), PR_FALSE); + targetContent->AddMutationObserver(this); mClone = newcontent; return mClone; diff --git a/dom/src/jsurl/nsJSProtocolHandler.cpp b/dom/src/jsurl/nsJSProtocolHandler.cpp index 7d214e2bf20..4030ed1905d 100644 --- a/dom/src/jsurl/nsJSProtocolHandler.cpp +++ b/dom/src/jsurl/nsJSProtocolHandler.cpp @@ -137,9 +137,10 @@ nsIScriptGlobalObject* GetGlobalObject(nsIChannel* aChannel) // Get the global object owner from the channel nsCOMPtr globalOwner; NS_QueryNotificationCallbacks(aChannel, globalOwner); - NS_ASSERTION(globalOwner, - "Unable to get an nsIScriptGlobalObjectOwner from the " - "channel!"); + if (!globalOwner) { + NS_WARNING("Unable to get an nsIScriptGlobalObjectOwner from the " + "channel!"); + } if (!globalOwner) { return nsnull; } diff --git a/layout/reftests/svg-integration/mask-html-01-resource.svg b/layout/reftests/svg-integration/mask-html-01-resource.svg index d2d23b7fcf6..3410ed63b8e 100644 --- a/layout/reftests/svg-integration/mask-html-01-resource.svg +++ b/layout/reftests/svg-integration/mask-html-01-resource.svg @@ -1,6 +1,10 @@ + +