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

Unified Diff: Source/core/html/HTMLOptionsCollection.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: Aligned with maxSelectedItems value 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/bindings/core/v8/custom/custom.gypi ('k') | Source/core/html/HTMLOptionsCollection.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
haraken 2015/08/18 13:27:12 Can we add a test case for this branch?
+ return;
toHTMLSelectElement(ownerNode()).setLength(length, exceptionState);
}
« no previous file with comments | « Source/bindings/core/v8/custom/custom.gypi ('k') | Source/core/html/HTMLOptionsCollection.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698