Added macro to help in figuring Nav Quirks default size for all

controls ifdef for just me r=kmcclusk
This commit is contained in:
rods%netscape.com 1999-10-07 21:07:38 +00:00
Родитель d170030b32
Коммит 487a041f85
10 изменённых файлов: 100 добавлений и 14 удалений

Просмотреть файл

@ -159,11 +159,12 @@ nsGfxButtonControlFrame::AddComputedBorderPaddingToDesiredSize(nsHTMLReflowMetri
NS_IMETHODIMP
nsGfxButtonControlFrame::Reflow(nsIPresContext& aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
// The mFormFrame is set in the initial reflow within nsHTMLButtonControlFrame
nsresult rv = NS_OK;
if ((kSuggestedNotSet != mSuggestedWidth) ||
(kSuggestedNotSet != mSuggestedHeight)) {
@ -179,11 +180,15 @@ nsGfxButtonControlFrame::Reflow(nsIPresContext& aPresContext,
suggestedReflowState.mComputedHeight = mSuggestedHeight;
}
return nsHTMLButtonControlFrame::Reflow(aPresContext, aDesiredSize, suggestedReflowState, aStatus);
rv = nsHTMLButtonControlFrame::Reflow(aPresContext, aDesiredSize, suggestedReflowState, aStatus);
} else { // Normal reflow.
return nsHTMLButtonControlFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
rv = nsHTMLButtonControlFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
}
COMPARE_QUIRK_SIZE("nsGfxButtonControlFrame", 36, 24) //with the text "one" in it
return rv;
}
NS_IMETHODIMP

Просмотреть файл

@ -174,7 +174,6 @@ nsGfxCheckboxControlFrame :: GetCheckboxState ( )
return mChecked;
}
void
nsGfxCheckboxControlFrame :: SetCheckboxState ( nsCheckboxControlFrame::CheckState aValue )
{
@ -182,3 +181,16 @@ nsGfxCheckboxControlFrame :: SetCheckboxState ( nsCheckboxControlFrame::CheckSta
nsFormControlHelper::ForceDrawFrame(this);
}
#ifdef DEBUG_rods
NS_IMETHODIMP
nsGfxCheckboxControlFrame::Reflow(nsIPresContext& aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
nsresult rv = nsNativeFormControlFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
COMPARE_QUIRK_SIZE("nsGfxCheckboxControlFrame", 13, 13)
return rv;
}
#endif

Просмотреть файл

@ -36,7 +36,13 @@ public:
nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect,
nsFramePaintLayer aWhichLayer);
#ifdef DEBUG_rods
NS_IMETHOD Reflow(nsIPresContext& aCX,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
#endif
protected:
virtual CheckState GetCheckboxState();
virtual void SetCheckboxState(CheckState aValue);

Просмотреть файл

@ -168,3 +168,17 @@ void nsGfxRadioControlFrame::SetRadioState(PRBool aValue)
mChecked = aValue;
nsFormControlHelper::ForceDrawFrame(this);
}
#ifdef DEBUG_rods
NS_IMETHODIMP
nsGfxRadioControlFrame::Reflow(nsIPresContext& aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
nsresult rv = nsNativeFormControlFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
COMPARE_QUIRK_SIZE("nsGfxRadioControlFrame", 12, 11)
return rv;
}
#endif

Просмотреть файл

@ -60,6 +60,12 @@ public:
const nsRect& aDirtyRect);
///XXX: End o the temporary methods
#ifdef DEBUG_rods
NS_IMETHOD Reflow(nsIPresContext& aCX,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
#endif
protected:

Просмотреть файл

@ -159,11 +159,12 @@ nsGfxButtonControlFrame::AddComputedBorderPaddingToDesiredSize(nsHTMLReflowMetri
NS_IMETHODIMP
nsGfxButtonControlFrame::Reflow(nsIPresContext& aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
// The mFormFrame is set in the initial reflow within nsHTMLButtonControlFrame
nsresult rv = NS_OK;
if ((kSuggestedNotSet != mSuggestedWidth) ||
(kSuggestedNotSet != mSuggestedHeight)) {
@ -179,11 +180,15 @@ nsGfxButtonControlFrame::Reflow(nsIPresContext& aPresContext,
suggestedReflowState.mComputedHeight = mSuggestedHeight;
}
return nsHTMLButtonControlFrame::Reflow(aPresContext, aDesiredSize, suggestedReflowState, aStatus);
rv = nsHTMLButtonControlFrame::Reflow(aPresContext, aDesiredSize, suggestedReflowState, aStatus);
} else { // Normal reflow.
return nsHTMLButtonControlFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
rv = nsHTMLButtonControlFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
}
COMPARE_QUIRK_SIZE("nsGfxButtonControlFrame", 36, 24) //with the text "one" in it
return rv;
}
NS_IMETHODIMP

Просмотреть файл

@ -174,7 +174,6 @@ nsGfxCheckboxControlFrame :: GetCheckboxState ( )
return mChecked;
}
void
nsGfxCheckboxControlFrame :: SetCheckboxState ( nsCheckboxControlFrame::CheckState aValue )
{
@ -182,3 +181,16 @@ nsGfxCheckboxControlFrame :: SetCheckboxState ( nsCheckboxControlFrame::CheckSta
nsFormControlHelper::ForceDrawFrame(this);
}
#ifdef DEBUG_rods
NS_IMETHODIMP
nsGfxCheckboxControlFrame::Reflow(nsIPresContext& aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
nsresult rv = nsNativeFormControlFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
COMPARE_QUIRK_SIZE("nsGfxCheckboxControlFrame", 13, 13)
return rv;
}
#endif

Просмотреть файл

@ -36,7 +36,13 @@ public:
nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect,
nsFramePaintLayer aWhichLayer);
#ifdef DEBUG_rods
NS_IMETHOD Reflow(nsIPresContext& aCX,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
#endif
protected:
virtual CheckState GetCheckboxState();
virtual void SetCheckboxState(CheckState aValue);

Просмотреть файл

@ -168,3 +168,17 @@ void nsGfxRadioControlFrame::SetRadioState(PRBool aValue)
mChecked = aValue;
nsFormControlHelper::ForceDrawFrame(this);
}
#ifdef DEBUG_rods
NS_IMETHODIMP
nsGfxRadioControlFrame::Reflow(nsIPresContext& aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
nsresult rv = nsNativeFormControlFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
COMPARE_QUIRK_SIZE("nsGfxRadioControlFrame", 12, 11)
return rv;
}
#endif

Просмотреть файл

@ -60,6 +60,12 @@ public:
const nsRect& aDirtyRect);
///XXX: End o the temporary methods
#ifdef DEBUG_rods
NS_IMETHOD Reflow(nsIPresContext& aCX,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
#endif
protected: