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

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

Issue 110723005: Make calls to AtomicString(const String&) explicit in editing/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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 | « no previous file | Source/core/editing/CreateLinkCommand.cpp » ('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 ec1b5f3588c43106e0309c1f71b076cd52786f7e..57d2af6cbbee7f5b36d9df21c71a259428ea1161 100644
--- a/Source/core/editing/ApplyStyleCommand.cpp
+++ b/Source/core/editing/ApplyStyleCommand.cpp
@@ -400,7 +400,7 @@ void ApplyStyleCommand::applyRelativeFontStyleChange(EditingStyle* style)
}
if (currentFontSize != desiredFontSize) {
inlineStyle->setProperty(CSSPropertyFontSize, cssValuePool().createValue(desiredFontSize, CSSPrimitiveValue::CSS_PX), false);
- setNodeAttribute(element.get(), styleAttr, inlineStyle->asText());
+ setNodeAttribute(element.get(), styleAttr, AtomicString(inlineStyle->asText()));
Inactive 2013/12/09 22:44:10 It seems several callers of asText() expect an Ato
abarth-chromium 2013/12/12 18:37:51 Hum... I don't have a strong opinion here.
}
if (inlineStyle->isEmpty()) {
removeNodeAttribute(element.get(), styleAttr);
@@ -519,7 +519,7 @@ void ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock(Node* node, Node* unsp
RefPtr<MutableStylePropertySet> inlineStyle = copyStyleOrCreateEmpty(element->inlineStyle());
inlineStyle->setProperty(CSSPropertyUnicodeBidi, CSSValueNormal);
inlineStyle->removeProperty(CSSPropertyDirection);
- setNodeAttribute(element, styleAttr, inlineStyle->asText());
+ setNodeAttribute(element, styleAttr, AtomicString(inlineStyle->asText()));
if (isSpanWithoutAttributesOrUnstyledStyleSpan(element))
removeNodePreservingChildren(element);
}
@@ -766,7 +766,7 @@ void ApplyStyleCommand::applyInlineStyleToNodeRange(EditingStyle* style, PassRef
continue;
RefPtr<MutableStylePropertySet> inlineStyle = copyStyleOrCreateEmpty(element->inlineStyle());
inlineStyle->mergeAndOverrideOnConflict(style->style());
- setNodeAttribute(element, styleAttr, inlineStyle->asText());
+ setNodeAttribute(element, styleAttr, AtomicString(inlineStyle->asText()));
continue;
}
@@ -1005,7 +1005,7 @@ void ApplyStyleCommand::applyInlineStyleToPushDown(Node* node, EditingStyle* sty
// Since addInlineStyleIfNeeded can't add styles to block-flow render objects, add style attribute instead.
// FIXME: applyInlineStyleToRange should be used here instead.
if ((node->renderer()->isRenderBlockFlow() || node->childNodeCount()) && node->isHTMLElement()) {
- setNodeAttribute(toHTMLElement(node), styleAttr, newInlineStyle->style()->asText());
+ setNodeAttribute(toHTMLElement(node), styleAttr, AtomicString(newInlineStyle->style()->asText()));
return;
}
@@ -1387,7 +1387,7 @@ void ApplyStyleCommand::addBlockStyle(const StyleChange& styleChange, HTMLElemen
cssText.append(' ');
cssText.append(decl->asText());
}
- setNodeAttribute(block, styleAttr, cssText.toString());
+ setNodeAttribute(block, styleAttr, cssText.toAtomicString());
}
void ApplyStyleCommand::addInlineStyleIfNeeded(EditingStyle* style, PassRefPtr<Node> passedStart, PassRefPtr<Node> passedEnd, EAddStyledElement addStyledElement)
« no previous file with comments | « no previous file | Source/core/editing/CreateLinkCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698