[Webkit-unassigned] [Bug 72370] [Gtk] display:none has no effect on <option> element

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 16 01:53:00 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=72370





--- Comment #8 from Carlos Garcia Campos <cgarcia at igalia.com>  2011-11-16 01:53:00 PST ---
(In reply to comment #7)
> (In reply to comment #6)
> > (From update of attachment 115319 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=115319&action=review
> > 
> > > Source/WebCore/platform/gtk/GtkPopupMenu.cpp:72
> > > -    gtk_widget_show(menuItem);
> > > +
> > > +    if (gtk_action_is_visible(action))
> > > +        gtk_widget_show(menuItem);
> > 
> > Instead of creating a new menu item that will never be shown (because display:none can't change while the popup menu is shown, right?), I think it would be better to simply not create the menu item, In PopupMenuGtk::show() you could do something like:
> > 
> > GRefPtr<GtkAction> action = adoptGRef(createGtkActionForMenuItem(i));
> > if (gtk_action_is_visible(action.get())
> >             m_popup->appendItem(action.get());
> 
> Yes.The thought behind the change was that the menu item is part of the select box and only its display property is none.For such case we just don't show the item.
> 
> And in fact I have also explored the option suggested by you earlier.But the problem was, after this piece code is executed we call m_popup->popUp(...) with the "size" parameter we got using client()->listSize(). This causes a mismatch and results in crash.

I see, in that case I think it's better to keep the item, even hidden, since it's part of the option menu after all. Your patch looks good to me too.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list