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

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

Issue 2151763002: SELECT element: Fix a DCHECK failure in optionToBeShown(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: SELECT element: Fix a DCHECK failure in optionToBeShown(). 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 | third_party/WebKit/Source/core/html/HTMLSelectElementTest.cpp » ('j') | 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 d3c46052dc707340038853ccb3fcb20d01e8b351..1ad1e33107624c69cd70be95fdcf56f65a74f0d0 100644
--- a/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
@@ -1145,10 +1145,7 @@ void HTMLSelectElement::restoreFormControlState(const FormControlState& state)
if (itemsSize == 0)
return;
- for (auto& item : items) {
- if (isHTMLOptionElement(item))
- toHTMLOptionElement(item)->setSelectedState(false);
- }
+ selectOption(nullptr, DeselectOtherOptions);
// The saved state should have at least one value and an index.
ASSERT(state.valueSize() >= 2);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLSelectElementTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698