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

Unified Diff: sky/engine/core/dom/Range.cpp

Issue 697773002: Remove Element#attributes. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix template binding. Created 6 years, 2 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 | « sky/engine/core/dom/Node.cpp ('k') | sky/engine/core/dom/TreeScopeAdopter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/dom/Range.cpp
diff --git a/sky/engine/core/dom/Range.cpp b/sky/engine/core/dom/Range.cpp
index 5467b84eac9ac0dcd0d8d977ea5698fa2a528d6b..389ed9499ce64043045058fb6612824ce8224a00 100644
--- a/sky/engine/core/dom/Range.cpp
+++ b/sky/engine/core/dom/Range.cpp
@@ -672,7 +672,6 @@ PassRefPtr<Node> Range::processContentsBetweenOffsets(ActionType action, PassRef
toCharacterData(container)->deleteData(startOffset, endOffset - startOffset, exceptionState);
break;
case Node::ELEMENT_NODE:
- case Node::ATTRIBUTE_NODE:
case Node::DOCUMENT_NODE:
case Node::DOCUMENT_FRAGMENT_NODE:
// FIXME: Should we assert that some nodes never appear here?
@@ -842,7 +841,6 @@ void Range::insertNode(PassRefPtr<Node> prpNewNode, ExceptionState& exceptionSta
// InvalidNodeTypeError: Raised if newNode is an Attr, Entity, Notation, ShadowRoot or Document node.
switch (newNodeType) {
- case Node::ATTRIBUTE_NODE:
case Node::DOCUMENT_NODE:
exceptionState.throwDOMException(InvalidNodeTypeError, "The node to be inserted is a '" + newNode->nodeName() + "' node, which may not be inserted here.");
return;
@@ -942,7 +940,6 @@ Node* Range::checkNodeWOffset(Node* n, int offset, ExceptionState& exceptionStat
if (static_cast<unsigned>(offset) > toCharacterData(n)->length())
exceptionState.throwDOMException(IndexSizeError, "The offset " + String::number(offset) + " is larger than or equal to the node's length (" + String::number(toCharacterData(n)->length()) + ").");
return 0;
- case Node::ATTRIBUTE_NODE:
case Node::DOCUMENT_FRAGMENT_NODE:
case Node::DOCUMENT_NODE:
case Node::ELEMENT_NODE: {
@@ -975,7 +972,6 @@ void Range::checkNodeBA(Node* n, ExceptionState& exceptionState) const
}
switch (n->nodeType()) {
- case Node::ATTRIBUTE_NODE:
case Node::DOCUMENT_FRAGMENT_NODE:
case Node::DOCUMENT_NODE:
exceptionState.throwDOMException(InvalidNodeTypeError, "The node provided is of type '" + n->nodeName() + "'.");
@@ -990,7 +986,6 @@ void Range::checkNodeBA(Node* n, ExceptionState& exceptionState) const
root = parent;
switch (root->nodeType()) {
- case Node::ATTRIBUTE_NODE:
case Node::DOCUMENT_NODE:
case Node::DOCUMENT_FRAGMENT_NODE:
case Node::ELEMENT_NODE:
@@ -1052,7 +1047,6 @@ void Range::selectNode(Node* refNode, ExceptionState& exceptionState)
case Node::ELEMENT_NODE:
case Node::TEXT_NODE:
break;
- case Node::ATTRIBUTE_NODE:
case Node::DOCUMENT_FRAGMENT_NODE:
case Node::DOCUMENT_NODE:
exceptionState.throwDOMException(InvalidNodeTypeError, "The node provided is of type '" + refNode->nodeName() + "'.");
@@ -1103,7 +1097,6 @@ void Range::surroundContents(PassRefPtr<Node> passNewParent, ExceptionState& exc
// InvalidNodeTypeError: Raised if node is an Attr, Entity, DocumentType, Notation,
// Document, or DocumentFragment node.
switch (newParent->nodeType()) {
- case Node::ATTRIBUTE_NODE:
case Node::DOCUMENT_FRAGMENT_NODE:
case Node::DOCUMENT_NODE:
exceptionState.throwDOMException(InvalidNodeTypeError, "The node provided is of type '" + newParent->nodeName() + "'.");
« no previous file with comments | « sky/engine/core/dom/Node.cpp ('k') | sky/engine/core/dom/TreeScopeAdopter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698