[Webkit-unassigned] [Bug 137553] abandoned select option is reselected when shift selecting new options

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 17 22:59:22 PDT 2014


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

--- Comment #19 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 239868
  --> https://bugs.webkit.org/attachment.cgi?id=239868
Ready for review

View in context: https://bugs.webkit.org/attachment.cgi?id=239868&action=review

>>>> Source/WebCore/html/HTMLSelectElement.cpp:880
>>>>  
>>> 
>>> Deselect should be called first, otherwise the active selection wrongly records previously selected states
>> 
>> I think this code deserves a why comment saying that setActiveSelectionAnchorIndex expects selectedState to be up-to-date.
>> Alternatively, we should rename setActiveSelectionAnchorIndex to setActiveSelectionAnchorIndexCachingSelectedStates to make the code self explanatory.
> 
> There is already such comment inside setActiveSelectionAnchorIndex() to explain how active selection records the current selected states
> Let's says user hold CTRL / Meta key while clicking to select few items then start dragging the mouse (still holding CTRL / Meta key). It should either complete or inverse previous selection.
> In case selectOption() is called with the DeselectOtherOptions flag, it seems logical to clear previous selection before starting a new one

The problem is that such a comment isn't referenced here.
How does a reader that he/she has to read that comment in order to understand the ordering here?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20141018/3638aec8/attachment-0002.html>


More information about the webkit-unassigned mailing list