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

Unified Diff: Source/core/dom/Element.cpp

Issue 969363002: Add [TypeChecking=Interface] to Element interface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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 | « LayoutTests/fast/dynamic/insertAdjacentElement-expected.txt ('k') | Source/core/dom/Element.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index 875ba140cabde90befdfa7eea6c3894431d1c059..857ea1b7aedd4dc78b5d3f281988bb5f154be4f5 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -1913,11 +1913,6 @@ void Element::removeAttrNodeList()
PassRefPtrWillBeRawPtr<Attr> Element::setAttributeNode(Attr* attrNode, ExceptionState& exceptionState)
{
- if (!attrNode) {
- exceptionState.throwDOMException(TypeMismatchError, ExceptionMessages::argumentNullOrIncorrectType(1, "Attr"));
- return nullptr;
- }
-
RefPtrWillBeRawPtr<Attr> oldAttrNode = attrIfExists(attrNode->qualifiedName());
if (oldAttrNode.get() == attrNode)
return attrNode; // This Attr is already attached to the element.
@@ -1972,10 +1967,6 @@ PassRefPtrWillBeRawPtr<Attr> Element::setAttributeNodeNS(Attr* attr, ExceptionSt
PassRefPtrWillBeRawPtr<Attr> Element::removeAttributeNode(Attr* attr, ExceptionState& exceptionState)
{
- if (!attr) {
- exceptionState.throwDOMException(TypeMismatchError, ExceptionMessages::argumentNullOrIncorrectType(1, "Attr"));
- return nullptr;
- }
if (attr->ownerElement() != this) {
exceptionState.throwDOMException(NotFoundError, "The node provided is owned by another element.");
return nullptr;
@@ -2389,12 +2380,6 @@ static Element* contextElementForInsertion(const String& where, Element* element
Element* Element::insertAdjacentElement(const String& where, Element* newChild, ExceptionState& exceptionState)
{
- if (!newChild) {
- // IE throws COM Exception E_INVALIDARG; this is the best DOM exception alternative.
- exceptionState.throwTypeError("The node provided is null.");
- return nullptr;
- }
-
Node* returnValue = insertAdjacent(where, newChild, exceptionState);
return toElement(returnValue);
}
« no previous file with comments | « LayoutTests/fast/dynamic/insertAdjacentElement-expected.txt ('k') | Source/core/dom/Element.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698