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

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

Issue 242113014: Partial revert of r164563 as those changes have no effect (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLSelectElement.cpp
diff --git a/Source/core/html/HTMLSelectElement.cpp b/Source/core/html/HTMLSelectElement.cpp
index 78245781e1a2a5aae29affea3ac53561e7a22950..3d6008f59fb17047e01b10a2f9a1d833350ff29d 100644
--- a/Source/core/html/HTMLSelectElement.cpp
+++ b/Source/core/html/HTMLSelectElement.cpp
@@ -1337,7 +1337,6 @@ void HTMLSelectElement::updateSelectedState(int listIndex, bool multi, bool shif
void HTMLSelectElement::listBoxDefaultEventHandler(Event* event)
{
const Vector<HTMLElement*>& listItems = this->listItems();
- bool dragSelection = false;
if (event->type() == EventTypeNames::gesturetap && event->isGestureEvent()) {
focus();
// Calling focus() may cause us to lose our renderer or change the render type, in which case do not want to handle the event.
@@ -1398,18 +1397,12 @@ void HTMLSelectElement::listBoxDefaultEventHandler(Event* event)
updateListBoxSelection(true);
}
}
- dragSelection = true;
}
} else if (event->type() == EventTypeNames::mouseup && event->isMouseEvent() && toMouseEvent(event)->button() == LeftButton && renderer() && !toRenderBox(renderer())->autoscrollInProgress()) {
// We didn't start this click/drag on any options.
if (m_lastOnChangeSelection.isEmpty())
return;
- // This makes sure we fire dispatchFormControlChangeEvent for a single
- // click. For drag selection, onChange will fire when the autoscroll
- // timer stops.
- if (!dragSelection) {
- listBoxOnChange();
- }
+ listBoxOnChange();
} else if (event->type() == EventTypeNames::keydown) {
if (!event->isKeyboardEvent())
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698