Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Unified Diff: third_party/WebKit/Source/core/html/HTMLSelectElement.cpp

Issue 2129023002: SELECT element: Fix a DCHECK failure after crrev.com/404091 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 dadfb1192adf3185a228cc5651320979c842b65c..af775b8060a700b85276ae23f9ec73be317b2395 100644
--- a/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
@@ -1988,6 +1988,9 @@ HTMLOptionElement* HTMLSelectElement::optionToBeShown() const
return toHTMLOptionElement(listItems()[m_indexToSelectOnCancel]);
if (m_suggestedOption)
return m_suggestedOption;
+ // TODO(tkent): We should not call optionToBeShown() in multiple() case.
+ if (multiple())
+ return selectedOption();
DCHECK_EQ(selectedOption(), m_lastOnChangeOption);
return m_lastOnChangeOption;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698