Backout revision 379147b5215f due to video controls not showing when viewing standalone videos (
bug 689106). r=jonas
--- a/content/base/public/nsContentUtils.h
+++ b/content/base/public/nsContentUtils.h
@@ -2148,26 +2148,9 @@ public:
return GetParameter(nsnull, aResult);
}
private:
NS_ConvertUTF16toUTF8 mString;
nsIMIMEHeaderParam* mService;
};
-class nsDocElementCreatedNotificationRunner : public nsRunnable
-{
-public:
- nsDocElementCreatedNotificationRunner(nsIDocument* aDoc)
- : mDoc(aDoc)
- {
- }
-
- NS_IMETHOD Run()
- {
- nsContentSink::NotifyDocElementCreated(mDoc);
- return NS_OK;
- }
-
- nsCOMPtr<nsIDocument> mDoc;
-};
-
#endif /* nsContentUtils_h___ */
--- a/content/html/document/src/MediaDocument.cpp
+++ b/content/html/document/src/MediaDocument.cpp
@@ -46,17 +46,16 @@
#include "nsITextToSubURI.h"
#include "nsIURL.h"
#include "nsIContentViewer.h"
#include "nsIMarkupDocumentViewer.h"
#include "nsIDocShell.h"
#include "nsIParser.h" // kCharsetFrom* macro definition
#include "nsIDocumentCharsetInfo.h"
#include "nsNodeInfoManager.h"
-#include "nsContentUtils.h"
namespace mozilla {
namespace dom {
MediaDocumentStreamListener::MediaDocumentStreamListener(MediaDocument *aDocument)
{
mDocument = aDocument;
}
@@ -247,19 +246,16 @@ MediaDocument::CreateSyntheticDocument()
if (!root) {
return NS_ERROR_OUT_OF_MEMORY;
}
NS_ASSERTION(GetChildCount() == 0, "Shouldn't have any kids");
rv = AppendChildTo(root, PR_FALSE);
NS_ENSURE_SUCCESS(rv, rv);
- nsContentUtils::AddScriptRunner(
- new nsDocElementCreatedNotificationRunner(this));
-
nodeInfo = mNodeInfoManager->GetNodeInfo(nsGkAtoms::head, nsnull,
kNameSpaceID_XHTML,
nsIDOMNode::ELEMENT_NODE);
NS_ENSURE_TRUE(nodeInfo, NS_ERROR_OUT_OF_MEMORY);
// Create a <head> so our title has somewhere to live
nsRefPtr<nsGenericHTMLElement> head = NS_NewHTMLHeadElement(nodeInfo.forget());
if (!head) {
--- a/parser/html/nsHtml5TreeOperation.cpp
+++ b/parser/html/nsHtml5TreeOperation.cpp
@@ -223,16 +223,33 @@ nsHtml5TreeOperation::Append(nsIContent*
rv = aParent->AppendChildTo(aNode, PR_FALSE);
if (NS_SUCCEEDED(rv)) {
nsNodeUtils::ContentAppended(aParent, aNode, childCount);
}
parentDoc->EndUpdate(UPDATE_CONTENT_MODEL);
return rv;
}
+class nsDocElementCreatedNotificationRunner : public nsRunnable
+{
+public:
+ nsDocElementCreatedNotificationRunner(nsIDocument* aDoc)
+ : mDoc(aDoc)
+ {
+ }
+
+ NS_IMETHOD Run()
+ {
+ nsContentSink::NotifyDocElementCreated(mDoc);
+ return NS_OK;
+ }
+
+ nsCOMPtr<nsIDocument> mDoc;
+};
+
nsresult
nsHtml5TreeOperation::AppendToDocument(nsIContent* aNode,
nsHtml5TreeOpExecutor* aBuilder)
{
nsresult rv = NS_OK;
aBuilder->FlushPendingAppendNotifications();
nsIDocument* doc = aBuilder->GetDocument();
PRUint32 childCount = doc->GetChildCount();