added visibility style attribute

This commit is contained in:
peterl
1998-05-26 23:17:29 +00:00
parent 0a71b948e7
commit 52459ad55c
10 changed files with 116 additions and 85 deletions

View File

@@ -354,26 +354,31 @@ NS_METHOD nsInputButtonFrame::Paint(nsIPresContext& aPresContext,
nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect)
{
// let super do processing if there is no image
if (kButton_Image != GetButtonType()) {
return nsInputButtonFrameSuper::Paint(aPresContext, aRenderingContext,
aDirtyRect);
nsStyleDisplay* disp =
(nsStyleDisplay*)mStyleContext->GetData(eStyleStruct_Display);
if (disp->mVisible) {
// let super do processing if there is no image
if (kButton_Image != GetButtonType()) {
return nsInputButtonFrameSuper::Paint(aPresContext, aRenderingContext,
aDirtyRect);
}
// First paint background and borders
nsInputButtonFrameSuper::Paint(aPresContext, aRenderingContext, aDirtyRect);
nsIImage* image = mImageLoader.GetImage();
if (nsnull == image) {
// No image yet
return NS_OK;
}
// Now render the image into our inner area (the area without the
nsRect inner;
GetInnerArea(&aPresContext, inner);
aRenderingContext.DrawImage(image, inner);
}
// First paint background and borders
nsInputButtonFrameSuper::Paint(aPresContext, aRenderingContext, aDirtyRect);
nsIImage* image = mImageLoader.GetImage();
if (nsnull == image) {
// No image yet
return NS_OK;
}
// Now render the image into our inner area (the area without the
nsRect inner;
GetInnerArea(&aPresContext, inner);
aRenderingContext.DrawImage(image, inner);
return NS_OK;
}