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

Side by Side Diff: Source/WebCore/dom/Node.cpp

Issue 10914322: Merge 127534 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 22 matching lines...) Expand all
33 #include "Chrome.h" 33 #include "Chrome.h"
34 #include "ChromeClient.h" 34 #include "ChromeClient.h"
35 #include "CSSParser.h" 35 #include "CSSParser.h"
36 #include "CSSRule.h" 36 #include "CSSRule.h"
37 #include "CSSSelector.h" 37 #include "CSSSelector.h"
38 #include "CSSSelectorList.h" 38 #include "CSSSelectorList.h"
39 #include "CSSStyleRule.h" 39 #include "CSSStyleRule.h"
40 #include "CSSStyleSheet.h" 40 #include "CSSStyleSheet.h"
41 #include "ChildNodeList.h" 41 #include "ChildNodeList.h"
42 #include "ClassNodeList.h" 42 #include "ClassNodeList.h"
43 #include "ContainerNodeAlgorithms.h"
43 #include "ContextMenuController.h" 44 #include "ContextMenuController.h"
44 #include "DOMImplementation.h" 45 #include "DOMImplementation.h"
45 #include "DOMSettableTokenList.h" 46 #include "DOMSettableTokenList.h"
46 #include "Document.h" 47 #include "Document.h"
47 #include "DocumentType.h" 48 #include "DocumentType.h"
48 #include "DynamicNodeList.h" 49 #include "DynamicNodeList.h"
49 #include "Element.h" 50 #include "Element.h"
50 #include "ElementRareData.h" 51 #include "ElementRareData.h"
51 #include "ElementShadow.h" 52 #include "ElementShadow.h"
52 #include "Event.h" 53 #include "Event.h"
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 return; 1193 return;
1193 } 1194 }
1194 1195
1195 // HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not all ow children of the type of the 1196 // HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not all ow children of the type of the
1196 // newChild node, or if the node to append is one of this node's ancestors. 1197 // newChild node, or if the node to append is one of this node's ancestors.
1197 1198
1198 if (newChild == newParent || newParent->isDescendantOf(newChild)) { 1199 if (newChild == newParent || newParent->isDescendantOf(newChild)) {
1199 ec = HIERARCHY_REQUEST_ERR; 1200 ec = HIERARCHY_REQUEST_ERR;
1200 return; 1201 return;
1201 } 1202 }
1203
1204 if (newParent->inDocument() && ChildFrameDisconnector::nodeHasDisconnector(n ewParent)) {
1205 ec = NO_MODIFICATION_ALLOWED_ERR;
1206 return;
1207 }
1202 } 1208 }
1203 1209
1204 void Node::checkReplaceChild(Node* newChild, Node* oldChild, ExceptionCode& ec) 1210 void Node::checkReplaceChild(Node* newChild, Node* oldChild, ExceptionCode& ec)
1205 { 1211 {
1206 if (!oldChild) { 1212 if (!oldChild) {
1207 ec = NOT_FOUND_ERR; 1213 ec = NOT_FOUND_ERR;
1208 return; 1214 return;
1209 } 1215 }
1210 1216
1211 checkAcceptChild(this, newChild, ec); 1217 checkAcceptChild(this, newChild, ec);
(...skipping 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after
2837 node->showTreeForThis(); 2843 node->showTreeForThis();
2838 } 2844 }
2839 2845
2840 void showNodePath(const WebCore::Node* node) 2846 void showNodePath(const WebCore::Node* node)
2841 { 2847 {
2842 if (node) 2848 if (node)
2843 node->showNodePathForThis(); 2849 node->showNodePathForThis();
2844 } 2850 }
2845 2851
2846 #endif 2852 #endif
OLDNEW
« no previous file with comments | « Source/WebCore/dom/ContainerNodeAlgorithms.cpp ('k') | Source/WebCore/html/HTMLFrameElementBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698