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

Unified Diff: sky/engine/core/dom/Document.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/Attr.idl ('k') | sky/engine/core/dom/Element.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/dom/Document.cpp
diff --git a/sky/engine/core/dom/Document.cpp b/sky/engine/core/dom/Document.cpp
index c5e0a8fb6688709ae31209e8fce7ec43c898900b..81a6cbaa8bf3eb169f8208aa5c00bd93c4c9963a 100644
--- a/sky/engine/core/dom/Document.cpp
+++ b/sky/engine/core/dom/Document.cpp
@@ -653,9 +653,6 @@ PassRefPtr<Node> Document::importNode(Node* importedNode, bool deep, ExceptionSt
return newElement.release();
}
- case ATTRIBUTE_NODE:
- exceptionState.throwDOMException(NotSupportedError, "Cannot clone an Attr.");
- return nullptr;
case DOCUMENT_FRAGMENT_NODE: {
if (importedNode->isShadowRoot()) {
// ShadowRoot nodes should not be explicitly importable.
@@ -687,10 +684,6 @@ PassRefPtr<Node> Document::adoptNode(PassRefPtr<Node> source, ExceptionState& ex
case DOCUMENT_NODE:
exceptionState.throwDOMException(NotSupportedError, "The node provided is of type '" + source->nodeName() + "', which may not be adopted.");
return nullptr;
- case ATTRIBUTE_NODE: {
- exceptionState.throwDOMException(NotSupportedError, "Cannot adopt Attr.");
- break;
- }
default:
if (source->isShadowRoot()) {
// ShadowRoot cannot disconnect itself from the host node.
@@ -1821,7 +1814,6 @@ MouseEventWithHitTestResults Document::prepareMouseEvent(const HitTestRequest& r
bool Document::childTypeAllowed(NodeType type) const
{
switch (type) {
- case ATTRIBUTE_NODE:
case DOCUMENT_FRAGMENT_NODE:
case DOCUMENT_NODE:
case TEXT_NODE:
@@ -1863,7 +1855,6 @@ bool Document::canReplaceChild(const Node& newChild, const Node& oldChild) const
if (newChild.isDocumentFragment()) {
for (Node* c = toDocumentFragment(newChild).firstChild(); c; c = c->nextSibling()) {
switch (c->nodeType()) {
- case ATTRIBUTE_NODE:
case DOCUMENT_FRAGMENT_NODE:
case DOCUMENT_NODE:
case TEXT_NODE:
@@ -1875,7 +1866,6 @@ bool Document::canReplaceChild(const Node& newChild, const Node& oldChild) const
}
} else {
switch (newChild.nodeType()) {
- case ATTRIBUTE_NODE:
case DOCUMENT_FRAGMENT_NODE:
case DOCUMENT_NODE:
case TEXT_NODE:
« no previous file with comments | « sky/engine/core/dom/Attr.idl ('k') | sky/engine/core/dom/Element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698