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

Side by Side Diff: third_party/WebKit/Source/core/dom/Range.cpp

Issue 1868433002: Rename function names to match the DOM Standard (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Gunnstein Lye (gunnstein@netcom.no) 3 * (C) 2000 Gunnstein Lye (gunnstein@netcom.no)
4 * (C) 2000 Frederik Holljen (frederik.holljen@hig.no) 4 * (C) 2000 Frederik Holljen (frederik.holljen@hig.no)
5 * (C) 2001 Peter Kelly (pmk@post.com) 5 * (C) 2001 Peter Kelly (pmk@post.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
7 * Copyright (C) 2011 Motorola Mobility. All rights reserved. 7 * Copyright (C) 2011 Motorola Mobility. All rights reserved.
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 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1211 if (!parentOfNewParent) { 1211 if (!parentOfNewParent) {
1212 exceptionState.throwDOMException(HierarchyRequestError, "The container n ode is a detached character data node; no parent node is available for insertion ."); 1212 exceptionState.throwDOMException(HierarchyRequestError, "The container n ode is a detached character data node; no parent node is available for insertion .");
1213 return; 1213 return;
1214 } 1214 }
1215 1215
1216 if (!parentOfNewParent->childTypeAllowed(newParent->getNodeType())) { 1216 if (!parentOfNewParent->childTypeAllowed(newParent->getNodeType())) {
1217 exceptionState.throwDOMException(HierarchyRequestError, "The node provid ed is of type '" + newParent->nodeName() + "', which may not be inserted here.") ; 1217 exceptionState.throwDOMException(HierarchyRequestError, "The node provid ed is of type '" + newParent->nodeName() + "', which may not be inserted here.") ;
1218 return; 1218 return;
1219 } 1219 }
1220 1220
1221 if (newParent->containsIncludingShadowDOM(m_start.container())) { 1221 if (newParent->isShadowIncludingInclusiveAncestorOf(m_start.container())) {
1222 exceptionState.throwDOMException(HierarchyRequestError, "The node provid ed contains the insertion point; it may not be inserted into itself."); 1222 exceptionState.throwDOMException(HierarchyRequestError, "The node provid ed contains the insertion point; it may not be inserted into itself.");
1223 return; 1223 return;
1224 } 1224 }
1225 1225
1226 // FIXME: Do we need a check if the node would end up with a child node of a type not 1226 // FIXME: Do we need a check if the node would end up with a child node of a type not
1227 // allowed by the type of node? 1227 // allowed by the type of node?
1228 1228
1229 while (Node* n = newParent->firstChild()) { 1229 while (Node* n = newParent->firstChild()) {
1230 toContainerNode(newParent)->removeChild(n, exceptionState); 1230 toContainerNode(newParent)->removeChild(n, exceptionState);
1231 if (exceptionState.hadException()) 1231 if (exceptionState.hadException())
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
1646 { 1646 {
1647 if (range && range->boundaryPointsValid()) { 1647 if (range && range->boundaryPointsValid()) {
1648 range->startContainer()->showTreeAndMark(range->startContainer(), "S", r ange->endContainer(), "E"); 1648 range->startContainer()->showTreeAndMark(range->startContainer(), "S", r ange->endContainer(), "E");
1649 fprintf(stderr, "start offset: %d, end offset: %d\n", range->startOffset (), range->endOffset()); 1649 fprintf(stderr, "start offset: %d, end offset: %d\n", range->startOffset (), range->endOffset());
1650 } else { 1650 } else {
1651 fprintf(stderr, "Cannot show tree if range is null, or if boundary point s are invalid.\n"); 1651 fprintf(stderr, "Cannot show tree if range is null, or if boundary point s are invalid.\n");
1652 } 1652 }
1653 } 1653 }
1654 1654
1655 #endif 1655 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698