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

Unified Diff: Source/core/editing/ApplyStyleCommand.cpp

Issue 423413005: Use tighter typing in editing: ReplaceSelectionCommand (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Wrap lines Created 6 years, 4 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/core/editing/ApplyStyleCommand.h ('k') | Source/core/editing/CompositeEditCommand.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/ApplyStyleCommand.cpp
diff --git a/Source/core/editing/ApplyStyleCommand.cpp b/Source/core/editing/ApplyStyleCommand.cpp
index 388e6870c2bae4a3d75fb9365102ba4f03ba95a4..d85ecf489f3bbf09b591dfc237b91521935a775f 100644
--- a/Source/core/editing/ApplyStyleCommand.cpp
+++ b/Source/core/editing/ApplyStyleCommand.cpp
@@ -62,7 +62,7 @@ static String& styleSpanClassString()
return styleSpanClassString;
}
-bool isLegacyAppleStyleSpan(const Node* node)
+bool isLegacyAppleHTMLSpanElement(const Node* node)
{
if (!isHTMLSpanElement(node))
return false;
@@ -420,7 +420,7 @@ void ApplyStyleCommand::applyRelativeFontStyleChange(EditingStyle* style)
setNodeAttribute(element.get(), styleAttr, AtomicString(inlineStyle->asText()));
}
if (inlineStyle->isEmpty()) {
- removeNodeAttribute(element.get(), styleAttr);
+ removeElementAttribute(element.get(), styleAttr);
if (isSpanWithoutAttributesOrUnstyledStyleSpan(element.get()))
unstyledSpans.append(element.release());
}
@@ -529,7 +529,7 @@ void ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock(Node* node, HTMLElemen
if (element->hasAttribute(dirAttr)) {
// FIXME: If this is a BDO element, we should probably just remove it if it has no
// other attributes, like we (should) do with B and I elements.
- removeNodeAttribute(element, dirAttr);
+ removeElementAttribute(element, dirAttr);
} else {
RefPtrWillBeRawPtr<MutableStylePropertySet> inlineStyle = copyStyleOrCreateEmpty(element->inlineStyle());
inlineStyle->setProperty(CSSPropertyUnicodeBidi, CSSValueNormal);
@@ -966,7 +966,7 @@ bool ApplyStyleCommand::removeImplicitlyStyledElement(EditingStyle* style, HTMLE
return false;
for (size_t i = 0; i < attributes.size(); i++)
- removeNodeAttribute(element, attributes[i]);
+ removeElementAttribute(element, attributes[i]);
if (isEmptyFontTag(element) || isSpanWithoutAttributesOrUnstyledStyleSpan(element))
removeNodePreservingChildren(element);
« no previous file with comments | « Source/core/editing/ApplyStyleCommand.h ('k') | Source/core/editing/CompositeEditCommand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698