зеркало из https://github.com/mozilla/pjs.git
b=624425 Initialize gtk2drawing before using moz_gtk_get_scrollbar_widget() for eMetric_ScrollArrowStyle r+a=roc
--HG-- extra : transplant_source : %9C%92%1A%19%CF8%14%EA%D6%DE%E5%85%84%1C%C6%A5%11%B7%9B%7F
This commit is contained in:
Родитель
606435b594
Коммит
e8643bfe7f
|
@ -789,6 +789,9 @@ moz_gtk_init()
|
|||
{
|
||||
GtkWidgetClass *entry_class;
|
||||
|
||||
if (is_initialized)
|
||||
return MOZ_GTK_SUCCESS;
|
||||
|
||||
is_initialized = TRUE;
|
||||
have_arrow_scaling = (gtk_major_version > 2 ||
|
||||
(gtk_major_version == 2 && gtk_minor_version >= 12));
|
||||
|
@ -3362,8 +3365,7 @@ moz_gtk_widget_paint(GtkThemeWidgetType widget, GdkDrawable* drawable,
|
|||
|
||||
GtkWidget* moz_gtk_get_scrollbar_widget(void)
|
||||
{
|
||||
if (!is_initialized)
|
||||
return NULL;
|
||||
NS_ASSERTION(is_initialized, "Forgot to call moz_gtk_init()");
|
||||
ensure_scrollbar_widget();
|
||||
return gHorizScrollbarWidget;
|
||||
}
|
||||
|
|
|
@ -489,6 +489,7 @@ NS_IMETHODIMP nsLookAndFeel::GetMetric(const nsMetricID aID, PRInt32 & aMetric)
|
|||
}
|
||||
break;
|
||||
case eMetric_ScrollArrowStyle:
|
||||
moz_gtk_init();
|
||||
aMetric =
|
||||
ConvertGTKStepperStyleToMozillaScrollArrowStyle(moz_gtk_get_scrollbar_widget());
|
||||
break;
|
||||
|
|
Загрузка…
Ссылка в новой задаче