Index: Source/core/editing/ApplyStyleCommand.cpp |
diff --git a/Source/core/editing/ApplyStyleCommand.cpp b/Source/core/editing/ApplyStyleCommand.cpp |
index 37e494051d361022d63dba296b1381434b8e0c91..de7765bd980a619acc0ede63fc77fbf7469afa7f 100644 |
--- a/Source/core/editing/ApplyStyleCommand.cpp |
+++ b/Source/core/editing/ApplyStyleCommand.cpp |
@@ -65,10 +65,10 @@ bool isLegacyAppleStyleSpan(const Node *node) |
if (!node || !node->isHTMLElement()) |
return false; |
- const HTMLElement* elem = toHTMLElement(node); |
- if (!elem->hasLocalName(spanAttr) || elem->getAttribute(classAttr) != styleSpanClassString()) |
+ const HTMLElement& element = toHTMLElement(*node); |
+ if (!isHTMLSpanElement(element) || element.getAttribute(classAttr) != styleSpanClassString()) |
return false; |
- UseCounter::count(elem->document(), UseCounter::EditingAppleStyleSpanClass); |
+ UseCounter::count(element.document(), UseCounter::EditingAppleStyleSpanClass); |
return true; |
} |