OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
4 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 4 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights
reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights
reserved. |
7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
8 * Copyright (C) 2010 Google Inc. All rights reserved. | 8 * Copyright (C) 2010 Google Inc. All rights reserved. |
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
10 * | 10 * |
(...skipping 1320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1331 updateListBoxSelection(false); | 1331 updateListBoxSelection(false); |
1332 } else { | 1332 } else { |
1333 setActiveSelectionAnchorIndex(listIndex); | 1333 setActiveSelectionAnchorIndex(listIndex); |
1334 setActiveSelectionEndIndex(listIndex); | 1334 setActiveSelectionEndIndex(listIndex); |
1335 updateListBoxSelection(true); | 1335 updateListBoxSelection(true); |
1336 } | 1336 } |
1337 } | 1337 } |
1338 event->setDefaultHandled(); | 1338 event->setDefaultHandled(); |
1339 } | 1339 } |
1340 } else if (event->type() == eventNames().mouseupEvent && event->isMouseEvent
() && static_cast<MouseEvent*>(event)->button() == LeftButton && document()->fra
me()->eventHandler()->autoscrollRenderer() != renderer()) { | 1340 } else if (event->type() == eventNames().mouseupEvent && event->isMouseEvent
() && static_cast<MouseEvent*>(event)->button() == LeftButton && document()->fra
me()->eventHandler()->autoscrollRenderer() != renderer()) { |
| 1341 // We didn't start this click/drag on any options. |
| 1342 if (m_lastOnChangeSelection.isEmpty()) |
| 1343 return; |
1341 // This makes sure we fire dispatchFormControlChangeEvent for a single | 1344 // This makes sure we fire dispatchFormControlChangeEvent for a single |
1342 // click. For drag selection, onChange will fire when the autoscroll | 1345 // click. For drag selection, onChange will fire when the autoscroll |
1343 // timer stops. | 1346 // timer stops. |
1344 listBoxOnChange(); | 1347 listBoxOnChange(); |
1345 } else if (event->type() == eventNames().keydownEvent) { | 1348 } else if (event->type() == eventNames().keydownEvent) { |
1346 if (!event->isKeyboardEvent()) | 1349 if (!event->isKeyboardEvent()) |
1347 return; | 1350 return; |
1348 const String& keyIdentifier = static_cast<KeyboardEvent*>(event)->keyIde
ntifier(); | 1351 const String& keyIdentifier = static_cast<KeyboardEvent*>(event)->keyIde
ntifier(); |
1349 | 1352 |
1350 bool handled = false; | 1353 bool handled = false; |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1564 } | 1567 } |
1565 | 1568 |
1566 void HTMLSelectElement::finishParsingChildren() | 1569 void HTMLSelectElement::finishParsingChildren() |
1567 { | 1570 { |
1568 HTMLFormControlElementWithState::finishParsingChildren(); | 1571 HTMLFormControlElementWithState::finishParsingChildren(); |
1569 m_isParsingInProgress = false; | 1572 m_isParsingInProgress = false; |
1570 updateListItemSelectedStates(); | 1573 updateListItemSelectedStates(); |
1571 } | 1574 } |
1572 | 1575 |
1573 } // namespace | 1576 } // namespace |
OLD | NEW |