diff --git a/content/base/src/nsGkAtomList.h b/content/base/src/nsGkAtomList.h index 12957d177de..2748c4c4d66 100755 --- a/content/base/src/nsGkAtomList.h +++ b/content/base/src/nsGkAtomList.h @@ -65,6 +65,7 @@ GK_ATOM(_empty, "") GK_ATOM(mozdirty, "_moz_dirty") GK_ATOM(mozgeneratedcontentbefore, "_moz_generated_content_before") GK_ATOM(mozgeneratedcontentafter, "_moz_generated_content_after") +GK_ATOM(mozgeneratedcontentimage, "_moz_generated_content_image") GK_ATOM(_moz_target, "_moz_target") GK_ATOM(menuactive, "_moz-menuactive") GK_ATOM(_poundDefault, "#default") diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 23363f88ab3..a08aa9457b9 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -1967,7 +1967,7 @@ nsCSSFrameConstructor::CreateGeneratedContent(nsIContent* aParentContent, // XXX Check if it's an image type we can handle... nsCOMPtr nodeInfo; - mDocument->NodeInfoManager()->GetNodeInfo(nsGkAtoms::img, nsnull, + mDocument->NodeInfoManager()->GetNodeInfo(nsGkAtoms::mozgeneratedcontentimage, nsnull, kNameSpaceID_XHTML, getter_AddRefs(nodeInfo)); @@ -3220,7 +3220,8 @@ IsSpecialContent(nsIContent* aContent, return PR_TRUE; } - if (aTag == nsGkAtoms::img) { + if (aTag == nsGkAtoms::img || + aTag == nsGkAtoms::mozgeneratedcontentimage) { return nsImageFrame::ShouldCreateImageFrameFor(aContent, aStyleContext); } @@ -5239,7 +5240,7 @@ nsCSSFrameConstructor::ConstructHTMLFrame(nsFrameConstructorState& aState, const nsStyleDisplay* display = aStyleContext->GetStyleDisplay(); // Create a frame based on the tag - if (nsGkAtoms::img == aTag) { + if (nsGkAtoms::img == aTag || nsGkAtoms::mozgeneratedcontentimage == aTag) { // Make sure to keep IsSpecialContent in synch with this code rv = CreateHTMLImageFrame(aContent, aStyleContext, NS_NewImageFrame, &newFrame); diff --git a/layout/reftests/bugs/451168-1-ref.html b/layout/reftests/bugs/451168-1-ref.html new file mode 100644 index 00000000000..e4680c831ab --- /dev/null +++ b/layout/reftests/bugs/451168-1-ref.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/layout/reftests/bugs/451168-1.html b/layout/reftests/bugs/451168-1.html new file mode 100644 index 00000000000..f3f8ec0a5aa --- /dev/null +++ b/layout/reftests/bugs/451168-1.html @@ -0,0 +1,11 @@ + + + + + + + + +