| 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 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 931 if (!option) | 931 if (!option) |
| 932 return; | 932 return; |
| 933 if (usesMenuList()) | 933 if (usesMenuList()) |
| 934 return; | 934 return; |
| 935 bool hasPendingTask = m_optionToScrollTo; | 935 bool hasPendingTask = m_optionToScrollTo; |
| 936 // We'd like to keep an HTMLOptionElement reference rather than the index of | 936 // We'd like to keep an HTMLOptionElement reference rather than the index of |
| 937 // the option because the task should work even if unselected option is | 937 // the option because the task should work even if unselected option is |
| 938 // inserted before executing scrollToOptionTask(). | 938 // inserted before executing scrollToOptionTask(). |
| 939 m_optionToScrollTo = option; | 939 m_optionToScrollTo = option; |
| 940 if (!hasPendingTask) | 940 if (!hasPendingTask) |
| 941 document().postTask(BLINK_FROM_HERE, createSameThreadTask(&HTMLSelectEle
ment::scrollToOptionTask, this)); | 941 document().postTask(BLINK_FROM_HERE, createSameThreadTask(&HTMLSelectEle
ment::scrollToOptionTask, retainedRef(this))); |
| 942 } | 942 } |
| 943 | 943 |
| 944 void HTMLSelectElement::scrollToOptionTask() | 944 void HTMLSelectElement::scrollToOptionTask() |
| 945 { | 945 { |
| 946 HTMLOptionElement* option = m_optionToScrollTo.release(); | 946 HTMLOptionElement* option = m_optionToScrollTo.release(); |
| 947 if (!option || !inShadowIncludingDocument()) | 947 if (!option || !inShadowIncludingDocument()) |
| 948 return; | 948 return; |
| 949 // optionRemoved() makes sure m_optionToScrollTo doesn't have an option with | 949 // optionRemoved() makes sure m_optionToScrollTo doesn't have an option with |
| 950 // another owner. | 950 // another owner. |
| 951 ASSERT(option->ownerSelectElement() == this); | 951 ASSERT(option->ownerSelectElement() == this); |
| (...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1983 m_popupIsVisible = false; | 1983 m_popupIsVisible = false; |
| 1984 m_popup = nullptr; | 1984 m_popup = nullptr; |
| 1985 } | 1985 } |
| 1986 | 1986 |
| 1987 void HTMLSelectElement::resetTypeAheadSessionForTesting() | 1987 void HTMLSelectElement::resetTypeAheadSessionForTesting() |
| 1988 { | 1988 { |
| 1989 m_typeAhead.resetSession(); | 1989 m_typeAhead.resetSession(); |
| 1990 } | 1990 } |
| 1991 | 1991 |
| 1992 } // namespace blink | 1992 } // namespace blink |
| OLD | NEW |