Bug 1389133 - don't invalidate style content for missing widgets, r=karlt
authorMartin Stransky <stransky@redhat.com>
Thu, 10 Aug 2017 18:07:41 +0200
changeset 374320 dcbf487465debe6e418677b2c9d984f57b2df394
parent 374319 454fabe957f26b4e08d814f17610b6679e944ed7
child 374321 5279a1edf8aeb09f641090ce7bf03b9f0fc16626
push id32320
push userarchaeopteryx@coole-files.de
push dateSat, 12 Aug 2017 21:35:10 +0000
treeherdermozilla-central@6062341662fc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskarlt
bugs1389133
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1389133 - don't invalidate style content for missing widgets, r=karlt MozReview-Commit-ID: 2KfjYGvsiVv
widget/gtk/WidgetStyleCache.cpp
--- a/widget/gtk/WidgetStyleCache.cpp
+++ b/widget/gtk/WidgetStyleCache.cpp
@@ -617,16 +617,20 @@ CreateWidget(WidgetNodeType aWidgetType)
 }
 
 GtkWidget*
 GetWidget(WidgetNodeType aWidgetType)
 {
   GtkWidget* widget = sWidgetStorage[aWidgetType];
   if (!widget) {
     widget = CreateWidget(aWidgetType);
+    // Some widgets (MOZ_GTK_COMBOBOX_SEPARATOR for instance) may not be
+    // available or implemented.
+    if (!widget)
+      return nullptr;
     // In GTK versions prior to 3.18, automatic invalidation of style contexts
     // for widgets was delayed until the next resize event.  Gecko however,
     // typically uses the style context before the resize event runs and so an
     // explicit invalidation may be required.  This is necessary if a style
     // property was retrieved before all changes were made to the style
     // context.  One such situation is where gtk_button_construct_child()
     // retrieves the style property "image-spacing" during construction of the
     // GtkButton, before its parent is set to provide inheritance of ancestor