1) Implemented regular button and html4 button with a button renderer.
2) Fixed ProgressMeter to update correctly when attributes change 3) Fixed sample8.html so that it does not over ride the borders of the HTML4 button this messed up the active, hover, and disabled states. git-svn-id: svn://10.0.0.236/trunk@23070 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -296,16 +296,25 @@ nsFormControlHelper::CalculateSize (nsIPresContext* aPresContext,
|
||||
}
|
||||
}
|
||||
|
||||
// add inside padding if necessary
|
||||
if (!aWidthExplicit) {
|
||||
PRInt32 hPadding = (2 * aFrame->GetHorizontalInsidePadding(*aPresContext, p2t, aDesiredSize.width, charWidth));
|
||||
aDesiredSize.width += hPadding;
|
||||
aMinSize.width += hPadding;
|
||||
}
|
||||
if (!aHeightExplicit) {
|
||||
PRInt32 vPadding = (2 * aFrame->GetVerticalInsidePadding(p2t, aRowHeight));
|
||||
aDesiredSize.height += vPadding;
|
||||
aMinSize.height += vPadding;
|
||||
nsWidgetRendering mode;
|
||||
aPresContext->GetWidgetRenderingMode(&mode);
|
||||
|
||||
// only add in padding if we are not Gfx
|
||||
PRBool requiresWidget = PR_FALSE;
|
||||
|
||||
aFrame->RequiresWidget(requiresWidget);
|
||||
|
||||
if (PR_TRUE == requiresWidget || eWidgetRendering_Gfx != mode) {
|
||||
if (!aWidthExplicit) {
|
||||
PRInt32 hPadding = (2 * aFrame->GetHorizontalInsidePadding(*aPresContext, p2t, aDesiredSize.width, charWidth));
|
||||
aDesiredSize.width += hPadding;
|
||||
aMinSize.width += hPadding;
|
||||
}
|
||||
if (!aHeightExplicit) {
|
||||
PRInt32 vPadding = (2 * aFrame->GetVerticalInsidePadding(p2t, aRowHeight));
|
||||
aDesiredSize.height += vPadding;
|
||||
aMinSize.height += vPadding;
|
||||
}
|
||||
}
|
||||
|
||||
NS_RELEASE(hContent);
|
||||
@@ -328,6 +337,19 @@ nsFormControlHelper::GetFont(nsIFormControlFrame * aFormFrame,
|
||||
{
|
||||
const nsStyleFont* styleFont = (const nsStyleFont*)aStyleContext->GetStyleData(eStyleStruct_Font);
|
||||
|
||||
nsWidgetRendering m;
|
||||
aPresContext->GetWidgetRenderingMode(&m);
|
||||
|
||||
// only add in padding if we are not Gfx
|
||||
PRBool requiresWidget = PR_FALSE;
|
||||
|
||||
aFormFrame->RequiresWidget(requiresWidget);
|
||||
|
||||
if (PR_TRUE != requiresWidget && eWidgetRendering_Gfx == m) {
|
||||
aFont = styleFont->mFont;
|
||||
return;
|
||||
}
|
||||
|
||||
nsCompatibility mode;
|
||||
aPresContext->GetCompatibilityMode(&mode);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user