Add code to paint selection border around Named Anchor frames when rect is not null - used only in Editor when Named Anchor is represented by an image. r=mjudge

This commit is contained in:
cmanske@netscape.com
2000-05-16 22:12:54 +00:00
parent 1628f1df9a
commit 160e685d19
2 changed files with 24 additions and 0 deletions

View File

@@ -79,12 +79,24 @@ nsHTMLContainerFrame::Paint(nsIPresContext* aPresContext,
aDirtyRect, rect, *spacing, mStyleContext, skipSides);
nsCSSRendering::PaintOutline(aPresContext, aRenderingContext, this,
aDirtyRect, rect, *spacing, mStyleContext, 0);
// The sole purpose of this is to trigger display
// of the selection window for Named Anchors,
// which don't have any children and normally don't
// have any size, but in Editor we use CSS to display
// an image to represent this "hidden" element.
if (!mFrames.FirstChild())
{
nsFrame::Paint(aPresContext,
aRenderingContext, aDirtyRect, aWhichLayer);
}
}
}
// Now paint the kids. Note that child elements have the opportunity to
// override the visibility property and display even if their parent is
// hidden
PaintChildren(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer);
return NS_OK;
}