[Webkit-unassigned] [Bug 36177] [Qt] Multiselect Popup - Listbox click simulation
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Mar 16 15:18:13 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=36177
--- Comment #9 from Luiz Agostini <luiz.agostini at openbossa.org> 2010-03-16 15:18:12 PST ---
(In reply to comment #3)
> (From update of attachment 50832 [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();
}
--
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