Bug 552938 - Implement the SVG load event in text/html, make the SVG load event in XML async and only supported on <svg>. r=dholbert, sr=roc.

This commit is contained in:
Henri Sivonen
2010-05-25 14:57:58 +03:00
parent acdc55ff29
commit 7b5cf1ffc4
11 changed files with 233 additions and 42 deletions

View File

@@ -61,6 +61,10 @@
#include "nsIFormProcessor.h"
#include "nsIServiceManager.h"
#ifdef MOZ_SVG
#include "nsHtml5SVGLoadDispatcher.h"
#endif
static NS_DEFINE_CID(kFormProcessorCID, NS_FORMPROCESSOR_CID);
/**
@@ -660,6 +664,16 @@ nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder,
sele->FreezeUriAsyncDefer();
return rv;
}
#ifdef MOZ_SVG
case eTreeOpSvgLoad: {
nsIContent* node = *(mOne.node);
nsCOMPtr<nsIRunnable> event = new nsHtml5SVGLoadDispatcher(node);
if (NS_FAILED(NS_DispatchToMainThread(event))) {
NS_WARNING("failed to dispatch svg load dispatcher");
}
return rv;
}
#endif
default: {
NS_NOTREACHED("Bogus tree op");
}