| 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 1470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1481 setActiveSelectionEndIndex(listIndex); | 1481 setActiveSelectionEndIndex(listIndex); |
| 1482 updateListBoxSelection(false); | 1482 updateListBoxSelection(false); |
| 1483 } else { | 1483 } else { |
| 1484 setActiveSelectionAnchorIndex(listIndex); | 1484 setActiveSelectionAnchorIndex(listIndex); |
| 1485 setActiveSelectionEndIndex(listIndex); | 1485 setActiveSelectionEndIndex(listIndex); |
| 1486 updateListBoxSelection(true); | 1486 updateListBoxSelection(true); |
| 1487 } | 1487 } |
| 1488 } | 1488 } |
| 1489 } | 1489 } |
| 1490 } else if (event->type() == EventTypeNames::mouseup && event->isMouseEvent()
&& toMouseEvent(event)->button() == LeftButton && renderer()) { | 1490 } else if (event->type() == EventTypeNames::mouseup && event->isMouseEvent()
&& toMouseEvent(event)->button() == LeftButton && renderer()) { |
| 1491 if (document().page() && document().page()->autoscrollController().autos
crollInProgress(toRenderBox(renderer()))) | 1491 if (document().page() && document().page()->autoscrollController().autos
crollInProgress(toLayoutBox(renderer()))) |
| 1492 document().page()->autoscrollController().stopAutoscroll(); | 1492 document().page()->autoscrollController().stopAutoscroll(); |
| 1493 else | 1493 else |
| 1494 handleMouseRelease(); | 1494 handleMouseRelease(); |
| 1495 } else if (event->type() == EventTypeNames::keydown) { | 1495 } else if (event->type() == EventTypeNames::keydown) { |
| 1496 if (!event->isKeyboardEvent()) | 1496 if (!event->isKeyboardEvent()) |
| 1497 return; | 1497 return; |
| 1498 const String& keyIdentifier = toKeyboardEvent(event)->keyIdentifier(); | 1498 const String& keyIdentifier = toKeyboardEvent(event)->keyIdentifier(); |
| 1499 | 1499 |
| 1500 bool handled = false; | 1500 bool handled = false; |
| 1501 int endIndex = 0; | 1501 int endIndex = 0; |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1768 int focusedIndex = activeSelectionEndListIndex(); | 1768 int focusedIndex = activeSelectionEndListIndex(); |
| 1769 if (focusedIndex < 0) | 1769 if (focusedIndex < 0) |
| 1770 focusedIndex = firstSelectableListIndex(); | 1770 focusedIndex = firstSelectableListIndex(); |
| 1771 if (focusedIndex < 0) | 1771 if (focusedIndex < 0) |
| 1772 return nullptr; | 1772 return nullptr; |
| 1773 HTMLElement* focused = listItems()[focusedIndex]; | 1773 HTMLElement* focused = listItems()[focusedIndex]; |
| 1774 return isHTMLOptionElement(focused) ? toHTMLOptionElement(focused) : nullptr
; | 1774 return isHTMLOptionElement(focused) ? toHTMLOptionElement(focused) : nullptr
; |
| 1775 } | 1775 } |
| 1776 | 1776 |
| 1777 } // namespace | 1777 } // namespace |
| OLD | NEW |