Closed Bug 984075 Opened 7 years ago Closed 7 years ago

[Gtk3] Missing dropdown arrow in urlbar


(Core :: Widget: Gtk, defect)

Not set





(Reporter: cork, Assigned: stransky)




(2 files, 1 obsolete file)

The dropdown arrow in the urlbar is missing in gtk3 builds
Yes, I can see that. But it does not look like a rendering bug - the whole element is missing and I can't click there.
The element is here in latest trunk (174984:fa098f9fe89c) but the color of pressed one is wrong (white).
Actually the color of active arrow is correct, because the theme expect dark (blue) background - like arrows in menu. The workaround would be to render the arrow always in a normal state or use an arrow from combo box, which is similar to this one.
Assignee: nobody → stransky
I still don't see this on the latest pull from

Verified that the latest commit to is the same.
Did a new test[1] and i still don't see any dropdown arrow at all. The entire element seams to be missing.

Yes, I can reproduce it on my other system.
Well, it's this one:

  <xul:dropmarker anonid="historydropmarker"
                  class="autocomplete-history-dropmarker urlbar-history-dropmarker"

from urlbarBindings.xml but it's a mystery why it's not rendered...
.urlbar-history-dropmarker {
  -moz-appearance: toolbarbutton-dropdown;

Looks like the urlbar-history-dropmarker/toolbarbutton-dropdown class is not rendered. May be related to different gtk3 icons set or so.
The .autocomplete-history-dropmarker class seems to be missing in gtk3 build.
The issue is that size of the arrow (got by gtk_widget_size_request) is 0x0 so it's not rendered.
Attached patch patch (obsolete) — Splinter Review
It's similar to the combobox issue - the inner arrow can be inserted as a child to container but needs to be created with the widget.
Attachment #8402726 - Flags: review?(karlt)
Comment on attachment 8402726 [details] [diff] [review]

># HG changeset patch
># Parent 4941a2ac0786109b08856738019b016a6c5a66a6
># User Martin Stransky <>
>Bug 984075 - [Gtk3] Missing dropdown arrow in urlbar, r=?karlt

The commit message needs to say what is changed, not describe the bug being fixed.

It is usually helpful to also say why it is being changed and why it fixes a problem.  i.e. explain about the incorrect size.  This can go in a second paragraph if it doesn't fit in the first line.

> static gint
> ensure_toggle_button_widget()
> {
>     if (!gToggleButtonWidget) {
>-        gToggleButtonWidget = gtk_toggle_button_new();
>+        gToggleButtonWidget = gtk_menu_button_new();

A GtkMenuButton sounds appropriate for the urlbar, but not for a variable named "gToggleButtonWidget".  Please rename the variable and function, assuming it is not used for any other purpose.
Attachment #8402726 - Flags: review?(karlt) → review-
Attached patch patch v.2Splinter Review
Thanks! This one should address it.
Attachment #8402726 - Attachment is obsolete: true
Attachment #8403287 - Flags: review?(karlt)
Comment on attachment 8403287 [details] [diff] [review]
patch v.2

>Bug 984075 - Extract arrow widget from GtkMenuButton widget instead of creating
>it directly which gives us propper arrow size. r=?karlt

Yes, this is good message.


Please put this all on one long line, or rearrange to leave a blank line after the reviewer and before a new sentence.

> {
>-    if (!gToggleButtonWidget) {
>+    if (!gToggleMenuButtonWidget) {

I would have called these ensure_menu_button_widget and gMenuButtonWidget, but including the "toggle" is OK if you think that is helpful.

Sorry, I didn't realize that a MenuButtonWidget is a ToggleButtonWidget, but I think it is less confusing to remember that this is a MenuButtonWidget.
Attachment #8403287 - Flags: review?(karlt) → review+
Updated, thanks. 

> I would have called these ensure_menu_button_widget and gMenuButtonWidget,
> but including the "toggle" is OK if you think that is helpful.

I like the "toogle", it self-explanatory and we have other long names in the file.
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Verified with
Depends on: 1027138
Blocks: 1034064
No longer blocks: 1034064
You need to log in before you can comment on or make changes to this bug.