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

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

Issue 143943020: Replace [TreatNullAs=functionName] with [StrictTypeChecking] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update tests, Python, and IDLExtendedAttributes.txt Created 6 years, 11 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/HTMLSelectElement.h ('k') | Source/core/html/HTMLSelectElement.idl » ('j') | 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 8d64f496438ed7d3eb8f4fafae624f2866c00fc3..74f8627def91049db2f6f5c8ff788e38b50bd5f5 100644
--- a/Source/core/html/HTMLSelectElement.cpp
+++ b/Source/core/html/HTMLSelectElement.cpp
@@ -1550,20 +1550,14 @@ void HTMLSelectElement::finishParsingChildren()
bool HTMLSelectElement::anonymousIndexedSetter(unsigned index, PassRefPtr<HTMLOptionElement> value, ExceptionState& exceptionState)
{
- if (!value) {
- exceptionState.throwTypeError(ExceptionMessages::failedToSet(String::number(index), "HTMLSelectElement", "The value provided was not an HTMLOptionElement."));
- return false;
+ if (!value) { // undefined or null
+ remove(index);
+ return true;
}
setOption(index, value.get(), exceptionState);
return true;
}
-bool HTMLSelectElement::anonymousIndexedSetterRemove(unsigned index, ExceptionState& exceptionState)
-{
- remove(index);
- return true;
-}
-
bool HTMLSelectElement::isInteractiveContent() const
{
return true;
« no previous file with comments | « Source/core/html/HTMLSelectElement.h ('k') | Source/core/html/HTMLSelectElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698