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

Side by Side Diff: Source/core/editing/MarkupAccumulator.cpp

Issue 111443014: Use default argument value instead of overloading for MarkupAccumulator::serializeNodes() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@dom_WATCHLIST
Patch Set: Created 6 years, 11 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
« no previous file with comments | « Source/core/editing/MarkupAccumulator.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. 3 * Copyright (C) 2009, 2010 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 : m_nodes(nodes) 104 : m_nodes(nodes)
105 , m_range(range) 105 , m_range(range)
106 , m_resolveURLsMethod(resolveUrlsMethod) 106 , m_resolveURLsMethod(resolveUrlsMethod)
107 { 107 {
108 } 108 }
109 109
110 MarkupAccumulator::~MarkupAccumulator() 110 MarkupAccumulator::~MarkupAccumulator()
111 { 111 {
112 } 112 }
113 113
114 String MarkupAccumulator::serializeNodes(Node* targetNode, EChildrenOnly childre nOnly)
115 {
116 return serializeNodes(targetNode, childrenOnly, 0);
117 }
118
119 String MarkupAccumulator::serializeNodes(Node* targetNode, EChildrenOnly childre nOnly, Vector<QualifiedName>* tagNamesToSkip) 114 String MarkupAccumulator::serializeNodes(Node* targetNode, EChildrenOnly childre nOnly, Vector<QualifiedName>* tagNamesToSkip)
120 { 115 {
121 serializeNodesWithNamespaces(targetNode, childrenOnly, 0, tagNamesToSkip); 116 serializeNodesWithNamespaces(targetNode, childrenOnly, 0, tagNamesToSkip);
122 return m_markup.toString(); 117 return m_markup.toString();
123 } 118 }
124 119
125 void MarkupAccumulator::serializeNodesWithNamespaces(Node* targetNode, EChildren Only childrenOnly, const Namespaces* namespaces, Vector<QualifiedName>* tagNames ToSkip) 120 void MarkupAccumulator::serializeNodesWithNamespaces(Node* targetNode, EChildren Only childrenOnly, const Namespaces* namespaces, Vector<QualifiedName>* tagNames ToSkip)
126 { 121 {
127 if (tagNamesToSkip) { 122 if (tagNamesToSkip) {
128 for (size_t i = 0; i < tagNamesToSkip->size(); ++i) { 123 for (size_t i = 0; i < tagNamesToSkip->size(); ++i) {
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 if (!node->isElementNode() || shouldSelfClose(node) || (!node->hasChildNodes () && elementCannotHaveEndTag(node))) 543 if (!node->isElementNode() || shouldSelfClose(node) || (!node->hasChildNodes () && elementCannotHaveEndTag(node)))
549 return; 544 return;
550 545
551 result.append('<'); 546 result.append('<');
552 result.append('/'); 547 result.append('/');
553 result.append(toElement(node)->nodeNamePreservingCase()); 548 result.append(toElement(node)->nodeNamePreservingCase());
554 result.append('>'); 549 result.append('>');
555 } 550 }
556 551
557 } 552 }
OLDNEW
« no previous file with comments | « Source/core/editing/MarkupAccumulator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698