author | Carsten "Tomcat" Book <cbook@mozilla.com> |
Wed, 08 Jun 2016 13:46:11 +0200 | |
changeset 301071 | fcc0cc7b8310f9487c8c1c9e1d9f65a297ba42b9 |
parent 301070 | 1a4ecd8c393b2239e959742925f70ceb3ef165a6 |
child 301072 | fe5a8d5d2de5288a19155305eec61c61347578e2 |
push id | 30325 |
push user | kwierso@gmail.com |
push date | Wed, 08 Jun 2016 23:17:01 +0000 |
treeherder | mozilla-central@051765f8237d [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
bugs | 1250704 |
milestone | 50.0a1 |
backs out | af36af25ecf403e930a86c541065193d1de583ed |
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
|
--- a/widget/gtk/WidgetStyleCache.cpp +++ b/widget/gtk/WidgetStyleCache.cpp @@ -159,39 +159,16 @@ GetWidget(WidgetNodeType aWidgetType) if (!widget) { widget = CreateWidget(aWidgetType); sWidgetStorage[aWidgetType] = widget; } return widget; } GtkStyleContext* -CreateStyleForWidget(GtkWidget* aWidget, GtkStyleContext* aParentStyle) -{ - GtkWidgetPath* path = - gtk_widget_path_copy(gtk_style_context_get_path(aParentStyle)); - - // Work around https://bugzilla.gnome.org/show_bug.cgi?id=767312 - // which exists in GTK+ 3.20. - gtk_widget_get_style_context(aWidget); - - gtk_widget_path_append_for_widget(path, aWidget); - // Release any floating reference on aWidget. - g_object_ref_sink(aWidget); - g_object_unref(aWidget); - - GtkStyleContext *context = gtk_style_context_new(); - gtk_style_context_set_path(context, path); - gtk_style_context_set_parent(context, aParentStyle); - gtk_widget_path_unref(path); - - return context; -} - -GtkStyleContext* CreateCSSNode(const char* aName, GtkStyleContext* aParentStyle, GType aType) { static auto sGtkWidgetPathIterSetObjectName = reinterpret_cast<void (*)(GtkWidgetPath *, gint, const char *)> (dlsym(RTLD_DEFAULT, "gtk_widget_path_iter_set_object_name")); GtkWidgetPath* path = aParentStyle ? gtk_widget_path_copy(gtk_style_context_get_path(aParentStyle)) :
--- a/widget/gtk/WidgetStyleCache.h +++ b/widget/gtk/WidgetStyleCache.h @@ -16,23 +16,16 @@ typedef unsigned StyleFlags; enum : StyleFlags { NO_STYLE_FLAGS, WHATEVER_MIGHT_BE_NEEDED = 1U << 0, }; GtkWidget* GetWidget(WidgetNodeType aNodeType); -/* - * Return a new style context based on aWidget, as a child of aParentStyle. - * If aWidget still has a floating reference, then it is sunk and released. - */ -GtkStyleContext* -CreateStyleForWidget(GtkWidget* aWidget, GtkStyleContext* aParentStyle); - // CreateCSSNode is implemented for gtk >= 3.20 only. GtkStyleContext* CreateCSSNode(const char* aName, GtkStyleContext* aParentStyle, GType aType = G_TYPE_NONE); // Callers must call ReleaseStyleContext() on the returned context. GtkStyleContext*
--- a/widget/gtk/mozgtk/mozgtk.c +++ b/widget/gtk/mozgtk/mozgtk.c @@ -513,17 +513,16 @@ STUB(gdk_device_manager_get_client_point STUB(gdk_disable_multidevice) STUB(gdk_device_manager_list_devices) STUB(gdk_display_get_device_manager) STUB(gdk_error_trap_pop_ignored) STUB(gdk_event_get_source_device) STUB(gdk_window_get_type) STUB(gdk_x11_window_get_xid) STUB(gdk_x11_display_get_type) -STUB(gtk_box_new) STUB(gtk_cairo_should_draw_window) STUB(gtk_cairo_transform_to_window) STUB(gtk_combo_box_text_append) STUB(gtk_drag_set_icon_surface) STUB(gtk_get_major_version) STUB(gtk_get_micro_version) STUB(gtk_get_minor_version) STUB(gtk_menu_button_new) @@ -569,17 +568,16 @@ STUB(gtk_style_context_set_direction) STUB(gtk_style_context_set_path) STUB(gtk_style_context_set_parent) STUB(gtk_style_context_set_state) STUB(gtk_style_properties_lookup_property) STUB(gtk_tree_view_column_get_button) STUB(gtk_widget_get_preferred_size) STUB(gtk_widget_get_state_flags) STUB(gtk_widget_get_style_context) -STUB(gtk_widget_path_append_for_widget) STUB(gtk_widget_path_append_type) STUB(gtk_widget_path_copy) STUB(gtk_widget_path_free) STUB(gtk_widget_path_new) STUB(gtk_widget_path_unref) STUB(gtk_widget_set_visual) STUB(gtk_app_chooser_dialog_new_for_content_type) STUB(gtk_app_chooser_get_type)
--- a/widget/gtk/nsLookAndFeel.cpp +++ b/widget/gtk/nsLookAndFeel.cpp @@ -1137,26 +1137,17 @@ nsLookAndFeel::Init() sMozWindowText = GDK_RGBA_TO_NS_RGBA(color); gtk_style_context_restore(style); g_object_unref(style); // tooltip foreground and background style = ClaimStyleContext(MOZ_GTK_TOOLTIP); gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color); sInfoBackground = GDK_RGBA_TO_NS_RGBA(color); - { - GtkStyleContext* boxStyle = - CreateStyleForWidget(gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0), - style); - GtkStyleContext* labelStyle = - CreateStyleForWidget(gtk_label_new(nullptr), boxStyle); - gtk_style_context_get_color(labelStyle, GTK_STATE_FLAG_NORMAL, &color); - g_object_unref(labelStyle); - g_object_unref(boxStyle); - } + gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color); sInfoText = GDK_RGBA_TO_NS_RGBA(color); ReleaseStyleContext(style); // menu foreground & menu background GtkWidget *accel_label = gtk_accel_label_new("M"); GtkWidget *menuitem = gtk_menu_item_new(); GtkWidget *menu = gtk_menu_new();