[Webkit-unassigned] [Bug 36177] [Qt] Multiselect Popup - Listbox click simulation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 16 18:39:03 PDT 2010


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





--- Comment #11 from Luiz Agostini <luiz.agostini at openbossa.org>  2010-03-16 18:39:02 PST ---
(In reply to comment #9)
> (In reply to comment #3)
> > (From update of attachment 50832 [details] [details])
> > 
> > > +void HTMLSelectElement::listBoxPopupClick(int listIndex, bool multi, bool shift, bool fireEvents)
> > > +{
> > > +    if (!multiple())
> > > +        setSelectedIndexByUser(listIndex, true, fireEvents);
> > > +    else {
> > > +        updateSelectedState(m_data, this, listIndex, multi, shift);
> > > +        if (fireEvents)
> > > +            listBoxOnChange();
> > > +    }
> > > +}
> > 
> > I don't really know this code so I might be wrong, but the true in
> > setSelectedIndexByUser is for deselect, so I would guess that
> > updateSelectedState might be calling this method.
> > 
> > Maybe it makes more sense to modify updateSelectedState to do the (!multiple())
> > check?
> 
> updateSelectedState is used by listBoxDefaultEventHandler so I would like to
> make no changes on it.
> 
> setSelectedIndexByUser checks the index (optionIndex == selectedIndex()) and
> may leave without considering other parameters.
> 
> Considering the objective of creating a click simulation (see bug description)
> I created a new method that handles all the relevant parameters.
> 
> With the bug description in mind I would suggest:
> 
> void HTMLSelectElement::listBoxPopupClick(int listIndex, bool multi, bool
> shift, bool fireEvents)
> {
>     updateSelectedState(m_data, this, listIndex, multiple() && multi, shift);
>     if (fireEvents)
>         listBoxOnChange();
> }

after some tests I think that the first proposed implementation (the one in
patch 1) is better. IMHO. :)

the idea is to use that same code used for handling listboxes clicks and that
have been refactored in bug 36124 for multiple combos and to fallback to normal
combo handling code for simple combos.

-- 
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