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