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 |