Index: Source/core/editing/ApplyStyleCommand.cpp |
diff --git a/Source/core/editing/ApplyStyleCommand.cpp b/Source/core/editing/ApplyStyleCommand.cpp |
index 6638f846bd1182d0e3c0efa2753ab91210b6a1d4..1368e6386c7095609edf9e8e016969abbb302675 100644 |
--- a/Source/core/editing/ApplyStyleCommand.cpp |
+++ b/Source/core/editing/ApplyStyleCommand.cpp |
@@ -43,6 +43,7 @@ |
#include "core/editing/TextIterator.h" |
#include "core/editing/VisibleUnits.h" |
#include "core/editing/htmlediting.h" |
+#include "core/frame/UseCounter.h" |
#include "core/rendering/RenderObject.h" |
#include "core/rendering/RenderText.h" |
#include "platform/heap/Handle.h" |
@@ -65,7 +66,10 @@ bool isLegacyAppleStyleSpan(const Node *node) |
return false; |
const HTMLElement* elem = toHTMLElement(node); |
- return elem->hasLocalName(spanAttr) && elem->getAttribute(classAttr) == styleSpanClassString(); |
+ if (!elem->hasLocalName(spanAttr) || elem->getAttribute(classAttr) != styleSpanClassString()) |
+ return false; |
+ UseCounter::count(elem->document(), UseCounter::EditingAppleStyleSpanClass); |
+ return true; |
} |
static bool hasNoAttributeOrOnlyStyleAttribute(const Element* element, ShouldStyleAttributeBeEmpty shouldStyleAttributeBeEmpty) |