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

Side by Side 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: yosin's review 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2008, 2009, 2010, 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2008, 2009, 2010, 2011 Google Inc. All rights reserved.
4 * Copyright (C) 2011 Igalia S.L. 4 * Copyright (C) 2011 Igalia S.L.
5 * Copyright (C) 2011 Motorola Mobility. All rights reserved. 5 * Copyright (C) 2011 Motorola Mobility. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 , m_start(start) 56 , m_start(start)
57 , m_end(end) 57 , m_end(end)
58 , m_document(document) 58 , m_document(document)
59 , m_shouldAnnotate(shouldAnnotate) 59 , m_shouldAnnotate(shouldAnnotate)
60 , m_highestNodeToBeSerialized(highestNodeToBeSerialized) 60 , m_highestNodeToBeSerialized(highestNodeToBeSerialized)
61 { 61 {
62 } 62 }
63 63
64 void StyledMarkupAccumulator::appendStartTag(Node& node) 64 void StyledMarkupAccumulator::appendStartTag(Node& node)
65 { 65 {
66 appendStartMarkup(m_result, node); 66 appendStartMarkup(node);
67 } 67 }
68 68
69 void StyledMarkupAccumulator::appendEndTag(const Element& element) 69 void StyledMarkupAccumulator::appendEndTag(const Element& element)
70 { 70 {
71 appendEndMarkup(m_result, element); 71 appendEndMarkup(m_result, element);
72 } 72 }
73 73
74 void StyledMarkupAccumulator::appendStartMarkup(StringBuilder& result, Node& nod e) 74 void StyledMarkupAccumulator::appendStartMarkup(Node& node)
75 { 75 {
76 switch (node.nodeType()) { 76 switch (node.nodeType()) {
77 case Node::TEXT_NODE: 77 case Node::TEXT_NODE:
78 appendText(toText(node)); 78 appendText(toText(node));
79 break; 79 break;
80 case Node::ELEMENT_NODE: { 80 case Node::ELEMENT_NODE: {
81 Element& element = toElement(node); 81 Element& element = toElement(node);
82 RefPtrWillBeRawPtr<EditingStyle> style = createInlineStyle(element); 82 RefPtrWillBeRawPtr<EditingStyle> style = createInlineStyle(element);
83 appendElement(element, style); 83 appendElement(element, style);
84 break; 84 break;
85 } 85 }
86 default: 86 default:
87 m_formatter.appendStartMarkup(result, node, nullptr); 87 m_formatter.appendStartMarkup(m_result, node, nullptr);
88 break; 88 break;
89 } 89 }
90 } 90 }
91 91
92 void StyledMarkupAccumulator::appendEndMarkup(StringBuilder& result, const Eleme nt& element) 92 void StyledMarkupAccumulator::appendEndMarkup(StringBuilder& result, const Eleme nt& element)
93 { 93 {
94 m_formatter.appendEndMarkup(result, element); 94 m_formatter.appendEndMarkup(result, element);
95 } 95 }
96 96
97 void StyledMarkupAccumulator::appendText(Text& text) 97 void StyledMarkupAccumulator::appendText(Text& text)
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 m_reversedPrecedingMarkup.append(str); 275 m_reversedPrecedingMarkup.append(str);
276 } 276 }
277 277
278 void StyledMarkupAccumulator::appendInterchangeNewline() 278 void StyledMarkupAccumulator::appendInterchangeNewline()
279 { 279 {
280 DEFINE_STATIC_LOCAL(const String, interchangeNewlineString, ("<br class=\"" AppleInterchangeNewline "\">")); 280 DEFINE_STATIC_LOCAL(const String, interchangeNewlineString, ("<br class=\"" AppleInterchangeNewline "\">"));
281 m_result.append(interchangeNewlineString); 281 m_result.append(interchangeNewlineString);
282 } 282 }
283 283
284 } // namespace blink 284 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/editing/StyledMarkupAccumulator.h ('k') | Source/core/editing/StyledMarkupSerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698