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 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1243 if (option->fastHasAttribute(selectedAttr)) { | 1243 if (option->fastHasAttribute(selectedAttr)) { |
1244 if (selectedOption && !m_multiple) | 1244 if (selectedOption && !m_multiple) |
1245 selectedOption->setSelectedState(false); | 1245 selectedOption->setSelectedState(false); |
1246 option->setSelectedState(true); | 1246 option->setSelectedState(true); |
1247 selectedOption = option; | 1247 selectedOption = option; |
1248 } else { | 1248 } else { |
1249 option->setSelectedState(false); | 1249 option->setSelectedState(false); |
1250 } | 1250 } |
1251 option->setDirty(false); | 1251 option->setDirty(false); |
1252 | 1252 |
1253 if (!firstOption) | 1253 if (!firstOption && !option->isDisabledFormControl()) |
1254 firstOption = option; | 1254 firstOption = option; |
1255 } | 1255 } |
1256 | 1256 |
1257 if (!selectedOption && firstOption && !m_multiple && m_size <= 1) { | 1257 if (!selectedOption && firstOption && !m_multiple && m_size <= 1) { |
1258 firstOption->setSelectedState(true); | 1258 firstOption->setSelectedState(true); |
1259 selectedOption = firstOption; | 1259 selectedOption = firstOption; |
1260 } | 1260 } |
1261 | 1261 |
1262 m_lastOnChangeOption = selectedOption; | 1262 m_lastOnChangeOption = selectedOption; |
1263 setOptionsChangedOnLayoutObject(); | 1263 setOptionsChangedOnLayoutObject(); |
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2012 m_popupIsVisible = false; | 2012 m_popupIsVisible = false; |
2013 m_popup = nullptr; | 2013 m_popup = nullptr; |
2014 } | 2014 } |
2015 | 2015 |
2016 void HTMLSelectElement::resetTypeAheadSessionForTesting() | 2016 void HTMLSelectElement::resetTypeAheadSessionForTesting() |
2017 { | 2017 { |
2018 m_typeAhead.resetSession(); | 2018 m_typeAhead.resetSession(); |
2019 } | 2019 } |
2020 | 2020 |
2021 } // namespace blink | 2021 } // namespace blink |
OLD | NEW |