Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Unified Diff: Source/WebCore/html/HTMLSelectElement.cpp

Issue 9285007: Merge 105386 - REGRESSION(r100111): A 'change' event does not fire when a mouse drag (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/forms/select/listbox-drag-in-non-multiple-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/html/HTMLSelectElement.cpp
===================================================================
--- Source/WebCore/html/HTMLSelectElement.cpp (revision 105691)
+++ Source/WebCore/html/HTMLSelectElement.cpp (working copy)
@@ -1146,7 +1146,7 @@
if (clickedElement->hasTagName(optionTag)) {
// Keep track of whether an active selection (like during drag
// selection), should select or deselect.
- if (toHTMLOptionElement(clickedElement)->selected() && multi)
+ if (toHTMLOptionElement(clickedElement)->selected() && multiSelect)
m_activeSelectionState = false;
if (!m_activeSelectionState)
toHTMLOptionElement(clickedElement)->setSelectedState(false);
@@ -1214,8 +1214,11 @@
if (m_multiple) {
setActiveSelectionEndIndex(listIndex);
updateListBoxSelection(false);
- } else
- updateSelectedState(listIndex, false, false);
+ } else {
+ setActiveSelectionAnchorIndex(listIndex);
+ setActiveSelectionEndIndex(listIndex);
+ updateListBoxSelection(true);
+ }
event->setDefaultHandled();
}
} else if (event->type() == eventNames().mouseupEvent && event->isMouseEvent() && static_cast<MouseEvent*>(event)->button() == LeftButton && document()->frame()->eventHandler()->autoscrollRenderer() != renderer()) {
« no previous file with comments | « LayoutTests/fast/forms/select/listbox-drag-in-non-multiple-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698