| 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 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 | 688 |
| 689 void HTMLSelectElement::setRecalcListItems() | 689 void HTMLSelectElement::setRecalcListItems() |
| 690 { | 690 { |
| 691 // FIXME: This function does a bunch of confusing things depending on if it | 691 // FIXME: This function does a bunch of confusing things depending on if it |
| 692 // is in the document or not. | 692 // is in the document or not. |
| 693 | 693 |
| 694 m_shouldRecalcListItems = true; | 694 m_shouldRecalcListItems = true; |
| 695 // Manual selection anchor is reset when manipulating the select programmati
cally. | 695 // Manual selection anchor is reset when manipulating the select programmati
cally. |
| 696 m_activeSelectionAnchorIndex = -1; | 696 m_activeSelectionAnchorIndex = -1; |
| 697 setOptionsChangedOnRenderer(); | 697 setOptionsChangedOnRenderer(); |
| 698 setNeedsStyleRecalc(); | 698 setNeedsStyleRecalc(SubtreeStyleChange); |
| 699 if (!inDocument()) { | 699 if (!inDocument()) { |
| 700 if (HTMLCollection* collection = cachedHTMLCollection(SelectOptions)) | 700 if (HTMLCollection* collection = cachedHTMLCollection(SelectOptions)) |
| 701 collection->invalidateCache(); | 701 collection->invalidateCache(); |
| 702 } | 702 } |
| 703 if (!inDocument()) | 703 if (!inDocument()) |
| 704 invalidateSelectedItems(); | 704 invalidateSelectedItems(); |
| 705 | 705 |
| 706 if (renderer()) { | 706 if (renderer()) { |
| 707 if (AXObjectCache* cache = renderer()->document().existingAXObjectCache(
)) | 707 if (AXObjectCache* cache = renderer()->document().existingAXObjectCache(
)) |
| 708 cache->childrenChanged(this); | 708 cache->childrenChanged(this); |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1031 toHTMLOptionElement(element)->setSelectedState(false); | 1031 toHTMLOptionElement(element)->setSelectedState(false); |
| 1032 | 1032 |
| 1033 if (!firstOption) | 1033 if (!firstOption) |
| 1034 firstOption = toHTMLOptionElement(element); | 1034 firstOption = toHTMLOptionElement(element); |
| 1035 } | 1035 } |
| 1036 | 1036 |
| 1037 if (!selectedOption && firstOption && !m_multiple && m_size <= 1) | 1037 if (!selectedOption && firstOption && !m_multiple && m_size <= 1) |
| 1038 firstOption->setSelectedState(true); | 1038 firstOption->setSelectedState(true); |
| 1039 | 1039 |
| 1040 setOptionsChangedOnRenderer(); | 1040 setOptionsChangedOnRenderer(); |
| 1041 setNeedsStyleRecalc(); | 1041 setNeedsStyleRecalc(SubtreeStyleChange); |
| 1042 setNeedsValidityCheck(); | 1042 setNeedsValidityCheck(); |
| 1043 } | 1043 } |
| 1044 | 1044 |
| 1045 #if !OS(WIN) | 1045 #if !OS(WIN) |
| 1046 bool HTMLSelectElement::platformHandleKeydownEvent(KeyboardEvent* event) | 1046 bool HTMLSelectElement::platformHandleKeydownEvent(KeyboardEvent* event) |
| 1047 { | 1047 { |
| 1048 if (!RenderTheme::theme().popsMenuByArrowKeys()) | 1048 if (!RenderTheme::theme().popsMenuByArrowKeys()) |
| 1049 return false; | 1049 return false; |
| 1050 | 1050 |
| 1051 if (!isSpatialNavigationEnabled(document().frame())) { | 1051 if (!isSpatialNavigationEnabled(document().frame())) { |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1562 { | 1562 { |
| 1563 return true; | 1563 return true; |
| 1564 } | 1564 } |
| 1565 | 1565 |
| 1566 bool HTMLSelectElement::supportsAutofocus() const | 1566 bool HTMLSelectElement::supportsAutofocus() const |
| 1567 { | 1567 { |
| 1568 return true; | 1568 return true; |
| 1569 } | 1569 } |
| 1570 | 1570 |
| 1571 } // namespace | 1571 } // namespace |
| OLD | NEW |