| 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 923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 if (!option) | 934 if (!option) |
| 935 return; | 935 return; |
| 936 if (usesMenuList()) | 936 if (usesMenuList()) |
| 937 return; | 937 return; |
| 938 bool hasPendingTask = m_optionToScrollTo; | 938 bool hasPendingTask = m_optionToScrollTo; |
| 939 // We'd like to keep an HTMLOptionElement reference rather than the index of | 939 // We'd like to keep an HTMLOptionElement reference rather than the index of |
| 940 // the option because the task should work even if unselected option is | 940 // the option because the task should work even if unselected option is |
| 941 // inserted before executing scrollToOptionTask(). | 941 // inserted before executing scrollToOptionTask(). |
| 942 m_optionToScrollTo = option; | 942 m_optionToScrollTo = option; |
| 943 if (!hasPendingTask) | 943 if (!hasPendingTask) |
| 944 document().postTask(BLINK_FROM_HERE, createSameThreadTask(&HTMLSelectEle
ment::scrollToOptionTask, this)); | 944 document().postTask(BLINK_FROM_HERE, createSameThreadTask(&HTMLSelectEle
ment::scrollToOptionTask, wrapPersistent(this))); |
| 945 } | 945 } |
| 946 | 946 |
| 947 void HTMLSelectElement::scrollToOptionTask() | 947 void HTMLSelectElement::scrollToOptionTask() |
| 948 { | 948 { |
| 949 HTMLOptionElement* option = m_optionToScrollTo.release(); | 949 HTMLOptionElement* option = m_optionToScrollTo.release(); |
| 950 if (!option || !inShadowIncludingDocument()) | 950 if (!option || !inShadowIncludingDocument()) |
| 951 return; | 951 return; |
| 952 // optionRemoved() makes sure m_optionToScrollTo doesn't have an option with | 952 // optionRemoved() makes sure m_optionToScrollTo doesn't have an option with |
| 953 // another owner. | 953 // another owner. |
| 954 ASSERT(option->ownerSelectElement() == this); | 954 ASSERT(option->ownerSelectElement() == this); |
| (...skipping 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2072 } | 2072 } |
| 2073 | 2073 |
| 2074 void HTMLSelectElement::didMutateSubtree() | 2074 void HTMLSelectElement::didMutateSubtree() |
| 2075 { | 2075 { |
| 2076 DCHECK(popupIsVisible()); | 2076 DCHECK(popupIsVisible()); |
| 2077 DCHECK(m_popup); | 2077 DCHECK(m_popup); |
| 2078 m_popup->updateFromElement(PopupMenu::ByDOMChange); | 2078 m_popup->updateFromElement(PopupMenu::ByDOMChange); |
| 2079 } | 2079 } |
| 2080 | 2080 |
| 2081 } // namespace blink | 2081 } // namespace blink |
| OLD | NEW |