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

Side by Side Diff: Source/core/html/HTMLSelectElement.cpp

Issue 83743002: Have the HTMLSelectElement setter throw TypeError. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « LayoutTests/fast/dom/HTMLSelectElement/exceptions-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * (C) 1999 Antti Koivisto (koivisto@kde.org) 4 * (C) 1999 Antti Koivisto (koivisto@kde.org)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved.
7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
8 * Copyright (C) 2010 Google Inc. All rights reserved. 8 * Copyright (C) 2010 Google Inc. All rights reserved.
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
10 * 10 *
(...skipping 1549 matching lines...) Expand 10 before | Expand all | Expand 10 after
1560 void HTMLSelectElement::finishParsingChildren() 1560 void HTMLSelectElement::finishParsingChildren()
1561 { 1561 {
1562 HTMLFormControlElementWithState::finishParsingChildren(); 1562 HTMLFormControlElementWithState::finishParsingChildren();
1563 m_isParsingInProgress = false; 1563 m_isParsingInProgress = false;
1564 updateListItemSelectedStates(); 1564 updateListItemSelectedStates();
1565 } 1565 }
1566 1566
1567 bool HTMLSelectElement::anonymousIndexedSetter(unsigned index, PassRefPtr<HTMLOp tionElement> value, ExceptionState& exceptionState) 1567 bool HTMLSelectElement::anonymousIndexedSetter(unsigned index, PassRefPtr<HTMLOp tionElement> value, ExceptionState& exceptionState)
1568 { 1568 {
1569 if (!value) { 1569 if (!value) {
1570 exceptionState.throwDOMException(TypeMismatchError, ExceptionMessages::f ailedToSet(String::number(index), "HTMLSelectElement", "The value provided was n ot an HTMLOptionElement.")); 1570 exceptionState.throwTypeError(ExceptionMessages::failedToSet(String::num ber(index), "HTMLSelectElement", "The value provided was not an HTMLOptionElemen t."));
1571 return false; 1571 return false;
1572 } 1572 }
1573 setOption(index, value.get(), exceptionState); 1573 setOption(index, value.get(), exceptionState);
1574 return true; 1574 return true;
1575 } 1575 }
1576 1576
1577 bool HTMLSelectElement::anonymousIndexedSetterRemove(unsigned index, ExceptionSt ate& exceptionState) 1577 bool HTMLSelectElement::anonymousIndexedSetterRemove(unsigned index, ExceptionSt ate& exceptionState)
1578 { 1578 {
1579 remove(index); 1579 remove(index);
1580 return true; 1580 return true;
1581 } 1581 }
1582 1582
1583 bool HTMLSelectElement::isInteractiveContent() const 1583 bool HTMLSelectElement::isInteractiveContent() const
1584 { 1584 {
1585 return true; 1585 return true;
1586 } 1586 }
1587 1587
1588 } // namespace 1588 } // namespace
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/HTMLSelectElement/exceptions-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698