From ca87bdf4d5359f13516e12669c4ccf2f9eeee9ea Mon Sep 17 00:00:00 2001 From: "cmanske%netscape.com" Date: Tue, 16 May 2000 22:12:54 +0000 Subject: [PATCH] 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 --- mozilla/layout/generic/nsHTMLContainerFrame.cpp | 12 ++++++++++++ .../layout/html/base/src/nsHTMLContainerFrame.cpp | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/mozilla/layout/generic/nsHTMLContainerFrame.cpp b/mozilla/layout/generic/nsHTMLContainerFrame.cpp index 57783b30aa2..77f6c2b50a4 100644 --- a/mozilla/layout/generic/nsHTMLContainerFrame.cpp +++ b/mozilla/layout/generic/nsHTMLContainerFrame.cpp @@ -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; } diff --git a/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp b/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp index 57783b30aa2..77f6c2b50a4 100644 --- a/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp +++ b/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp @@ -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; }