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

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

Issue 24469004: Amusingly deprecate the generic version of 'ExceptionState::throwDOMException'. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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/HTMLDialogElement.cpp ('k') | Source/core/html/HTMLFrameOwnerElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLElement.cpp
diff --git a/Source/core/html/HTMLElement.cpp b/Source/core/html/HTMLElement.cpp
index fdff9743f51a27a97d795b51d8c063ad2518cde8..ec3daf828500e5dff0244d36af527b5f53ab46c7 100644
--- a/Source/core/html/HTMLElement.cpp
+++ b/Source/core/html/HTMLElement.cpp
@@ -351,7 +351,7 @@ void HTMLElement::setOuterHTML(const String& html, ExceptionState& es)
{
Node* p = parentNode();
if (!p || !p->isHTMLElement()) {
- es.throwDOMException(NoModificationAllowedError);
+ es.throwUninformativeAndGenericDOMException(NoModificationAllowedError);
return;
}
RefPtr<HTMLElement> parent = toHTMLElement(p);
@@ -407,14 +407,14 @@ PassRefPtr<DocumentFragment> HTMLElement::textToFragment(const String& text, Exc
void HTMLElement::setInnerText(const String& text, ExceptionState& es)
{
if (ieForbidsInsertHTML()) {
- es.throwDOMException(NoModificationAllowedError);
+ es.throwUninformativeAndGenericDOMException(NoModificationAllowedError);
return;
}
if (hasLocalName(colTag) || hasLocalName(colgroupTag) || hasLocalName(framesetTag) ||
hasLocalName(headTag) || hasLocalName(htmlTag) || hasLocalName(tableTag) ||
hasLocalName(tbodyTag) || hasLocalName(tfootTag) || hasLocalName(theadTag) ||
hasLocalName(trTag)) {
- es.throwDOMException(NoModificationAllowedError);
+ es.throwUninformativeAndGenericDOMException(NoModificationAllowedError);
return;
}
@@ -454,20 +454,20 @@ void HTMLElement::setInnerText(const String& text, ExceptionState& es)
void HTMLElement::setOuterText(const String &text, ExceptionState& es)
{
if (ieForbidsInsertHTML()) {
- es.throwDOMException(NoModificationAllowedError);
+ es.throwUninformativeAndGenericDOMException(NoModificationAllowedError);
return;
}
if (hasLocalName(colTag) || hasLocalName(colgroupTag) || hasLocalName(framesetTag) ||
hasLocalName(headTag) || hasLocalName(htmlTag) || hasLocalName(tableTag) ||
hasLocalName(tbodyTag) || hasLocalName(tfootTag) || hasLocalName(theadTag) ||
hasLocalName(trTag)) {
- es.throwDOMException(NoModificationAllowedError);
+ es.throwUninformativeAndGenericDOMException(NoModificationAllowedError);
return;
}
ContainerNode* parent = parentNode();
if (!parent) {
- es.throwDOMException(NoModificationAllowedError);
+ es.throwUninformativeAndGenericDOMException(NoModificationAllowedError);
return;
}
@@ -482,7 +482,7 @@ void HTMLElement::setOuterText(const String &text, ExceptionState& es)
newChild = Text::create(document(), text);
if (!this || !parentNode())
- es.throwDOMException(HierarchyRequestError);
+ es.throwUninformativeAndGenericDOMException(HierarchyRequestError);
if (es.hadException())
return;
parent->replaceChild(newChild.release(), this, es);
@@ -533,7 +533,7 @@ Node* HTMLElement::insertAdjacent(const String& where, Node* newChild, Exception
}
// IE throws COM Exception E_INVALIDARG; this is the best DOM exception alternative.
- es.throwDOMException(NotSupportedError);
+ es.throwUninformativeAndGenericDOMException(NotSupportedError);
return 0;
}
@@ -541,7 +541,7 @@ Element* HTMLElement::insertAdjacentElement(const String& where, Element* newChi
{
if (!newChild) {
// IE throws COM Exception E_INVALIDARG; this is the best DOM exception alternative.
- es.throwDOMException(TypeMismatchError);
+ es.throwUninformativeAndGenericDOMException(TypeMismatchError);
return 0;
}
@@ -555,14 +555,14 @@ static Element* contextElementForInsertion(const String& where, Element* element
if (equalIgnoringCase(where, "beforeBegin") || equalIgnoringCase(where, "afterEnd")) {
ContainerNode* parent = element->parentNode();
if (parent && !parent->isElementNode()) {
- es.throwDOMException(NoModificationAllowedError);
+ es.throwUninformativeAndGenericDOMException(NoModificationAllowedError);
return 0;
}
return toElement(parent);
}
if (equalIgnoringCase(where, "afterBegin") || equalIgnoringCase(where, "beforeEnd"))
return element;
- es.throwDOMException(SyntaxError);
+ es.throwUninformativeAndGenericDOMException(SyntaxError);
return 0;
}
@@ -677,7 +677,7 @@ void HTMLElement::setContentEditable(const String& enabled, ExceptionState& es)
else if (equalIgnoringCase(enabled, "inherit"))
removeAttribute(contenteditableAttr);
else
- es.throwDOMException(SyntaxError);
+ es.throwUninformativeAndGenericDOMException(SyntaxError);
}
bool HTMLElement::draggable() const
« no previous file with comments | « Source/core/html/HTMLDialogElement.cpp ('k') | Source/core/html/HTMLFrameOwnerElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698