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

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

Issue 1174873002: Refactoring: Remove StyledMarkupAccumulator::appendString and add appendNewLine (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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: Source/core/editing/StyledMarkupAccumulator.cpp
diff --git a/Source/core/editing/StyledMarkupAccumulator.cpp b/Source/core/editing/StyledMarkupAccumulator.cpp
index 5775f5c23354fd992678c9e8f27b204da0dd16cd..9806cffb54ad3e58eab27fa0ebd197f6149c64d2 100644
--- a/Source/core/editing/StyledMarkupAccumulator.cpp
+++ b/Source/core/editing/StyledMarkupAccumulator.cpp
@@ -50,11 +50,6 @@ StyledMarkupAccumulator::StyledMarkupAccumulator(EAbsoluteURLs shouldResolveURLs
{
}
-void StyledMarkupAccumulator::appendString(const String& str)
-{
- m_result.append(str);
-}
-
void StyledMarkupAccumulator::appendStartTag(Node& node)
{
appendStartMarkup(m_result, node);
@@ -215,7 +210,7 @@ void StyledMarkupAccumulator::wrapWithStyleNode(StylePropertySet* style)
openTag.appendLiteral("\">");
m_reversedPrecedingMarkup.append(openTag.toString());
- appendString("</div>");
+ m_result.append("</div>");
}
String StyledMarkupAccumulator::takeResults()
@@ -268,4 +263,12 @@ bool StyledMarkupAccumulator::shouldAnnotate() const
return m_shouldAnnotate == AnnotateForInterchange;
}
+void StyledMarkupAccumulator::appendNewLine()
yosin_UTC9 2015/06/10 07:06:33 s/NewLine/newline/ as "interchange Newline String"
hajimehoshi 2015/06/10 07:16:30 Done.
+{
+ // TODO(hajimehoshi): This is copied from
+ // StyledMarkupSerialize::createMarkup. Unify them.
+ DEFINE_STATIC_LOCAL(const String, interchangeNewlineString, ("<br class=\"" AppleInterchangeNewline "\">"));
+ m_result.append(interchangeNewlineString);
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698