mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Prefer do_GetAtom to dont_AddRef(NS_NewAtom(...)). Also, tweak the borders on checkbox/radio buttons and containers a bit. Not part of the build.
This commit is contained in:
parent
b4695d9e0b
commit
341d327dbe
@ -70,12 +70,12 @@ nsNativeThemeGTK::nsNativeThemeGTK()
|
||||
mProtoLayout(nsnull)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
mDisabledAtom = getter_AddRefs(NS_NewAtom("disabled"));
|
||||
mCheckedAtom = getter_AddRefs(NS_NewAtom("checked"));
|
||||
mSelectedAtom = getter_AddRefs(NS_NewAtom("selected"));
|
||||
mInputCheckedAtom = getter_AddRefs(NS_NewAtom("_moz-input-checked"));
|
||||
mInputAtom = getter_AddRefs(NS_NewAtom("input"));
|
||||
mFocusedAtom = getter_AddRefs(NS_NewAtom("focused"));
|
||||
mDisabledAtom = do_GetAtom("disabled");
|
||||
mCheckedAtom = do_GetAtom("checked");
|
||||
mSelectedAtom = do_GetAtom("selected");
|
||||
mInputCheckedAtom = do_GetAtom("_moz-input-checked");
|
||||
mInputAtom = do_GetAtom("input");
|
||||
mFocusedAtom = do_GetAtom("focused");
|
||||
}
|
||||
|
||||
nsNativeThemeGTK::~nsNativeThemeGTK() {
|
||||
@ -358,11 +358,6 @@ nsNativeThemeGTK::GetWidgetBorder(nsIDeviceContext* aContext, nsIFrame* aFrame,
|
||||
EnsureButtonWidget();
|
||||
WidgetBorderToMargin(gButtonWidget, aResult);
|
||||
break;
|
||||
case NS_THEME_CHECKBOX:
|
||||
case NS_THEME_RADIO:
|
||||
EnsureCheckBoxWidget();
|
||||
WidgetBorderToMargin(gCheckboxWidget, aResult);
|
||||
break;
|
||||
case NS_THEME_TOOLBAR_GRIPPER:
|
||||
EnsureGripperWidget();
|
||||
WidgetBorderToMargin(gGripperWidget, aResult);
|
||||
@ -371,6 +366,10 @@ nsNativeThemeGTK::GetWidgetBorder(nsIDeviceContext* aContext, nsIFrame* aFrame,
|
||||
EnsureArrowWidget();
|
||||
WidgetBorderToMargin(gDropdownButtonWidget, aResult);
|
||||
break;
|
||||
case NS_THEME_CHECKBOX_CONTAINER:
|
||||
case NS_THEME_RADIO_CONTAINER:
|
||||
aResult->top = aResult->bottom = aResult->left = aResult->right = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -70,12 +70,12 @@ nsNativeThemeGTK::nsNativeThemeGTK()
|
||||
mProtoLayout(nsnull)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
mDisabledAtom = getter_AddRefs(NS_NewAtom("disabled"));
|
||||
mCheckedAtom = getter_AddRefs(NS_NewAtom("checked"));
|
||||
mSelectedAtom = getter_AddRefs(NS_NewAtom("selected"));
|
||||
mInputCheckedAtom = getter_AddRefs(NS_NewAtom("_moz-input-checked"));
|
||||
mInputAtom = getter_AddRefs(NS_NewAtom("input"));
|
||||
mFocusedAtom = getter_AddRefs(NS_NewAtom("focused"));
|
||||
mDisabledAtom = do_GetAtom("disabled");
|
||||
mCheckedAtom = do_GetAtom("checked");
|
||||
mSelectedAtom = do_GetAtom("selected");
|
||||
mInputCheckedAtom = do_GetAtom("_moz-input-checked");
|
||||
mInputAtom = do_GetAtom("input");
|
||||
mFocusedAtom = do_GetAtom("focused");
|
||||
}
|
||||
|
||||
nsNativeThemeGTK::~nsNativeThemeGTK() {
|
||||
@ -358,11 +358,6 @@ nsNativeThemeGTK::GetWidgetBorder(nsIDeviceContext* aContext, nsIFrame* aFrame,
|
||||
EnsureButtonWidget();
|
||||
WidgetBorderToMargin(gButtonWidget, aResult);
|
||||
break;
|
||||
case NS_THEME_CHECKBOX:
|
||||
case NS_THEME_RADIO:
|
||||
EnsureCheckBoxWidget();
|
||||
WidgetBorderToMargin(gCheckboxWidget, aResult);
|
||||
break;
|
||||
case NS_THEME_TOOLBAR_GRIPPER:
|
||||
EnsureGripperWidget();
|
||||
WidgetBorderToMargin(gGripperWidget, aResult);
|
||||
@ -371,6 +366,10 @@ nsNativeThemeGTK::GetWidgetBorder(nsIDeviceContext* aContext, nsIFrame* aFrame,
|
||||
EnsureArrowWidget();
|
||||
WidgetBorderToMargin(gDropdownButtonWidget, aResult);
|
||||
break;
|
||||
case NS_THEME_CHECKBOX_CONTAINER:
|
||||
case NS_THEME_RADIO_CONTAINER:
|
||||
aResult->top = aResult->bottom = aResult->left = aResult->right = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user