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

Side by Side Diff: Source/core/css/CSSComputedStyleDeclaration.cpp

Issue 482753002: Use StringBuilder::appendLiteral() / StringBuilder::append(char) when possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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
« no previous file with comments | « Source/core/css/CSSCalculationValue.cpp ('k') | Source/core/css/CSSFilterValue.cpp » ('j') | 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 Zack Rusin <zack@kde.org> 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1154 1154
1155 String CSSComputedStyleDeclaration::cssText() const 1155 String CSSComputedStyleDeclaration::cssText() const
1156 { 1156 {
1157 StringBuilder result; 1157 StringBuilder result;
1158 const Vector<CSSPropertyID>& properties = computableProperties(); 1158 const Vector<CSSPropertyID>& properties = computableProperties();
1159 1159
1160 for (unsigned i = 0; i < properties.size(); i++) { 1160 for (unsigned i = 0; i < properties.size(); i++) {
1161 if (i) 1161 if (i)
1162 result.append(' '); 1162 result.append(' ');
1163 result.append(getPropertyName(properties[i])); 1163 result.append(getPropertyName(properties[i]));
1164 result.append(": ", 2); 1164 result.appendLiteral(": ");
1165 result.append(getPropertyValue(properties[i])); 1165 result.append(getPropertyValue(properties[i]));
1166 result.append(';'); 1166 result.append(';');
1167 } 1167 }
1168 1168
1169 return result.toString(); 1169 return result.toString();
1170 } 1170 }
1171 1171
1172 void CSSComputedStyleDeclaration::setCSSText(const String&, ExceptionState& exce ptionState) 1172 void CSSComputedStyleDeclaration::setCSSText(const String&, ExceptionState& exce ptionState)
1173 { 1173 {
1174 exceptionState.throwDOMException(NoModificationAllowedError, "These styles a re computed, and therefore read-only."); 1174 exceptionState.throwDOMException(NoModificationAllowedError, "These styles a re computed, and therefore read-only.");
(...skipping 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after
3008 return list.release(); 3008 return list.release();
3009 } 3009 }
3010 3010
3011 void CSSComputedStyleDeclaration::trace(Visitor* visitor) 3011 void CSSComputedStyleDeclaration::trace(Visitor* visitor)
3012 { 3012 {
3013 visitor->trace(m_node); 3013 visitor->trace(m_node);
3014 CSSStyleDeclaration::trace(visitor); 3014 CSSStyleDeclaration::trace(visitor);
3015 } 3015 }
3016 3016
3017 } // namespace blink 3017 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/CSSCalculationValue.cpp ('k') | Source/core/css/CSSFilterValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698