Closed Bug 1268462 Opened 4 years ago Closed 4 years ago

[gtk3] Not consistent submenu popup back ground color. And menu highlight is invisible

Categories

(Firefox :: Theme, defect)

46 Branch
Unspecified
Linux
defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 50
Tracking Status
firefox46 + wontfix
firefox47 + wontfix
firefox48 + verified
firefox49 + verified
firefox-esr38 --- unaffected
firefox-esr45 --- unaffected
firefox50 --- verified

People

(Reporter: alice0775, Assigned: Gijs)

References

Details

(Keywords: regression)

Attachments

(3 files)

Attached image screenshot
Since Firefox46. Submenu color is broken on Ubuntu14.04 default theme.
See screenshot.
Blocks: gtk3
Summary: Not consistent submenu popup back ground color. And menu highlight is invisible → [gtk3] Not consistent submenu popup back ground color. And menu highlight is invisible
See Also: → 1269523
I think it's caused by mixed internal and system (gtk) menus in Firefox. The bookmarks, settings, download pop-ups are rendered by Firefox internal css colors but menus are rendered by gtk with system color. It think internal popups can't be mixed with system widgets.

As you can see even the first picture (with the same menu color) has a different sub-menu style. The sub-menu is shadowed and "behind" the firefox menu.

IMHO the fix would be to convert the submenu to Firefox internal one.
> different sub-menu style. The sub-menu is shadowed and "behind" the firefox
> menu.

Ehh, sorry, the shadowed system menu is in front of the Firefox one.
Recent regression, tracking. 
Unlikely to be fixed in 46 though.
(In reply to Karl Tomlinson (ni?:karlt) from comment #5)
> Comment on attachment 8752622 [details]
> Light theme suchas "Radiance"
> 
> This looks like it may be

bug 1272194, I mean.
(In reply to Karl Tomlinson (ni?:karlt) from comment #6)
> (In reply to Karl Tomlinson (ni?:karlt) from comment #5)
> > Comment on attachment 8752622 [details]
> > Light theme suchas "Radiance"
> > 
> > This looks like it may be
> 
> bug 1272194, I mean.

I can still reproduce.
Goodbye, Firefox.

https://hg.mozilla.org/mozilla-central/rev/3435dd7ad71fe9003bdeee18fd38d815e033beef
Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0 ID:20160530071207
Whiteboard: [dupe me]
(In reply to Alice0775 White from comment #7)
> 3435dd7ad71fe9003bdeee18fd38d815e033beef
> Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0
> ID:20160530071207

Attachment 8752622 [details] is not reproducing for me with that build and Radiance.

Attachment 8746505 [details] is still reproducing with Ambiance.
If attachment 8746505 [details] is the remaining issue here, this sounds a lot like an existing/older (fixed?) bug with the mix of pseudo-menuitems in the <panel> being mixed with the actual <menu> submenus... I'm not sure I understand why it ever worked before?

Gijs, suggestions on what the fix here should be? Is this a front-end issue, or problem with how GTK3 menu styles are being picked up?
Flags: needinfo?(gijskruitbosch+bugs)
See Also: → 1275700
I think the behavior of gtk code  is responsible for this issue. The implementation of the -moz-appearance rule is in GTK code in Firefox 45.0.2 is different from the latest release (46 and latter). Infact the Gtk is not only causing this issue, it is responsible for Bug 1275700 too. Probably we need to fix the Gtk behavior.
Flags: needinfo?(dolske)
Flags: needinfo?(gijskruitbosch+bugs)
Karl, do you know why we render a different background for -moz-appearance: menupopup when comparing gtk2 with gtk3? I think the relevant code is here: https://dxr.mozilla.org/mozilla-central/source/widget/gtk/gtk2drawing.c#2545-2564 and here: https://dxr.mozilla.org/mozilla-central/source/widget/gtk/gtk3drawing.cpp#2296-2318 but I don't know enough about gtk to decipher that.
Flags: needinfo?(dolske) → needinfo?(karlt)
(In reply to :Gijs Kruitbosch from comment #11)
> Karl, do you know why we render a different background for -moz-appearance:
> menupopup when comparing gtk2 with gtk3?

-moz-appearance:menupopup draws the background using the gtk theme in use on the system.  GTK2 and GTK3 do not share the same interface with different themes, and so themes are written differently for GTK2 and GTK3.  Although some GTK2 versions of themes may use similar colors to a corresponding GTK3 theme, attachment 8746505 [details] shows this is not the case for popup menus with the default themes on Ubuntu 14.04.

If using -moz-appearance:menupopup for the background, then I would recommend
using -moz-appearance:menuitem for the menu items.

However, it may be preferable to style the submenu consistently with the
doorhanger.
Flags: needinfo?(karlt)
Flags: needinfo?(gijskruitbosch+bugs)
Flags: needinfo?(gijskruitbosch+bugs)
Attachment #8762006 - Flags: review?(dao+bmo) → review+
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/fx-team/rev/151500c01e44
match main popup appearance in bookmarks toolbar submenus, r=dao
https://hg.mozilla.org/mozilla-central/rev/151500c01e44
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 50
I can confirm that the problem was fixed.

https://hg.mozilla.org/mozilla-central/rev/016e0f47e8ad66ba6eb11fe28958e3a69ef9e53d
Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0 ID:20160612030220
Comment on attachment 8762006 [details]
Bug 1268462 - match main popup appearance in bookmarks toolbar submenus,

Approval Request Comment
[Feature/regressing bug #]: switch to gtk3
[User impact if declined]: submenus in the bookmarks toolbar popup are unreadable under some gtk3 themes
[Describe test coverage new/current, TreeHerder]: nope, appearance problem only
[Risks and why]: relatively low, CSS only changes to the linux browser theme
[String/UUID change made/needed]: nope
Attachment #8762006 - Flags: approval-mozilla-beta?
Attachment #8762006 - Flags: approval-mozilla-aurora?
Comment on attachment 8762006 [details]
Bug 1268462 - match main popup appearance in bookmarks toolbar submenus,

Fix the regression issue of inconsistent submenu popup back ground color and it's verified. Take it in aurora & beta.
Attachment #8762006 - Flags: approval-mozilla-beta?
Attachment #8762006 - Flags: approval-mozilla-beta+
Attachment #8762006 - Flags: approval-mozilla-aurora?
Attachment #8762006 - Flags: approval-mozilla-aurora+
Flags: qe-verify+
I managed to reproduce this bug using Fx 46.0 build ID:20160418114253 on Ubuntu 14.04.
Confirmed the fix on Fx 48.0b4, build ID 20160627144420 and Fx 49.0a2, build ID 20160630004007.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.