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

Side by Side Diff: third_party/WebKit/Source/core/dom/Node.h

Issue 1934123002: Implement DOM methods: prepend, append, after, before and replaceWith. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync test expectations Created 4 years, 7 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-2011, 2014 Apple Inc. All rights reserved. 5 * Copyright (C) 2004-2011, 2014 Apple Inc. All rights reserved.
6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version. 11 * version 2 of the License, or (at your option) any later version.
12 * 12 *
13 * This library is distributed in the hope that it will be useful, 13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details. 16 * Library General Public License for more details.
17 * 17 *
18 * You should have received a copy of the GNU Library General Public License 18 * You should have received a copy of the GNU Library General Public License
19 * along with this library; see the file COPYING.LIB. If not, write to 19 * along with this library; see the file COPYING.LIB. If not, write to
20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA. 21 * Boston, MA 02110-1301, USA.
22 * 22 *
23 */ 23 */
24 24
25 #ifndef Node_h 25 #ifndef Node_h
26 #define Node_h 26 #define Node_h
27 27
28 #include "bindings/core/v8/ExceptionStatePlaceholder.h" 28 #include "bindings/core/v8/ExceptionStatePlaceholder.h"
29 #include "bindings/core/v8/UnionTypesCore.h"
29 #include "core/CoreExport.h" 30 #include "core/CoreExport.h"
30 #include "core/dom/MutationObserver.h" 31 #include "core/dom/MutationObserver.h"
31 #include "core/dom/SimulatedClickOptions.h" 32 #include "core/dom/SimulatedClickOptions.h"
32 #include "core/dom/TreeScope.h" 33 #include "core/dom/TreeScope.h"
33 #include "core/editing/EditingBoundary.h" 34 #include "core/editing/EditingBoundary.h"
34 #include "core/events/EventTarget.h" 35 #include "core/events/EventTarget.h"
35 #include "core/style/ComputedStyleConstants.h" 36 #include "core/style/ComputedStyleConstants.h"
36 #include "platform/geometry/LayoutRect.h" 37 #include "platform/geometry/LayoutRect.h"
37 #include "platform/heap/Handle.h" 38 #include "platform/heap/Handle.h"
38 #include "wtf/Forward.h" 39 #include "wtf/Forward.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 ContainerNode* parentElementOrShadowRoot() const; 189 ContainerNode* parentElementOrShadowRoot() const;
189 ContainerNode* parentElementOrDocumentFragment() const; 190 ContainerNode* parentElementOrDocumentFragment() const;
190 Node* previousSibling() const { return m_previous; } 191 Node* previousSibling() const { return m_previous; }
191 Node* nextSibling() const { return m_next; } 192 Node* nextSibling() const { return m_next; }
192 NodeList* childNodes(); 193 NodeList* childNodes();
193 Node* firstChild() const; 194 Node* firstChild() const;
194 Node* lastChild() const; 195 Node* lastChild() const;
195 Node& treeRoot() const; 196 Node& treeRoot() const;
196 Node& shadowIncludingRoot() const; 197 Node& shadowIncludingRoot() const;
197 198
199 void prepend(const HeapVector<NodeOrString>&, ExceptionState&);
200 void append(const HeapVector<NodeOrString>&, ExceptionState&);
201 void before(const HeapVector<NodeOrString>&, ExceptionState&);
202 void after(const HeapVector<NodeOrString>&, ExceptionState&);
203 void replaceWith(const HeapVector<NodeOrString>&, ExceptionState&);
198 void remove(ExceptionState& = ASSERT_NO_EXCEPTION); 204 void remove(ExceptionState& = ASSERT_NO_EXCEPTION);
199 205
200 Node* pseudoAwareNextSibling() const; 206 Node* pseudoAwareNextSibling() const;
201 Node* pseudoAwarePreviousSibling() const; 207 Node* pseudoAwarePreviousSibling() const;
202 Node* pseudoAwareFirstChild() const; 208 Node* pseudoAwareFirstChild() const;
203 Node* pseudoAwareLastChild() const; 209 Node* pseudoAwareLastChild() const;
204 210
205 const KURL& baseURI() const; 211 const KURL& baseURI() const;
206 212
207 Node* insertBefore(Node* newChild, Node* refChild, ExceptionState& = ASSERT_ NO_EXCEPTION); 213 Node* insertBefore(Node* newChild, Node* refChild, ExceptionState& = ASSERT_ NO_EXCEPTION);
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 } // namespace blink 898 } // namespace blink
893 899
894 #ifndef NDEBUG 900 #ifndef NDEBUG
895 // Outside the WebCore namespace for ease of invocation from gdb. 901 // Outside the WebCore namespace for ease of invocation from gdb.
896 void showNode(const blink::Node*); 902 void showNode(const blink::Node*);
897 void showTree(const blink::Node*); 903 void showTree(const blink::Node*);
898 void showNodePath(const blink::Node*); 904 void showNodePath(const blink::Node*);
899 #endif 905 #endif
900 906
901 #endif // Node_h 907 #endif // Node_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ChildNode.idl ('k') | third_party/WebKit/Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698