Bug 451168 - "Borders around folder icons in directory listings (e.g. when viewing FTP sites)" [r+sr=bzbarsky]

This commit is contained in:
Robert O'Callahan 2008-08-19 22:50:31 -05:00
parent 390dd5b8fa
commit 2b3cbd99b7
4 changed files with 22 additions and 3 deletions

View File

@ -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")

View File

@ -1967,7 +1967,7 @@ nsCSSFrameConstructor::CreateGeneratedContent(nsIContent* aParentContent,
// XXX Check if it's an image type we can handle...
nsCOMPtr<nsINodeInfo> 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);

View File

@ -0,0 +1,6 @@
<!DOCTYPE HTML>
<html>
<body>
<img src="mozilla-banner.gif">
</body>
</html>

View File

@ -0,0 +1,11 @@
<!DOCTYPE HTML>
<html>
<head>
<style>
a::before { content:url(mozilla-banner.gif); }
</style>
</head>
<body>
<a href="#"></a>
</body>
</html>