| Index: sky/engine/core/dom/Document.cpp
|
| diff --git a/sky/engine/core/dom/Document.cpp b/sky/engine/core/dom/Document.cpp
|
| index 2b2c4faa55f9aaaa49d19e04812d49660eeb6999..72d8c608e825542b77123989b2da6d9b661cc366 100644
|
| --- a/sky/engine/core/dom/Document.cpp
|
| +++ b/sky/engine/core/dom/Document.cpp
|
| @@ -1678,78 +1678,6 @@ MouseEventWithHitTestResults Document::prepareMouseEvent(const HitTestRequest& r
|
| return MouseEventWithHitTestResults(event, result);
|
| }
|
|
|
| -// DOM Section 1.1.1
|
| -bool Document::childTypeAllowed(NodeType type) const
|
| -{
|
| - switch (type) {
|
| - case DOCUMENT_FRAGMENT_NODE:
|
| - case DOCUMENT_NODE:
|
| - case TEXT_NODE:
|
| - return false;
|
| - case ELEMENT_NODE:
|
| - // Documents may contain no more than one of each of these.
|
| - // (One Element and one DocumentType.)
|
| - for (Node* c = firstChild(); c; c = c->nextSibling())
|
| - if (c->nodeType() == type)
|
| - return false;
|
| - return true;
|
| - }
|
| - return false;
|
| -}
|
| -
|
| -bool Document::canReplaceChild(const Node& newChild, const Node& oldChild) const
|
| -{
|
| - if (oldChild.nodeType() == newChild.nodeType())
|
| - return true;
|
| -
|
| - int numElements = 0;
|
| -
|
| - // First, check how many doctypes and elements we have, not counting
|
| - // the child we're about to remove.
|
| - for (Node* c = firstChild(); c; c = c->nextSibling()) {
|
| - if (c == oldChild)
|
| - continue;
|
| -
|
| - switch (c->nodeType()) {
|
| - case ELEMENT_NODE:
|
| - numElements++;
|
| - break;
|
| - default:
|
| - break;
|
| - }
|
| - }
|
| -
|
| - // Then, see how many doctypes and elements might be added by the new child.
|
| - if (newChild.isDocumentFragment()) {
|
| - for (Node* c = toDocumentFragment(newChild).firstChild(); c; c = c->nextSibling()) {
|
| - switch (c->nodeType()) {
|
| - case DOCUMENT_FRAGMENT_NODE:
|
| - case DOCUMENT_NODE:
|
| - case TEXT_NODE:
|
| - return false;
|
| - case ELEMENT_NODE:
|
| - numElements++;
|
| - break;
|
| - }
|
| - }
|
| - } else {
|
| - switch (newChild.nodeType()) {
|
| - case DOCUMENT_FRAGMENT_NODE:
|
| - case DOCUMENT_NODE:
|
| - case TEXT_NODE:
|
| - return false;
|
| - case ELEMENT_NODE:
|
| - numElements++;
|
| - break;
|
| - }
|
| - }
|
| -
|
| - if (numElements > 1)
|
| - return false;
|
| -
|
| - return true;
|
| -}
|
| -
|
| PassRefPtr<Node> Document::cloneNode(bool deep)
|
| {
|
| RefPtr<Document> clone = cloneDocumentWithoutChildren();
|
|
|