RESOLVED FIXED 75467
[GTK] Fix scrollbars size with GTK+ 3.x
https://bugs.webkit.org/show_bug.cgi?id=75467
Summary [GTK] Fix scrollbars size with GTK+ 3.x
Carlos Garcia Campos
Reported 2012-01-03 03:03:31 PST
The problem is that GTK+ code that queries the style properties ignores the GtkStyleContext, and uses GtkWidgetPath. This should work in GTK+ but the style properties will be deprecated soon, so we could just add the style classes to the GtkWidgetPatch when creating GtkStyleContext objects as a workaround for now.
Attachments
Patch (2.65 KB, patch)
2012-01-03 03:08 PST, Carlos Garcia Campos
xan.lopez: review+
Carlos Garcia Campos
Comment 1 2012-01-03 03:08:23 PST
Created attachment 120925 [details] Patch I don't like the ifs, but we can't use a switch because GTK_TYPE macros expand to _get_type() functions and can't be used in switchs, and a static table mapping style classes to widget stypes would call _get_type() for every widget type.
Xan Lopez
Comment 2 2012-01-03 03:16:48 PST
Comment on attachment 120925 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=120925&action=review I think I would just have one call to gtk_widget_path_iter_add_class and set the right style class to a variable in the ifs, but other than that it looks OK to me. There are no tests that need updating because of this? > Source/WebCore/platform/gtk/RenderThemeGtk3.cpp:92 > + gtk_widget_path_iter_add_class(path, 0, "arrow"); I suppose this does not use GTK_STYLE_CLASS_ARROW because it was added later?
Carlos Garcia Campos
Comment 3 2012-01-03 03:36:57 PST
(In reply to comment #2) > (From update of attachment 120925 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=120925&action=review > > I think I would just have one call to gtk_widget_path_iter_add_class and set the right style class to a variable in the ifs, but other than that it looks OK to me. Ok, I'll change that. > There are no tests that need updating because of this? hmm, I guess this might break tests using scrolbars for example. > > Source/WebCore/platform/gtk/RenderThemeGtk3.cpp:92 > > + gtk_widget_path_iter_add_class(path, 0, "arrow"); > > I suppose this does not use GTK_STYLE_CLASS_ARROW because it was added later? Yes, it didn't exist, I'm not sure if it exists now or when it was added.
Carlos Garcia Campos
Comment 4 2012-01-03 06:15:00 PST
(In reply to comment #3) > (In reply to comment #2) > > (From update of attachment 120925 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=120925&action=review > > > > I think I would just have one call to gtk_widget_path_iter_add_class and set the right style class to a variable in the ifs, but other than that it looks OK to me. > > Ok, I'll change that. We don't want to call gtk_widget_path_iter_add_class() at all in case widget types is unknown so we would need another if to check whether the variables has been set or not.
Carlos Garcia Campos
Comment 5 2012-01-03 06:16:01 PST
Martin Robinson
Comment 6 2012-02-20 13:16:04 PST
*** Bug 63307 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.