| Index: third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp b/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
|
| index a344bcde69df0cb2454ba0cc2ee0f00afd10af7c..ca017d1f0dfae2ab4d9ed49c02ccac47dec13ec6 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
|
| @@ -836,7 +836,7 @@ void HTMLSelectElement::resetToDefaultSelection(ResetReason reason)
|
| }
|
| ++optionIndex;
|
| }
|
| - if (!lastSelectedOption && m_size <= 1 && firstEnabledOption && !firstEnabledOption->selected()) {
|
| + if (!lastSelectedOption && m_size <= 1 && (!firstEnabledOption || (firstEnabledOption && !firstEnabledOption->selected()))) {
|
| selectOption(firstEnabledOption, reason == ResetReasonSelectedOptionRemoved ? 0 : DeselectOtherOptions);
|
| lastSelectedOption = firstEnabledOption;
|
| didChange = true;
|
|
|