From 0874e74a3639f07acfed2486a0efcd763cc0fbd3 Mon Sep 17 00:00:00 2001 From: "rods%netscape.com" Date: Thu, 2 Dec 1999 22:07:43 +0000 Subject: [PATCH] clips inside the border instead of inside the border and padding r=kmcclusk bug 20301 --- layout/forms/nsHTMLButtonControlFrame.cpp | 10 +++++----- layout/html/forms/src/nsHTMLButtonControlFrame.cpp | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/layout/forms/nsHTMLButtonControlFrame.cpp b/layout/forms/nsHTMLButtonControlFrame.cpp index 4a79f2a1d40..02d111285ca 100644 --- a/layout/forms/nsHTMLButtonControlFrame.cpp +++ b/layout/forms/nsHTMLButtonControlFrame.cpp @@ -432,21 +432,21 @@ nsHTMLButtonControlFrame::Paint(nsIPresContext* aPresContext, #else // temporary // XXX This is temporary - // clips to it's size minus the border and padding, + // clips to it's size minus the border // but the real problem is the FirstChild (the AreaFrame) // isn't being constrained properly // Bug #17474 const nsStyleSpacing* spacing; GetStyleData(eStyleStruct_Spacing, (const nsStyleStruct *&)spacing); - nsMargin borderPadding; - borderPadding.SizeTo(0, 0, 0, 0); - spacing->CalcBorderPaddingFor(this, borderPadding); + nsMargin border; + border.SizeTo(0, 0, 0, 0); + spacing->CalcBorderFor(this, border); nsRect rect; GetRect(rect); rect.x = 0; rect.y = 0; - rect.Deflate(borderPadding); + rect.Deflate(border); aRenderingContext.PushState(); PRBool clipEmpty; diff --git a/layout/html/forms/src/nsHTMLButtonControlFrame.cpp b/layout/html/forms/src/nsHTMLButtonControlFrame.cpp index 4a79f2a1d40..02d111285ca 100644 --- a/layout/html/forms/src/nsHTMLButtonControlFrame.cpp +++ b/layout/html/forms/src/nsHTMLButtonControlFrame.cpp @@ -432,21 +432,21 @@ nsHTMLButtonControlFrame::Paint(nsIPresContext* aPresContext, #else // temporary // XXX This is temporary - // clips to it's size minus the border and padding, + // clips to it's size minus the border // but the real problem is the FirstChild (the AreaFrame) // isn't being constrained properly // Bug #17474 const nsStyleSpacing* spacing; GetStyleData(eStyleStruct_Spacing, (const nsStyleStruct *&)spacing); - nsMargin borderPadding; - borderPadding.SizeTo(0, 0, 0, 0); - spacing->CalcBorderPaddingFor(this, borderPadding); + nsMargin border; + border.SizeTo(0, 0, 0, 0); + spacing->CalcBorderFor(this, border); nsRect rect; GetRect(rect); rect.x = 0; rect.y = 0; - rect.Deflate(borderPadding); + rect.Deflate(border); aRenderingContext.PushState(); PRBool clipEmpty;