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

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

Issue 1179133002: Refactoring: Remove the first parameter |result| from StyledMarkupAccumulator::appendStartMarkup (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Bug fix: miss to call pushMarkup 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 ffde0af9d68036eb8bfc89cf800c456c47bd84e2..93a3231359e03fa2107557ffb30b0b67b7fe0915 100644
--- a/Source/core/editing/StyledMarkupAccumulator.cpp
+++ b/Source/core/editing/StyledMarkupAccumulator.cpp
@@ -63,7 +63,7 @@ StyledMarkupAccumulator::StyledMarkupAccumulator(EAbsoluteURLs shouldResolveURLs
void StyledMarkupAccumulator::appendStartTag(Node& node)
{
- appendStartMarkup(m_result, node);
+ appendStartMarkup(node);
}
void StyledMarkupAccumulator::appendEndTag(const Element& element)
@@ -71,20 +71,20 @@ void StyledMarkupAccumulator::appendEndTag(const Element& element)
appendEndMarkup(m_result, element);
}
-void StyledMarkupAccumulator::appendStartMarkup(StringBuilder& result, Node& node)
+void StyledMarkupAccumulator::appendStartMarkup(Node& node)
{
switch (node.nodeType()) {
case Node::TEXT_NODE:
- appendText(toText(node));
+ appendText(m_result, toText(node));
break;
case Node::ELEMENT_NODE: {
Element& element = toElement(node);
RefPtrWillBeRawPtr<EditingStyle> style = createInlineStyle(element);
- appendElement(element, style);
+ appendElementWithInlineStyle(m_result, element, style);
yosin_UTC9 2015/06/12 07:58:04 Since |appendElement()| checks |element.isHTMLElem
break;
}
default:
- m_formatter.appendStartMarkup(result, node, nullptr);
+ m_formatter.appendStartMarkup(m_result, node, nullptr);
break;
}
}
@@ -94,11 +94,6 @@ void StyledMarkupAccumulator::appendEndMarkup(StringBuilder& result, const Eleme
m_formatter.appendEndMarkup(result, element);
}
-void StyledMarkupAccumulator::appendText(Text& text)
-{
- appendText(m_result, text);
-}
-
void StyledMarkupAccumulator::appendText(StringBuilder& out, Text& text)
{
const bool parentIsTextarea = text.parentElement() && text.parentElement()->tagQName() == textareaTag;

Powered by Google App Engine
This is Rietveld 408576698