Bug 1963446 - Remove unused button-arrow-{previous,next} appearance values. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D247163
This commit is contained in:
committed by
ealvarez@mozilla.com
parent
b4de3210d6
commit
00fefccf69
@@ -1502,10 +1502,6 @@ pub enum Appearance {
|
|||||||
#[parse(condition = "ParserContext::chrome_rules_enabled")]
|
#[parse(condition = "ParserContext::chrome_rules_enabled")]
|
||||||
ButtonArrowDown,
|
ButtonArrowDown,
|
||||||
#[parse(condition = "ParserContext::chrome_rules_enabled")]
|
#[parse(condition = "ParserContext::chrome_rules_enabled")]
|
||||||
ButtonArrowNext,
|
|
||||||
#[parse(condition = "ParserContext::chrome_rules_enabled")]
|
|
||||||
ButtonArrowPrevious,
|
|
||||||
#[parse(condition = "ParserContext::chrome_rules_enabled")]
|
|
||||||
ButtonArrowUp,
|
ButtonArrowUp,
|
||||||
/// Menu Popup background.
|
/// Menu Popup background.
|
||||||
#[parse(condition = "ParserContext::chrome_rules_enabled")]
|
#[parse(condition = "ParserContext::chrome_rules_enabled")]
|
||||||
|
|||||||
@@ -774,20 +774,7 @@ static gint moz_gtk_arrow_paint(cairo_t* cr, GdkRectangle* rect,
|
|||||||
GdkRectangle arrow_rect;
|
GdkRectangle arrow_rect;
|
||||||
gdouble arrow_angle;
|
gdouble arrow_angle;
|
||||||
|
|
||||||
if (direction == GTK_TEXT_DIR_RTL) {
|
|
||||||
if (arrow_type == GTK_ARROW_LEFT) {
|
|
||||||
arrow_type = GTK_ARROW_RIGHT;
|
|
||||||
} else if (arrow_type == GTK_ARROW_RIGHT) {
|
|
||||||
arrow_type = GTK_ARROW_LEFT;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
switch (arrow_type) {
|
switch (arrow_type) {
|
||||||
case GTK_ARROW_LEFT:
|
|
||||||
arrow_angle = ARROW_LEFT;
|
|
||||||
break;
|
|
||||||
case GTK_ARROW_RIGHT:
|
|
||||||
arrow_angle = ARROW_RIGHT;
|
|
||||||
break;
|
|
||||||
case GTK_ARROW_DOWN:
|
case GTK_ARROW_DOWN:
|
||||||
arrow_angle = ARROW_DOWN;
|
arrow_angle = ARROW_DOWN;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -266,18 +266,12 @@ bool nsNativeThemeGTK::GetGtkWidgetAndState(StyleAppearance aAppearance,
|
|||||||
case StyleAppearance::ToolbarbuttonDropdown:
|
case StyleAppearance::ToolbarbuttonDropdown:
|
||||||
case StyleAppearance::ButtonArrowDown:
|
case StyleAppearance::ButtonArrowDown:
|
||||||
case StyleAppearance::ButtonArrowUp:
|
case StyleAppearance::ButtonArrowUp:
|
||||||
case StyleAppearance::ButtonArrowNext:
|
|
||||||
case StyleAppearance::ButtonArrowPrevious:
|
|
||||||
aGtkWidgetType = MOZ_GTK_TOOLBARBUTTON_ARROW;
|
aGtkWidgetType = MOZ_GTK_TOOLBARBUTTON_ARROW;
|
||||||
if (aWidgetFlags) {
|
if (aWidgetFlags) {
|
||||||
*aWidgetFlags = GTK_ARROW_DOWN;
|
*aWidgetFlags = GTK_ARROW_DOWN;
|
||||||
|
|
||||||
if (aAppearance == StyleAppearance::ButtonArrowUp)
|
if (aAppearance == StyleAppearance::ButtonArrowUp)
|
||||||
*aWidgetFlags = GTK_ARROW_UP;
|
*aWidgetFlags = GTK_ARROW_UP;
|
||||||
else if (aAppearance == StyleAppearance::ButtonArrowNext)
|
|
||||||
*aWidgetFlags = GTK_ARROW_RIGHT;
|
|
||||||
else if (aAppearance == StyleAppearance::ButtonArrowPrevious)
|
|
||||||
*aWidgetFlags = GTK_ARROW_LEFT;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case StyleAppearance::ProgressBar:
|
case StyleAppearance::ProgressBar:
|
||||||
@@ -853,8 +847,6 @@ bool nsNativeThemeGTK::GetWidgetPadding(nsDeviceContext* aContext,
|
|||||||
case StyleAppearance::ToolbarbuttonDropdown:
|
case StyleAppearance::ToolbarbuttonDropdown:
|
||||||
case StyleAppearance::ButtonArrowUp:
|
case StyleAppearance::ButtonArrowUp:
|
||||||
case StyleAppearance::ButtonArrowDown:
|
case StyleAppearance::ButtonArrowDown:
|
||||||
case StyleAppearance::ButtonArrowNext:
|
|
||||||
case StyleAppearance::ButtonArrowPrevious:
|
|
||||||
case StyleAppearance::RangeThumb:
|
case StyleAppearance::RangeThumb:
|
||||||
aResult->SizeTo(0, 0, 0, 0);
|
aResult->SizeTo(0, 0, 0, 0);
|
||||||
return true;
|
return true;
|
||||||
@@ -942,9 +934,7 @@ LayoutDeviceIntSize nsNativeThemeGTK::GetMinimumWidgetSize(
|
|||||||
} break;
|
} break;
|
||||||
case StyleAppearance::ToolbarbuttonDropdown:
|
case StyleAppearance::ToolbarbuttonDropdown:
|
||||||
case StyleAppearance::ButtonArrowUp:
|
case StyleAppearance::ButtonArrowUp:
|
||||||
case StyleAppearance::ButtonArrowDown:
|
case StyleAppearance::ButtonArrowDown: {
|
||||||
case StyleAppearance::ButtonArrowNext:
|
|
||||||
case StyleAppearance::ButtonArrowPrevious: {
|
|
||||||
moz_gtk_get_arrow_size(MOZ_GTK_TOOLBARBUTTON_ARROW, &result.width,
|
moz_gtk_get_arrow_size(MOZ_GTK_TOOLBARBUTTON_ARROW, &result.width,
|
||||||
&result.height);
|
&result.height);
|
||||||
} break;
|
} break;
|
||||||
@@ -1037,8 +1027,6 @@ nsNativeThemeGTK::ThemeSupportsWidget(nsPresContext* aPresContext,
|
|||||||
case StyleAppearance::ToolbarbuttonDropdown:
|
case StyleAppearance::ToolbarbuttonDropdown:
|
||||||
case StyleAppearance::ButtonArrowUp:
|
case StyleAppearance::ButtonArrowUp:
|
||||||
case StyleAppearance::ButtonArrowDown:
|
case StyleAppearance::ButtonArrowDown:
|
||||||
case StyleAppearance::ButtonArrowNext:
|
|
||||||
case StyleAppearance::ButtonArrowPrevious:
|
|
||||||
case StyleAppearance::Listbox:
|
case StyleAppearance::Listbox:
|
||||||
case StyleAppearance::ProgressBar:
|
case StyleAppearance::ProgressBar:
|
||||||
case StyleAppearance::Progresschunk:
|
case StyleAppearance::Progresschunk:
|
||||||
@@ -1068,10 +1056,9 @@ nsNativeThemeGTK::WidgetIsContainer(StyleAppearance aAppearance) {
|
|||||||
// XXXdwh At some point flesh all of this out.
|
// XXXdwh At some point flesh all of this out.
|
||||||
if (aAppearance == StyleAppearance::RangeThumb ||
|
if (aAppearance == StyleAppearance::RangeThumb ||
|
||||||
aAppearance == StyleAppearance::ButtonArrowUp ||
|
aAppearance == StyleAppearance::ButtonArrowUp ||
|
||||||
aAppearance == StyleAppearance::ButtonArrowDown ||
|
aAppearance == StyleAppearance::ButtonArrowDown) {
|
||||||
aAppearance == StyleAppearance::ButtonArrowNext ||
|
|
||||||
aAppearance == StyleAppearance::ButtonArrowPrevious)
|
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,8 +54,6 @@ NS_IMPL_ISUPPORTS(nsNativeTheme, nsITimerCallback, nsINamed)
|
|||||||
if (aAppearance == StyleAppearance::Checkbox ||
|
if (aAppearance == StyleAppearance::Checkbox ||
|
||||||
aAppearance == StyleAppearance::Radio ||
|
aAppearance == StyleAppearance::Radio ||
|
||||||
aAppearance == StyleAppearance::ToolbarbuttonDropdown ||
|
aAppearance == StyleAppearance::ToolbarbuttonDropdown ||
|
||||||
aAppearance == StyleAppearance::ButtonArrowPrevious ||
|
|
||||||
aAppearance == StyleAppearance::ButtonArrowNext ||
|
|
||||||
aAppearance == StyleAppearance::ButtonArrowUp ||
|
aAppearance == StyleAppearance::ButtonArrowUp ||
|
||||||
#ifdef MOZ_WIDGET_GTK
|
#ifdef MOZ_WIDGET_GTK
|
||||||
aAppearance == StyleAppearance::MozWindowButtonClose ||
|
aAppearance == StyleAppearance::MozWindowButtonClose ||
|
||||||
|
|||||||
Reference in New Issue
Block a user