Hooked up noshade attribute to trigger a render

This commit is contained in:
kipp%netscape.com 1998-09-24 23:57:01 +00:00
parent 49f2e69fbe
commit 4d4673881d

View File

@ -43,13 +43,17 @@ public:
HRuleFrame(nsIContent* aContent,
nsIFrame* aParentFrame);
NS_IMETHOD Reflow(nsIPresContext& aPresContext,
nsReflowMetrics& aDesiredSize,
NS_IMETHOD Reflow(nsIPresContext& aPresContext,
nsReflowMetrics& aDesiredSize,
const nsReflowState& aReflowState,
nsReflowStatus& aStatus);
nsReflowStatus& aStatus);
NS_IMETHOD Paint(nsIPresContext& aPresContext,
nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect);
NS_IMETHOD AttributeChanged(nsIPresShell* aShell,
nsIPresContext* aPresContext,
nsIContent* aChild,
nsIAtom* aAttribute);
protected:
virtual ~HRuleFrame();
@ -86,6 +90,19 @@ HRuleFrame::~HRuleFrame()
{
}
NS_IMETHODIMP
HRuleFrame::AttributeChanged(nsIPresShell* aShell,
nsIPresContext* aPresContext,
nsIContent* aChild,
nsIAtom* aAttribute)
{
if (nsHTMLAtoms::noshade == aAttribute) {
// Trigger an immediate rendering
Invalidate(nsRect(0, 0, mRect.width, mRect.height), PR_TRUE);
}
return NS_OK;
}
NS_METHOD
HRuleFrame::Paint(nsIPresContext& aPresContext,
nsIRenderingContext& aRenderingContext,