mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 474825 - honor mozilla.widget.disable-native-theme preference. move preference check to the right place r=stuart
This commit is contained in:
parent
ede7e6d142
commit
a4f3879420
@ -78,38 +78,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsLookAndFeel)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsToolkit)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsScreenManagerWin)
|
||||
|
||||
// from nsWindow.cpp
|
||||
extern PRBool gDisableNativeTheme;
|
||||
|
||||
static NS_IMETHODIMP
|
||||
nsNativeThemeWinConstructor(nsISupports *aOuter, REFNSIID aIID,
|
||||
void **aResult)
|
||||
{
|
||||
nsresult rv;
|
||||
nsNativeThemeWin * inst;
|
||||
|
||||
if (gDisableNativeTheme)
|
||||
return NS_ERROR_NO_INTERFACE;
|
||||
|
||||
*aResult = NULL;
|
||||
if (NULL != aOuter) {
|
||||
rv = NS_ERROR_NO_AGGREGATION;
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_NEWXPCOM(inst, nsNativeThemeWin);
|
||||
if (NULL == inst) {
|
||||
rv = NS_ERROR_OUT_OF_MEMORY;
|
||||
return rv;
|
||||
}
|
||||
NS_ADDREF(inst);
|
||||
rv = inst->QueryInterface(aIID, aResult);
|
||||
NS_RELEASE(inst);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
#ifndef WINCE
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboard)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboardHelper)
|
||||
|
@ -2771,8 +2771,15 @@ nsNativeThemeWin::GetWidgetNativeDrawingFlags(PRUint8 aWidgetType)
|
||||
///////////////////////////////////////////
|
||||
// Creation Routine
|
||||
///////////////////////////////////////////
|
||||
|
||||
// from nsWindow.cpp
|
||||
extern PRBool gDisableNativeTheme;
|
||||
|
||||
NS_METHOD NS_NewNativeTheme(nsISupports *aOuter, REFNSIID aIID, void **aResult)
|
||||
{
|
||||
if (gDisableNativeTheme)
|
||||
return NS_ERROR_NO_INTERFACE;
|
||||
|
||||
if (aOuter)
|
||||
return NS_ERROR_NO_AGGREGATION;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user