Bug 119837 - add a parameter to nsITheme::GetMinimumWidgetSize to specify if CSS is allowed to override the min size. r=bzbarsky, sr=hyatt.

This commit is contained in:
bryner%netscape.com 2005-08-20 07:12:10 +00:00
parent 98f7fdedf2
commit 9c50aa0b51
6 changed files with 13 additions and 7 deletions

View File

@ -333,9 +333,10 @@ nsNativeThemeGTK::GetWidgetBorder(nsIDeviceContext* aContext,
NS_IMETHODIMP
nsNativeThemeGTK::GetMinimumWidgetSize(nsIRenderingContext* aContext, nsIFrame* aFrame,
PRUint8 aWidgetType,
nsSize* aResult)
nsSize* aResult, PRBool* aIsOverridable)
{
aResult->width = aResult->height = 0;
*aIsOverridable = PR_TRUE;
switch (aWidgetType) {
case NS_THEME_SCROLLBAR_BUTTON_UP:

View File

@ -62,7 +62,8 @@ public:
NS_IMETHOD GetMinimumWidgetSize(nsIRenderingContext* aContext, nsIFrame* aFrame,
PRUint8 aWidgetType,
nsSize* aResult);
nsSize* aResult,
PRBool* aIsOverridable);
NS_IMETHOD WidgetStateChanged(nsIFrame* aFrame, PRUint8 aWidgetType,
nsIAtom* aAttribute, PRBool* aShouldRepaint);

View File

@ -333,9 +333,10 @@ nsNativeThemeGTK::GetWidgetBorder(nsIDeviceContext* aContext,
NS_IMETHODIMP
nsNativeThemeGTK::GetMinimumWidgetSize(nsIRenderingContext* aContext, nsIFrame* aFrame,
PRUint8 aWidgetType,
nsSize* aResult)
nsSize* aResult, PRBool* aIsOverridable)
{
aResult->width = aResult->height = 0;
*aIsOverridable = PR_TRUE;
switch (aWidgetType) {
case NS_THEME_SCROLLBAR_BUTTON_UP:

View File

@ -62,7 +62,8 @@ public:
NS_IMETHOD GetMinimumWidgetSize(nsIRenderingContext* aContext, nsIFrame* aFrame,
PRUint8 aWidgetType,
nsSize* aResult);
nsSize* aResult,
PRBool* aIsOverridable);
NS_IMETHOD WidgetStateChanged(nsIFrame* aFrame, PRUint8 aWidgetType,
nsIAtom* aAttribute, PRBool* aShouldRepaint);

View File

@ -783,12 +783,13 @@ nsNativeThemeWin::GetWidgetBorder(nsIDeviceContext* aContext,
NS_IMETHODIMP
nsNativeThemeWin::GetMinimumWidgetSize(nsIRenderingContext* aContext, nsIFrame* aFrame,
PRUint8 aWidgetType,
nsSize* aResult)
nsSize* aResult, PRBool* aIsOverridable)
{
if (!getThemePartSize)
return NS_ERROR_FAILURE;
(*aResult).width = (*aResult).height = 0;
*aIsOverridable = PR_TRUE;
if (aWidgetType == NS_THEME_TOOLBOX || aWidgetType == NS_THEME_TOOLBAR ||
aWidgetType == NS_THEME_STATUSBAR || aWidgetType == NS_THEME_PROGRESSBAR_CHUNK ||
@ -964,4 +965,4 @@ NS_METHOD NS_NewNativeTheme(nsISupports *aOuter, REFNSIID aIID, void **aResult)
if (!theme)
return NS_ERROR_OUT_OF_MEMORY;
return theme->QueryInterface(aIID, aResult);
}
}

View File

@ -45,7 +45,8 @@ public:
NS_IMETHOD GetMinimumWidgetSize(nsIRenderingContext* aContext, nsIFrame* aFrame,
PRUint8 aWidgetType,
nsSize* aResult);
nsSize* aResult,
PRBool* aIsOverridable);
NS_IMETHOD WidgetStateChanged(nsIFrame* aFrame, PRUint8 aWidgetType,
nsIAtom* aAttribute, PRBool* aShouldRepaint);