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

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

Issue 7973008: Revert 93001 - Apple-style-span class seems unnecessary (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 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/WebCore/editing/EditingStyle.cpp ('k') | Source/WebCore/editing/markup.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/editing/ReplaceSelectionCommand.cpp
===================================================================
--- Source/WebCore/editing/ReplaceSelectionCommand.cpp (revision 95747)
+++ Source/WebCore/editing/ReplaceSelectionCommand.cpp (working copy)
@@ -511,9 +511,7 @@
} else if (newInlineStyle->style()->length() != inlineStyle->length())
setNodeAttribute(element, styleAttr, newInlineStyle->style()->cssText());
- // WebKit used to not add display: inline and float: none on copy.
- // Keep this code around for backward compatibility
- if (isLegacyAppleStyleSpan(element)) {
+ if (isStyleSpan(element)) {
if (!element->firstChild()) {
removeNodePreservingChildren(element);
continue;
@@ -618,7 +616,7 @@
// Either there are no style spans in the fragment or a WebKit client has added content to the fragment
// before inserting it. Look for and handle style spans after insertion.
- if (!isLegacyAppleStyleSpan(topNode))
+ if (!isStyleSpan(topNode))
return false;
Node* wrappingStyleSpan = topNode;
@@ -649,7 +647,7 @@
// the top of the fragment, but Mail sometimes adds a wrapper (for Paste As Quotation),
// so search for the top level style span instead of assuming it's at the top.
for (Node* node = m_firstNodeInserted.get(); node; node = node->traverseNextNode()) {
- if (isLegacyAppleStyleSpan(node)) {
+ if (isStyleSpan(node)) {
wrappingStyleSpan = toHTMLElement(node);
break;
}
@@ -993,7 +991,7 @@
fragment.removeNode(refNode);
Node* blockStart = enclosingBlock(insertionPos.deprecatedNode());
- if ((isListElement(refNode.get()) || (isLegacyAppleStyleSpan(refNode.get()) && isListElement(refNode->firstChild())))
+ if ((isListElement(refNode.get()) || (isStyleSpan(refNode.get()) && isListElement(refNode->firstChild())))
&& blockStart && blockStart->renderer()->isListItem())
refNode = insertAsListItems(refNode, blockStart, insertionPos);
else
« no previous file with comments | « Source/WebCore/editing/EditingStyle.cpp ('k') | Source/WebCore/editing/markup.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698