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

Unified Diff: Source/core/dom/Element.h

Issue 166033005: Port Node's previousElementSibling() / nextElementSibling() to ElementTraversal (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/SelectorChecker.cpp ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.h
diff --git a/Source/core/dom/Element.h b/Source/core/dom/Element.h
index 336dc9acd9f48d661ed6154cf880d6130bb2ceff..8886f69fd5a48dac9362220b780d1faa19741dd0 100644
--- a/Source/core/dom/Element.h
+++ b/Source/core/dom/Element.h
@@ -700,22 +700,6 @@ inline Element* Node::parentElement() const
return parent && parent->isElementNode() ? toElement(parent) : 0;
}
-inline Element* Node::previousElementSibling() const
-{
- Node* n = previousSibling();
- while (n && !n->isElementNode())
- n = n->previousSibling();
- return toElement(n);
-}
-
-inline Element* Node::nextElementSibling() const
-{
- Node* n = nextSibling();
- while (n && !n->isElementNode())
- n = n->nextSibling();
- return toElement(n);
-}
-
inline bool Element::fastHasAttribute(const QualifiedName& name) const
{
ASSERT(fastAttributeLookupAllowed(name));
« no previous file with comments | « Source/core/css/SelectorChecker.cpp ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698