force a style resolution on context creation to set GTK 3.4 theming_engine

RESOLVED FIXED in Firefox 55

Status

()

Core
Widget: Gtk
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: karlt, Assigned: karlt)

Tracking

Trunk
mozilla55
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox55 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Assignee)

Description

a year ago
https://bugzilla.mozilla.org/show_bug.cgi?id=1223198#c23 noticed a bug in GTK 3.4 which means the theming engine is often not set before a style context is used.

https://bugzilla.mozilla.org/show_bug.cgi?id=1319650#c27 observed that working around this resolved bug 1222704 and bug 1269984, which became more frequent with the patches in bug 1319650.
Comment hidden (mozreview-request)
Comment on attachment 8864644 [details]
bug 1362170 force a style resolution on context creation to set GTK 3.4 theming_engine

https://reviewboard.mozilla.org/r/136314/#review139576

::: widget/gtk/WidgetStyleCache.cpp:727
(Diff revision 1)
> +  // That can result in incorrect drawing on first draw.  To work around this,
> +  // force a style look-up to set |theming_engine|.  It is sufficient to do
> +  // this only on context creation, instead of after every modification to the
> +  // context, because themes typically (Ambiance and oxygen-gtk, at least) set
> +  // the "engine" property with the '*' selector.
> +  if (gtk_get_minor_version() < 6) {

As gtk-4.0 is comming, can we have a complete 3.6 check here?
Attachment #8864644 - Flags: review?(stransky) → review+
Comment hidden (mozreview-request)
(Assignee)

Comment 4

a year ago
mozreview-review-reply
Comment on attachment 8864644 [details]
bug 1362170 force a style resolution on context creation to set GTK 3.4 theming_engine

https://reviewboard.mozilla.org/r/136314/#review139576

> As gtk-4.0 is comming, can we have a complete 3.6 check here?

I'm hoping 3.4 support can be removed before we need to think about 4, but I've
added a check in case this does not happen.  (Ubuntu 12.04 is already EOL, but
bug 1217931 tracks moving Mozilla infra off this version.)

Note that gtk_check_version(3, 6, 0) != nullptr would be true not only for GTK
3.4 but also 4.x, 5.x, etc.

I'm assuming GTK 3 builds will not run against GTK 4.
The gtk_style_context_get* method interfaces differ, for example.

Comment 5

a year ago
Pushed by ktomlinson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/81977c96c6ff
force a style resolution on context creation to set GTK 3.4 theming_engine r=stransky+263117

Comment 6

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/81977c96c6ff
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.