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

Unified Diff: Source/core/editing/htmlediting.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 | « Source/core/editing/ReplaceSelectionCommand.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/htmlediting.cpp
diff --git a/Source/core/editing/htmlediting.cpp b/Source/core/editing/htmlediting.cpp
index 9fcf246e4df5ae4a19f7c92414d036fe20dbe586..e09f35a25dba76928e59f92d8e9162e7a1a16284 100644
--- a/Source/core/editing/htmlediting.cpp
+++ b/Source/core/editing/htmlediting.cpp
@@ -895,7 +895,7 @@ PassRefPtr<HTMLElement> createHTMLElement(Document* document, const AtomicString
bool isTabSpanNode(const Node *node)
{
- return node && node->hasTagName(spanTag) && node->isElementNode() && static_cast<const Element *>(node)->getAttribute(classAttr) == AppleTabSpanClass;
+ return node && node->hasTagName(spanTag) && node->isElementNode() && toElement(node)->getAttribute(classAttr) == AppleTabSpanClass;
}
bool isTabSpanTextNode(const Node *node)
@@ -1007,7 +1007,7 @@ bool isMailBlockquote(const Node *node)
if (!node || !node->hasTagName(blockquoteTag))
return false;
- return static_cast<const Element *>(node)->getAttribute("type") == "cite";
+ return toElement(node)->getAttribute("type") == "cite";
}
int caretMinOffset(const Node* n)
« no previous file with comments | « Source/core/editing/ReplaceSelectionCommand.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698