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

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

Issue 72363002: Rename es => exceptionState in other than bindings/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Retry 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLProgressElement.cpp ('k') | Source/core/html/HTMLTableElement.cpp » ('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 cd14b54c35c5fea5ca269d0586ef78a58f43c7f7..05e34131319ebcbd81f85589d43c286a519c7223 100644
--- a/Source/core/html/HTMLSelectElement.cpp
+++ b/Source/core/html/HTMLSelectElement.cpp
@@ -207,7 +207,7 @@ int HTMLSelectElement::activeSelectionEndListIndex() const
return lastSelectedListIndex();
}
-void HTMLSelectElement::add(HTMLElement* element, HTMLElement* before, ExceptionState& es)
+void HTMLSelectElement::add(HTMLElement* element, HTMLElement* before, ExceptionState& exceptionState)
{
// Make sure the element is ref'd and deref'd so we don't leak it.
RefPtr<HTMLElement> protectNewChild(element);
@@ -215,7 +215,7 @@ void HTMLSelectElement::add(HTMLElement* element, HTMLElement* before, Exception
if (!element || !(element->hasLocalName(optionTag) || element->hasLocalName(hrTag)))
return;
- insertBefore(element, before, es);
+ insertBefore(element, before, exceptionState);
setNeedsValidityCheck();
}
@@ -413,7 +413,7 @@ Node* HTMLSelectElement::item(unsigned index)
return options()->item(index);
}
-void HTMLSelectElement::setOption(unsigned index, HTMLOptionElement* option, ExceptionState& es)
+void HTMLSelectElement::setOption(unsigned index, HTMLOptionElement* option, ExceptionState& exceptionState)
{
if (index > maxSelectItems - 1)
index = maxSelectItems - 1;
@@ -421,21 +421,21 @@ void HTMLSelectElement::setOption(unsigned index, HTMLOptionElement* option, Exc
RefPtr<HTMLElement> before = 0;
// Out of array bounds? First insert empty dummies.
if (diff > 0) {
- setLength(index, es);
+ setLength(index, exceptionState);
// Replace an existing entry?
} else if (diff < 0) {
before = toHTMLElement(options()->item(index+1));
remove(index);
}
// Finally add the new element.
- if (!es.hadException()) {
- add(option, before.get(), es);
+ if (!exceptionState.hadException()) {
+ add(option, before.get(), exceptionState);
if (diff >= 0 && option->selected())
optionSelectionStateChanged(option, true);
}
}
-void HTMLSelectElement::setLength(unsigned newLen, ExceptionState& es)
+void HTMLSelectElement::setLength(unsigned newLen, ExceptionState& exceptionState)
{
if (newLen > maxSelectItems)
newLen = maxSelectItems;
@@ -445,8 +445,8 @@ void HTMLSelectElement::setLength(unsigned newLen, ExceptionState& es)
do {
RefPtr<Element> option = document().createElement(optionTag, false);
ASSERT(option);
- add(toHTMLElement(option), 0, es);
- if (es.hadException())
+ add(toHTMLElement(option), 0, exceptionState);
+ if (exceptionState.hadException())
break;
} while (++diff);
} else {
@@ -467,7 +467,7 @@ void HTMLSelectElement::setLength(unsigned newLen, ExceptionState& es)
for (size_t i = 0; i < itemsToRemove.size(); ++i) {
Element* item = itemsToRemove[i].get();
if (item->parentNode())
- item->parentNode()->removeChild(item, es);
+ item->parentNode()->removeChild(item, exceptionState);
}
}
setNeedsValidityCheck();
@@ -1563,17 +1563,17 @@ void HTMLSelectElement::finishParsingChildren()
updateListItemSelectedStates();
}
-bool HTMLSelectElement::anonymousIndexedSetter(unsigned index, PassRefPtr<HTMLOptionElement> value, ExceptionState& es)
+bool HTMLSelectElement::anonymousIndexedSetter(unsigned index, PassRefPtr<HTMLOptionElement> value, ExceptionState& exceptionState)
{
if (!value) {
- es.throwUninformativeAndGenericDOMException(TypeMismatchError);
+ exceptionState.throwUninformativeAndGenericDOMException(TypeMismatchError);
return false;
}
- setOption(index, value.get(), es);
+ setOption(index, value.get(), exceptionState);
return true;
}
-bool HTMLSelectElement::anonymousIndexedSetterRemove(unsigned index, ExceptionState& es)
+bool HTMLSelectElement::anonymousIndexedSetterRemove(unsigned index, ExceptionState& exceptionState)
{
remove(index);
return true;
« no previous file with comments | « Source/core/html/HTMLProgressElement.cpp ('k') | Source/core/html/HTMLTableElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698