diff --git a/content/html/content/src/nsGenericHTMLElement.cpp b/content/html/content/src/nsGenericHTMLElement.cpp
index 69e0b37d8c09..6e1417c6175f 100644
--- a/content/html/content/src/nsGenericHTMLElement.cpp
+++ b/content/html/content/src/nsGenericHTMLElement.cpp
@@ -1660,7 +1660,7 @@ nsGenericHTMLElement::CreateFrame(nsIPresContext* aPresContext,
rv = NS_NewObjectFrame(mContent, aParentFrame, frame);
}
else if (mTag == nsHTMLAtoms::body) {
- rv = nsBodyFrame::NewFrame(&frame, mContent, aParentFrame);
+ rv = NS_NewBodyFrame(mContent, aParentFrame, frame);
}
else if (mTag == nsHTMLAtoms::br) {
rv = NS_NewBRFrame(mContent, aParentFrame, frame);
@@ -1671,6 +1671,9 @@ nsGenericHTMLElement::CreateFrame(nsIPresContext* aPresContext,
else if (mTag == nsHTMLAtoms::hr) {
rv = NS_NewHRFrame(mContent, aParentFrame, frame);
}
+ else if (mTag == nsHTMLAtoms::html) {
+ rv = NS_NewHTMLFrame(mContent, aParentFrame, frame);
+ }
else if (mTag == nsHTMLAtoms::img) {
rv = NS_NewImageFrame(mContent, aParentFrame, frame);
}
diff --git a/layout/html/content/src/nsGenericHTMLElement.cpp b/layout/html/content/src/nsGenericHTMLElement.cpp
index 69e0b37d8c09..6e1417c6175f 100644
--- a/layout/html/content/src/nsGenericHTMLElement.cpp
+++ b/layout/html/content/src/nsGenericHTMLElement.cpp
@@ -1660,7 +1660,7 @@ nsGenericHTMLElement::CreateFrame(nsIPresContext* aPresContext,
rv = NS_NewObjectFrame(mContent, aParentFrame, frame);
}
else if (mTag == nsHTMLAtoms::body) {
- rv = nsBodyFrame::NewFrame(&frame, mContent, aParentFrame);
+ rv = NS_NewBodyFrame(mContent, aParentFrame, frame);
}
else if (mTag == nsHTMLAtoms::br) {
rv = NS_NewBRFrame(mContent, aParentFrame, frame);
@@ -1671,6 +1671,9 @@ nsGenericHTMLElement::CreateFrame(nsIPresContext* aPresContext,
else if (mTag == nsHTMLAtoms::hr) {
rv = NS_NewHRFrame(mContent, aParentFrame, frame);
}
+ else if (mTag == nsHTMLAtoms::html) {
+ rv = NS_NewHTMLFrame(mContent, aParentFrame, frame);
+ }
else if (mTag == nsHTMLAtoms::img) {
rv = NS_NewImageFrame(mContent, aParentFrame, frame);
}