| 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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 if (m_shouldRecalcListItems) | 366 if (m_shouldRecalcListItems) |
| 367 recalcListItems(); | 367 recalcListItems(); |
| 368 } | 368 } |
| 369 | 369 |
| 370 void HTMLSelectElement::childrenChanged(bool changedByParser, Node* beforeChange
, Node* afterChange, int childCountDelta) | 370 void HTMLSelectElement::childrenChanged(bool changedByParser, Node* beforeChange
, Node* afterChange, int childCountDelta) |
| 371 { | 371 { |
| 372 setRecalcListItems(); | 372 setRecalcListItems(); |
| 373 setNeedsValidityCheck(); | 373 setNeedsValidityCheck(); |
| 374 | 374 |
| 375 HTMLFormControlElementWithState::childrenChanged(changedByParser, beforeChan
ge, afterChange, childCountDelta); | 375 HTMLFormControlElementWithState::childrenChanged(changedByParser, beforeChan
ge, afterChange, childCountDelta); |
| 376 | |
| 377 if (AXObjectCache::accessibilityEnabled() && renderer()) | |
| 378 renderer()->document()->axObjectCache()->childrenChanged(this); | |
| 379 } | 376 } |
| 380 | 377 |
| 381 void HTMLSelectElement::optionElementChildrenChanged() | 378 void HTMLSelectElement::optionElementChildrenChanged() |
| 382 { | 379 { |
| 383 setRecalcListItems(); | 380 setRecalcListItems(); |
| 384 setNeedsValidityCheck(); | 381 setNeedsValidityCheck(); |
| 385 | 382 |
| 386 if (AXObjectCache::accessibilityEnabled() && renderer()) | 383 if (AXObjectCache::accessibilityEnabled() && renderer()) |
| 387 renderer()->document()->axObjectCache()->childrenChanged(this); | 384 renderer()->document()->axObjectCache()->childrenChanged(this); |
| 388 } | 385 } |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 // Manual selection anchor is reset when manipulating the select programmati
cally. | 714 // Manual selection anchor is reset when manipulating the select programmati
cally. |
| 718 m_activeSelectionAnchorIndex = -1; | 715 m_activeSelectionAnchorIndex = -1; |
| 719 setOptionsChangedOnRenderer(); | 716 setOptionsChangedOnRenderer(); |
| 720 setNeedsStyleRecalc(); | 717 setNeedsStyleRecalc(); |
| 721 if (!inDocument()) { | 718 if (!inDocument()) { |
| 722 if (HTMLCollection* collection = cachedHTMLCollection(SelectOptions)) | 719 if (HTMLCollection* collection = cachedHTMLCollection(SelectOptions)) |
| 723 collection->invalidateCache(); | 720 collection->invalidateCache(); |
| 724 } | 721 } |
| 725 if (!inDocument()) | 722 if (!inDocument()) |
| 726 invalidateSelectedItems(); | 723 invalidateSelectedItems(); |
| 724 |
| 725 if (AXObjectCache::accessibilityEnabled() && renderer()) |
| 726 renderer()->document()->axObjectCache()->childrenChanged(this); |
| 727 } | 727 } |
| 728 | 728 |
| 729 void HTMLSelectElement::recalcListItems(bool updateSelectedStates) const | 729 void HTMLSelectElement::recalcListItems(bool updateSelectedStates) const |
| 730 { | 730 { |
| 731 m_listItems.clear(); | 731 m_listItems.clear(); |
| 732 | 732 |
| 733 m_shouldRecalcListItems = false; | 733 m_shouldRecalcListItems = false; |
| 734 | 734 |
| 735 HTMLOptionElement* foundSelected = 0; | 735 HTMLOptionElement* foundSelected = 0; |
| 736 HTMLOptionElement* firstOption = 0; | 736 HTMLOptionElement* firstOption = 0; |
| (...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1544 const Vector<HTMLElement*>& items = listItems(); | 1544 const Vector<HTMLElement*>& items = listItems(); |
| 1545 for (unsigned i = 0; i < items.size(); ++i) { | 1545 for (unsigned i = 0; i < items.size(); ++i) { |
| 1546 if (items[i]->hasTagName(optionTag)) | 1546 if (items[i]->hasTagName(optionTag)) |
| 1547 ++options; | 1547 ++options; |
| 1548 } | 1548 } |
| 1549 | 1549 |
| 1550 return options; | 1550 return options; |
| 1551 } | 1551 } |
| 1552 | 1552 |
| 1553 } // namespace | 1553 } // namespace |
| OLD | NEW |