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 1274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1285 // Calling focus() may cause us to lose our renderer, in which case do n
ot want to handle the event. | 1285 // Calling focus() may cause us to lose our renderer, in which case do n
ot want to handle the event. |
1286 if (!renderer()) | 1286 if (!renderer()) |
1287 return; | 1287 return; |
1288 | 1288 |
1289 // Convert to coords relative to the list box if needed. | 1289 // Convert to coords relative to the list box if needed. |
1290 MouseEvent* mouseEvent = toMouseEvent(event); | 1290 MouseEvent* mouseEvent = toMouseEvent(event); |
1291 IntPoint localOffset = roundedIntPoint(renderer()->absoluteToLocal(mouse
Event->absoluteLocation(), UseTransforms)); | 1291 IntPoint localOffset = roundedIntPoint(renderer()->absoluteToLocal(mouse
Event->absoluteLocation(), UseTransforms)); |
1292 int listIndex = toRenderListBox(renderer())->listIndexAtOffset(toIntSize
(localOffset)); | 1292 int listIndex = toRenderListBox(renderer())->listIndexAtOffset(toIntSize
(localOffset)); |
1293 if (listIndex >= 0) { | 1293 if (listIndex >= 0) { |
1294 if (!isDisabledFormControl()) { | 1294 if (!isDisabledFormControl()) { |
1295 #if OS(DARWIN) | 1295 #if OS(MACOSX) |
1296 updateSelectedState(listIndex, mouseEvent->metaKey(), mouseEvent
->shiftKey()); | 1296 updateSelectedState(listIndex, mouseEvent->metaKey(), mouseEvent
->shiftKey()); |
1297 #else | 1297 #else |
1298 updateSelectedState(listIndex, mouseEvent->ctrlKey(), mouseEvent
->shiftKey()); | 1298 updateSelectedState(listIndex, mouseEvent->ctrlKey(), mouseEvent
->shiftKey()); |
1299 #endif | 1299 #endif |
1300 } | 1300 } |
1301 if (Frame* frame = document().frame()) | 1301 if (Frame* frame = document().frame()) |
1302 frame->eventHandler()->setMouseDownMayStartAutoscroll(); | 1302 frame->eventHandler()->setMouseDownMayStartAutoscroll(); |
1303 | 1303 |
1304 event->setDefaultHandled(); | 1304 event->setDefaultHandled(); |
1305 } | 1305 } |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1573 return true; | 1573 return true; |
1574 } | 1574 } |
1575 | 1575 |
1576 bool HTMLSelectElement::anonymousIndexedSetterRemove(unsigned index, ExceptionSt
ate& es) | 1576 bool HTMLSelectElement::anonymousIndexedSetterRemove(unsigned index, ExceptionSt
ate& es) |
1577 { | 1577 { |
1578 remove(index); | 1578 remove(index); |
1579 return true; | 1579 return true; |
1580 } | 1580 } |
1581 | 1581 |
1582 } // namespace | 1582 } // namespace |
OLD | NEW |