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

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

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: Rebase 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/editing/ApplyStyleCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index 1f0ebf59e7b9965d42017696535e5e390e2103ca..0ff8d8b871a3cdd306cf911100b1f68a9bdf2413 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -1505,7 +1505,7 @@ String Node::lookupPrefix(const AtomicString &namespaceURI) const
switch (nodeType()) {
case ELEMENT_NODE:
- return lookupNamespacePrefix(namespaceURI, static_cast<const Element *>(this));
+ return lookupNamespacePrefix(namespaceURI, toElement(this));
case DOCUMENT_NODE:
if (Element* de = toDocument(this)->documentElement())
return de->lookupPrefix(namespaceURI);
@@ -1538,7 +1538,7 @@ String Node::lookupNamespaceURI(const String &prefix) const
switch (nodeType()) {
case ELEMENT_NODE: {
- const Element *elem = static_cast<const Element *>(this);
+ const Element *elem = toElement(this);
if (!elem->namespaceURI().isNull() && elem->prefix() == prefix)
return elem->namespaceURI();
« no previous file with comments | « no previous file | Source/core/editing/ApplyStyleCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698