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

Unified Diff: third_party/WebKit/Source/core/dom/Node.cpp

Issue 2476163002: Fixed perf regression by removing tree traversal for text sibling. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/Node.cpp
diff --git a/third_party/WebKit/Source/core/dom/Node.cpp b/third_party/WebKit/Source/core/dom/Node.cpp
index 6f5ced5d306c9f57f537ed650b071db855991c82..494da728eeede057b125ed01e214e985c5970d22 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -390,18 +390,6 @@ Node* Node::getRootNode(const GetRootNodeOptions& options) const {
: &treeRoot();
}
-Text* Node::nextTextSibling() const {
- for (Node* sibling = nextSibling();
- sibling &&
- (!sibling->isElementNode() || !toElement(sibling)->layoutObject());
- sibling = sibling->nextSibling()) {
- if (sibling->isTextNode()) {
- return toText(sibling);
- }
- }
- return nullptr;
-}
-
Node* Node::insertBefore(Node* newChild,
Node* refChild,
ExceptionState& exceptionState) {
« third_party/WebKit/Source/core/dom/Document.h ('K') | « third_party/WebKit/Source/core/dom/Node.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698