зеркало из https://github.com/mozilla/pjs.git
Added macro to help in figuring Nav Quirks default size for all
controls ifdef for just me r=kmcclusk
This commit is contained in:
Родитель
d170030b32
Коммит
487a041f85
|
@ -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:
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче