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

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

Issue 2476163002: Fixed perf regression by removing tree traversal for text sibling. (Closed)
Patch Set: Rebased Created 4 years, 1 month 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. 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
7 * (http://www.torchmobile.com/) 7 * (http://www.torchmobile.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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 ContainerNode* parentNode() const; 191 ContainerNode* parentNode() const;
192 Element* parentElement() const; 192 Element* parentElement() const;
193 ContainerNode* parentElementOrShadowRoot() const; 193 ContainerNode* parentElementOrShadowRoot() const;
194 ContainerNode* parentElementOrDocumentFragment() const; 194 ContainerNode* parentElementOrDocumentFragment() const;
195 Node* previousSibling() const { return m_previous; } 195 Node* previousSibling() const { return m_previous; }
196 Node* nextSibling() const { return m_next; } 196 Node* nextSibling() const { return m_next; }
197 NodeList* childNodes(); 197 NodeList* childNodes();
198 Node* firstChild() const; 198 Node* firstChild() const;
199 Node* lastChild() const; 199 Node* lastChild() const;
200 Node* getRootNode(const GetRootNodeOptions&) const; 200 Node* getRootNode(const GetRootNodeOptions&) const;
201 Text* nextTextSibling() const;
202 Node& treeRoot() const; 201 Node& treeRoot() const;
203 Node& shadowIncludingRoot() const; 202 Node& shadowIncludingRoot() const;
204 // closed-shadow-hidden is defined at 203 // closed-shadow-hidden is defined at
205 // https://dom.spec.whatwg.org/#concept-closed-shadow-hidden 204 // https://dom.spec.whatwg.org/#concept-closed-shadow-hidden
206 bool isClosedShadowHiddenFrom(const Node&) const; 205 bool isClosedShadowHiddenFrom(const Node&) const;
207 206
208 void prepend(const HeapVector<NodeOrString>&, ExceptionState&); 207 void prepend(const HeapVector<NodeOrString>&, ExceptionState&);
209 void append(const HeapVector<NodeOrString>&, ExceptionState&); 208 void append(const HeapVector<NodeOrString>&, ExceptionState&);
210 void before(const HeapVector<NodeOrString>&, ExceptionState&); 209 void before(const HeapVector<NodeOrString>&, ExceptionState&);
211 void after(const HeapVector<NodeOrString>&, ExceptionState&); 210 void after(const HeapVector<NodeOrString>&, ExceptionState&);
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 } // namespace blink 1012 } // namespace blink
1014 1013
1015 #ifndef NDEBUG 1014 #ifndef NDEBUG
1016 // Outside the WebCore namespace for ease of invocation from gdb. 1015 // Outside the WebCore namespace for ease of invocation from gdb.
1017 void showNode(const blink::Node*); 1016 void showNode(const blink::Node*);
1018 void showTree(const blink::Node*); 1017 void showTree(const blink::Node*);
1019 void showNodePath(const blink::Node*); 1018 void showNodePath(const blink::Node*);
1020 #endif 1019 #endif
1021 1020
1022 #endif // Node_h 1021 #endif // Node_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | third_party/WebKit/Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698