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 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1433 event->setDefaultHandled(); | 1433 event->setDefaultHandled(); |
1434 } | 1434 } |
1435 } | 1435 } |
1436 } | 1436 } |
1437 | 1437 |
1438 void HTMLSelectElement::defaultEventHandler(Event* event) | 1438 void HTMLSelectElement::defaultEventHandler(Event* event) |
1439 { | 1439 { |
1440 if (!renderer()) | 1440 if (!renderer()) |
1441 return; | 1441 return; |
1442 | 1442 |
| 1443 if (disabled()) { |
| 1444 HTMLFormControlElementWithState::defaultEventHandler(event); |
| 1445 return; |
| 1446 } |
| 1447 |
1443 if (usesMenuList()) | 1448 if (usesMenuList()) |
1444 menuListDefaultEventHandler(event); | 1449 menuListDefaultEventHandler(event); |
1445 else | 1450 else |
1446 listBoxDefaultEventHandler(event); | 1451 listBoxDefaultEventHandler(event); |
1447 if (event->defaultHandled()) | 1452 if (event->defaultHandled()) |
1448 return; | 1453 return; |
1449 | 1454 |
1450 if (event->type() == eventNames().keypressEvent && event->isKeyboardEvent())
{ | 1455 if (event->type() == eventNames().keypressEvent && event->isKeyboardEvent())
{ |
1451 KeyboardEvent* keyboardEvent = static_cast<KeyboardEvent*>(event); | 1456 KeyboardEvent* keyboardEvent = static_cast<KeyboardEvent*>(event); |
1452 if (!keyboardEvent->ctrlKey() && !keyboardEvent->altKey() && !keyboardEv
ent->metaKey() && isPrintableChar(keyboardEvent->charCode())) { | 1457 if (!keyboardEvent->ctrlKey() && !keyboardEvent->altKey() && !keyboardEv
ent->metaKey() && isPrintableChar(keyboardEvent->charCode())) { |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1591 const Vector<HTMLElement*>& items = listItems(); | 1596 const Vector<HTMLElement*>& items = listItems(); |
1592 for (unsigned i = 0; i < items.size(); ++i) { | 1597 for (unsigned i = 0; i < items.size(); ++i) { |
1593 if (items[i]->hasTagName(optionTag)) | 1598 if (items[i]->hasTagName(optionTag)) |
1594 ++options; | 1599 ++options; |
1595 } | 1600 } |
1596 | 1601 |
1597 return options; | 1602 return options; |
1598 } | 1603 } |
1599 | 1604 |
1600 } // namespace | 1605 } // namespace |
OLD | NEW |