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

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

Issue 1292653003: [bindings] Avoid using custom binding for HTMLOptionsCollection.length attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Missed to fix the test case! Created 5 years, 4 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 | « Source/core/html/HTMLOptionsCollection.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLSelectElement.cpp
diff --git a/Source/core/html/HTMLSelectElement.cpp b/Source/core/html/HTMLSelectElement.cpp
index 1e3f930f92c435c6f88ee970b56b4320ec430bda..97211dd196d0307a5f370aab21343b5de460ed1d 100644
--- a/Source/core/html/HTMLSelectElement.cpp
+++ b/Source/core/html/HTMLSelectElement.cpp
@@ -486,7 +486,7 @@ void HTMLSelectElement::setOption(unsigned index, HTMLOptionElement* option, Exc
void HTMLSelectElement::setLength(unsigned newLen, ExceptionState& exceptionState)
{
if (newLen > maxSelectItems)
- newLen = maxSelectItems;
+ return;
int diff = length() - newLen;
if (diff < 0) { // Add dummy elements.
« no previous file with comments | « Source/core/html/HTMLOptionsCollection.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698