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

Unified Diff: Source/core/editing/StyledMarkupSerializer.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/StyledMarkupSerializer.cpp
diff --git a/Source/core/editing/StyledMarkupSerializer.cpp b/Source/core/editing/StyledMarkupSerializer.cpp
index aba1d8fc7c0dce76e4fb4f464f188a1d845048cd..368abc59dab06add4ea41579b48ffb689817b7f1 100644
--- a/Source/core/editing/StyledMarkupSerializer.cpp
+++ b/Source/core/editing/StyledMarkupSerializer.cpp
@@ -310,11 +310,15 @@ template<typename Strategy>
void StyledMarkupSerializer<Strategy>::wrapWithNode(StyledMarkupAccumulator& accumulator, ContainerNode& node, PassRefPtrWillBeRawPtr<EditingStyle> style)
{
StringBuilder markup;
- if (!node.isElementNode()) {
- accumulator.appendStartMarkup(markup, node);
+ if (node.isDocumentNode()) {
+ MarkupFormatter::appendXMLDeclaration(markup, toDocument(node));
accumulator.pushMarkup(markup.toString());
return;
}
+ if (!node.isElementNode()) {
yosin_UTC9 2015/06/12 07:58:04 nit: We don't need to have curry brace.
hajimehoshi 2015/06/12 08:14:13 Done.
+ return;
+ }
+
yosin_UTC9 2015/06/12 07:58:04 We don't need to have an extra blank line.
hajimehoshi 2015/06/12 08:14:13 Done.
Element& element = toElement(node);
if (accumulator.shouldApplyWrappingStyle(element) || needsInlineStyle(element))
accumulator.appendElementWithInlineStyle(markup, element, style);

Powered by Google App Engine
This is Rietveld 408576698