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

git-svn-id: svn://10.0.0.236/trunk@70116 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cmanske%netscape.com 2000-05-16 22:12:54 +00:00
parent ddf691bcc3
commit ca87bdf4d5
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;
}

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;
}