| 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 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 } | 629 } |
| 630 | 630 |
| 631 scrollToSelection(); | 631 scrollToSelection(); |
| 632 setNeedsValidityCheck(); | 632 setNeedsValidityCheck(); |
| 633 notifyFormStateChanged(); | 633 notifyFormStateChanged(); |
| 634 } | 634 } |
| 635 | 635 |
| 636 void HTMLSelectElement::listBoxOnChange() | 636 void HTMLSelectElement::listBoxOnChange() |
| 637 { | 637 { |
| 638 ASSERT(!usesMenuList() || m_multiple); | 638 ASSERT(!usesMenuList() || m_multiple); |
| 639 if (isDisabledFormControl()) |
| 640 return; |
| 639 | 641 |
| 640 const Vector<HTMLElement*>& items = listItems(); | 642 const Vector<HTMLElement*>& items = listItems(); |
| 641 | 643 |
| 642 // If the cached selection list is empty, or the size has changed, then fire | 644 // If the cached selection list is empty, or the size has changed, then fire |
| 643 // dispatchFormControlChangeEvent, and return early. | 645 // dispatchFormControlChangeEvent, and return early. |
| 644 if (m_lastOnChangeSelection.isEmpty() || m_lastOnChangeSelection.size() != i
tems.size()) { | 646 if (m_lastOnChangeSelection.isEmpty() || m_lastOnChangeSelection.size() != i
tems.size()) { |
| 645 dispatchFormControlChangeEvent(); | 647 dispatchFormControlChangeEvent(); |
| 646 return; | 648 return; |
| 647 } | 649 } |
| 648 | 650 |
| (...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1557 const Vector<HTMLElement*>& items = listItems(); | 1559 const Vector<HTMLElement*>& items = listItems(); |
| 1558 for (unsigned i = 0; i < items.size(); ++i) { | 1560 for (unsigned i = 0; i < items.size(); ++i) { |
| 1559 if (items[i]->hasTagName(optionTag)) | 1561 if (items[i]->hasTagName(optionTag)) |
| 1560 ++options; | 1562 ++options; |
| 1561 } | 1563 } |
| 1562 | 1564 |
| 1563 return options; | 1565 return options; |
| 1564 } | 1566 } |
| 1565 | 1567 |
| 1566 } // namespace | 1568 } // namespace |
| OLD | NEW |