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

Side by Side Diff: Source/core/css/CSSMediaRule.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/CSSKeyframesRule.cpp ('k') | Source/core/css/CSSPropertySourceData.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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) 3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2002, 2005, 2006, 2012 Apple Computer, Inc. 4 * Copyright (C) 2002, 2005, 2006, 2012 Apple Computer, Inc.
5 * Copyright (C) 2006 Samuel Weinig (sam@webkit.org) 5 * Copyright (C) 2006 Samuel Weinig (sam@webkit.org)
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 43
44 MediaQuerySet* CSSMediaRule::mediaQueries() const 44 MediaQuerySet* CSSMediaRule::mediaQueries() const
45 { 45 {
46 return toStyleRuleMedia(m_groupRule.get())->mediaQueries(); 46 return toStyleRuleMedia(m_groupRule.get())->mediaQueries();
47 } 47 }
48 48
49 String CSSMediaRule::cssText() const 49 String CSSMediaRule::cssText() const
50 { 50 {
51 StringBuilder result; 51 StringBuilder result;
52 result.append("@media "); 52 result.appendLiteral("@media ");
53 if (mediaQueries()) { 53 if (mediaQueries()) {
54 result.append(mediaQueries()->mediaText()); 54 result.append(mediaQueries()->mediaText());
55 result.append(' '); 55 result.append(' ');
56 } 56 }
57 result.appendLiteral("{ \n"); 57 result.appendLiteral("{ \n");
58 appendCSSTextForItems(result); 58 appendCSSTextForItems(result);
59 result.append('}'); 59 result.append('}');
60 return result.toString(); 60 return result.toString();
61 } 61 }
62 62
(...skipping 12 matching lines...) Expand all
75 if (m_mediaCSSOMWrapper && mediaQueries()) 75 if (m_mediaCSSOMWrapper && mediaQueries())
76 m_mediaCSSOMWrapper->reattach(mediaQueries()); 76 m_mediaCSSOMWrapper->reattach(mediaQueries());
77 } 77 }
78 78
79 void CSSMediaRule::trace(Visitor* visitor) 79 void CSSMediaRule::trace(Visitor* visitor)
80 { 80 {
81 visitor->trace(m_mediaCSSOMWrapper); 81 visitor->trace(m_mediaCSSOMWrapper);
82 CSSGroupingRule::trace(visitor); 82 CSSGroupingRule::trace(visitor);
83 } 83 }
84 } // namespace blink 84 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/CSSKeyframesRule.cpp ('k') | Source/core/css/CSSPropertySourceData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698