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

Unified Diff: third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp

Issue 2685793002: Remove Apple-style-span CSS class support (Closed)
Patch Set: Update test cases Created 3 years, 10 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
Index: third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp b/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp
index 040fda0fad899edbaf0a99b19afff8920cc74c28..e9feef51b6d4d01d24fbb0d82d2e782175275a74 100644
--- a/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp
@@ -56,22 +56,6 @@ namespace blink {
using namespace HTMLNames;
-static String& styleSpanClassString() {
- DEFINE_STATIC_LOCAL(String, styleSpanClassString, ((AppleStyleSpanClass)));
- return styleSpanClassString;
-}
-
-bool isLegacyAppleHTMLSpanElement(const Node* node) {
- if (!isHTMLSpanElement(node))
- return false;
-
- const HTMLSpanElement& span = toHTMLSpanElement(*node);
- if (span.getAttribute(classAttr) != styleSpanClassString())
- return false;
- UseCounter::count(span.document(), UseCounter::EditingAppleStyleSpanClass);
- return true;
-}
-
static bool hasNoAttributeOrOnlyStyleAttribute(
const HTMLElement* element,
ShouldStyleAttributeBeEmpty shouldStyleAttributeBeEmpty) {
@@ -80,8 +64,6 @@ static bool hasNoAttributeOrOnlyStyleAttribute(
return true;
unsigned matchedAttributes = 0;
- if (element->getAttribute(classAttr) == styleSpanClassString())
- matchedAttributes++;
if (element->hasAttribute(styleAttr) &&
(shouldStyleAttributeBeEmpty == AllowNonEmptyStyleAttribute ||
!element->inlineStyle() || element->inlineStyle()->isEmpty()))

Powered by Google App Engine
This is Rietveld 408576698