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

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

Issue 16879016: Use toElement instead of static_cast<Element*> and static_cast<const Element*> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 6 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 | « no previous file | Source/core/dom/Node.cpp » ('j') | Source/core/editing/ReplaceSelectionCommand.cpp » ('J')
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 fed0c42974aaf22d8eacbf157517addd31b22a08..980aa17f63a3fe82c0dbb8529350797ed5efd427 100644
--- a/Source/core/dom/Element.h
+++ b/Source/core/dom/Element.h
@@ -771,7 +771,7 @@ inline Element* Node::previousElementSibling() const
Node* n = previousSibling();
while (n && !n->isElementNode())
n = n->previousSibling();
- return static_cast<Element*>(n);
+ return toElement(n);
}
inline Element* Node::nextElementSibling() const
@@ -779,7 +779,7 @@ inline Element* Node::nextElementSibling() const
Node* n = nextSibling();
while (n && !n->isElementNode())
n = n->nextSibling();
- return static_cast<Element*>(n);
+ return toElement(n);
}
inline bool Element::fastHasAttribute(const QualifiedName& name) const
« no previous file with comments | « no previous file | Source/core/dom/Node.cpp » ('j') | Source/core/editing/ReplaceSelectionCommand.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698