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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSImportRule.cpp

Issue 2017303002: Revert of Remove StringBuilder::appendLiteral. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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, 2008, 2009, 2010, 2012 Apple Inc. All rights reserved. 4 * Copyright (C) 2002, 2005, 2006, 2008, 2009, 2010, 2012 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 MediaList* CSSImportRule::media() const 47 MediaList* CSSImportRule::media() const
48 { 48 {
49 if (!m_mediaCSSOMWrapper) 49 if (!m_mediaCSSOMWrapper)
50 m_mediaCSSOMWrapper = MediaList::create(m_importRule->mediaQueries(), co nst_cast<CSSImportRule*>(this)); 50 m_mediaCSSOMWrapper = MediaList::create(m_importRule->mediaQueries(), co nst_cast<CSSImportRule*>(this));
51 return m_mediaCSSOMWrapper.get(); 51 return m_mediaCSSOMWrapper.get();
52 } 52 }
53 53
54 String CSSImportRule::cssText() const 54 String CSSImportRule::cssText() const
55 { 55 {
56 StringBuilder result; 56 StringBuilder result;
57 result.append("@import url(\""); 57 result.appendLiteral("@import url(\"");
58 result.append(m_importRule->href()); 58 result.append(m_importRule->href());
59 result.append("\")"); 59 result.appendLiteral("\")");
60 60
61 if (m_importRule->mediaQueries()) { 61 if (m_importRule->mediaQueries()) {
62 String mediaText = m_importRule->mediaQueries()->mediaText(); 62 String mediaText = m_importRule->mediaQueries()->mediaText();
63 if (!mediaText.isEmpty()) { 63 if (!mediaText.isEmpty()) {
64 result.append(' '); 64 result.append(' ');
65 result.append(mediaText); 65 result.append(mediaText);
66 } 66 }
67 } 67 }
68 result.append(';'); 68 result.append(';');
69 69
(...skipping 20 matching lines...) Expand all
90 90
91 DEFINE_TRACE(CSSImportRule) 91 DEFINE_TRACE(CSSImportRule)
92 { 92 {
93 visitor->trace(m_importRule); 93 visitor->trace(m_importRule);
94 visitor->trace(m_mediaCSSOMWrapper); 94 visitor->trace(m_mediaCSSOMWrapper);
95 visitor->trace(m_styleSheetCSSOMWrapper); 95 visitor->trace(m_styleSheetCSSOMWrapper);
96 CSSRule::trace(visitor); 96 CSSRule::trace(visitor);
97 } 97 }
98 98
99 } // namespace blink 99 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSImageSetValue.cpp ('k') | third_party/WebKit/Source/core/css/CSSKeyframesRule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698