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

Unified Diff: Source/core/editing/ReplaceSelectionCommand.cpp

Issue 23863002: Refactoring: toHTMLElement(const Node*) added but never used. Using it. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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/MarkupAccumulator.cpp ('k') | Source/core/editing/markup.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/ReplaceSelectionCommand.cpp
diff --git a/Source/core/editing/ReplaceSelectionCommand.cpp b/Source/core/editing/ReplaceSelectionCommand.cpp
index 8e97453d68b4a0dea0d58b56d7ed797a81395156..d578d660dbea643cee00e010d4e1db27dbd92301 100644
--- a/Source/core/editing/ReplaceSelectionCommand.cpp
+++ b/Source/core/editing/ReplaceSelectionCommand.cpp
@@ -105,8 +105,7 @@ static bool isInterchangeNewlineNode(const Node *node)
static bool isInterchangeConvertedSpaceSpan(const Node *node)
{
DEFINE_STATIC_LOCAL(String, convertedSpaceSpanClassString, (AppleConvertedSpace));
- return node->isHTMLElement() &&
- static_cast<const HTMLElement *>(node)->getAttribute(classAttr) == convertedSpaceSpanClassString;
+ return node->isHTMLElement() && toHTMLElement(node)->getAttribute(classAttr) == convertedSpaceSpanClassString;
}
static Position positionAvoidingPrecedingNodes(Position pos)
@@ -863,7 +862,7 @@ static bool isInlineNodeWithStyle(const Node* node)
// We can skip over elements whose class attribute is
// one of our internal classes.
- const HTMLElement* element = static_cast<const HTMLElement*>(node);
+ const HTMLElement* element = toHTMLElement(node);
const AtomicString& classAttributeValue = element->getAttribute(classAttr);
if (classAttributeValue == AppleTabSpanClass
|| classAttributeValue == AppleConvertedSpace
« no previous file with comments | « Source/core/editing/MarkupAccumulator.cpp ('k') | Source/core/editing/markup.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698