diff --git a/content/html/document/src/nsHTMLContentSink.cpp b/content/html/document/src/nsHTMLContentSink.cpp
index 33e091a1c929..0e5b62f3b57e 100644
--- a/content/html/document/src/nsHTMLContentSink.cpp
+++ b/content/html/document/src/nsHTMLContentSink.cpp
@@ -607,6 +607,9 @@ MakeContentObject(nsHTMLTag aNodeType,
case eHTMLTag_hr:
rv = NS_NewHTMLHRElement(aResult, aAtom);
break;
+ case eHTMLTag_html:
+ rv = NS_NewHTMLHtmlElement(aResult, aAtom);
+ break;
case eHTMLTag_iframe:
rv = NS_NewHTMLIFrameElement(aResult, aAtom);
break;
diff --git a/layout/html/document/src/nsHTMLContentSink.cpp b/layout/html/document/src/nsHTMLContentSink.cpp
index 33e091a1c929..0e5b62f3b57e 100644
--- a/layout/html/document/src/nsHTMLContentSink.cpp
+++ b/layout/html/document/src/nsHTMLContentSink.cpp
@@ -607,6 +607,9 @@ MakeContentObject(nsHTMLTag aNodeType,
case eHTMLTag_hr:
rv = NS_NewHTMLHRElement(aResult, aAtom);
break;
+ case eHTMLTag_html:
+ rv = NS_NewHTMLHtmlElement(aResult, aAtom);
+ break;
case eHTMLTag_iframe:
rv = NS_NewHTMLIFrameElement(aResult, aAtom);
break;