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

Unified Diff: third_party/WebKit/Source/core/editing/EditingUtilities.cpp

Issue 2718543003: Remove EditingAppleTabSpan class handling (Closed)
Patch Set: Make editing/inserting/5549929-2.html pass Created 3 years, 9 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/EditingUtilities.cpp
diff --git a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
index 334c6e74659019cc3cbbd7852cc4ecd23cadc981..d5bdabb68a148c1a0c7fd801fcfd330d7998fad8 100644
--- a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
+++ b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
@@ -1570,11 +1570,12 @@ HTMLElement* createHTMLElement(Document& document, const QualifiedName& name) {
}
bool isTabHTMLSpanElement(const Node* node) {
- if (!isHTMLSpanElement(node) ||
- toHTMLSpanElement(node)->getAttribute(classAttr) != AppleTabSpanClass)
+ if (!isHTMLSpanElement(node) || !node->firstChild())
return false;
- UseCounter::count(node->document(), UseCounter::EditingAppleTabSpanClass);
- return true;
+ if (node->firstChild()->isCharacterDataNode() &&
+ toCharacterData(node->firstChild())->data().contains('\t'))
+ return true;
+ return false;
}
bool isTabHTMLSpanElementTextNode(const Node* node) {
@@ -1592,7 +1593,6 @@ static HTMLSpanElement* createTabSpanElement(Document& document,
Text* tabTextNode) {
// Make the span to hold the tab.
HTMLSpanElement* spanElement = HTMLSpanElement::create(document);
- spanElement->setAttribute(classAttr, AppleTabSpanClass);
spanElement->setAttribute(styleAttr, "white-space:pre");
// Add tab text to that span.

Powered by Google App Engine
This is Rietveld 408576698