Bug 1216893 - Add in disabled namespace for SVG r=hsivonen,smaug
MozReview-Commit-ID: 7Gum6wazraS
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "nsStyleLinkElement.h"
|
||||
#include "nsScriptLoader.h"
|
||||
#include "nsIHTMLDocument.h"
|
||||
#include "nsNameSpaceManager.h"
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_INHERITED(nsHtml5DocumentBuilder, nsContentSink,
|
||||
mOwnedElements)
|
||||
@@ -57,6 +58,12 @@ nsHtml5DocumentBuilder::SetDocumentCharsetAndSource(nsACString& aCharset, int32_
|
||||
void
|
||||
nsHtml5DocumentBuilder::UpdateStyleSheet(nsIContent* aElement)
|
||||
{
|
||||
nsCOMPtr<nsIStyleSheetLinkingElement> ssle(do_QueryInterface(aElement));
|
||||
if (!ssle) {
|
||||
MOZ_ASSERT(nsNameSpaceManager::GetInstance()->mSVGDisabled, "Node didn't QI to style, but SVG wasn't disabled.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Break out of the doc update created by Flush() to zap a runnable
|
||||
// waiting to call UpdateStyleSheet without the right observer
|
||||
EndDocUpdate();
|
||||
@@ -66,9 +73,6 @@ nsHtml5DocumentBuilder::UpdateStyleSheet(nsIContent* aElement)
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIStyleSheetLinkingElement> ssle(do_QueryInterface(aElement));
|
||||
NS_ASSERTION(ssle, "Node didn't QI to style.");
|
||||
|
||||
ssle->SetEnableUpdates(true);
|
||||
|
||||
bool willNotify;
|
||||
|
||||
Reference in New Issue
Block a user