Chromium Code Reviews| Index: Source/core/html/HTMLOptionsCollection.cpp |
| diff --git a/Source/core/html/HTMLOptionsCollection.cpp b/Source/core/html/HTMLOptionsCollection.cpp |
| index 1b9c61989d690657f43387ff68b19730de456912..e2724df1c867b37e43aeb5bc2dfd19795a94dab3 100644 |
| --- a/Source/core/html/HTMLOptionsCollection.cpp |
| +++ b/Source/core/html/HTMLOptionsCollection.cpp |
| @@ -91,6 +91,8 @@ void HTMLOptionsCollection::setSelectedIndex(int index) |
| void HTMLOptionsCollection::setLength(unsigned length, ExceptionState& exceptionState) |
| { |
| + if (length > HTMLSelectElement::maxSelectItems) |
| + return; |
|
tkent
2015/08/19 01:20:24
It's inconsistent with the current behavior of HTM
|
| toHTMLSelectElement(ownerNode()).setLength(length, exceptionState); |
| } |