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

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

Issue 2017053003: Remove StringBuilder::appendLiteral. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase. 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/css/CSSPaintValue.h" 5 #include "core/css/CSSPaintValue.h"
6 6
7 #include "core/css/CSSCustomIdentValue.h" 7 #include "core/css/CSSCustomIdentValue.h"
8 #include "core/layout/LayoutObject.h" 8 #include "core/layout/LayoutObject.h"
9 #include "platform/graphics/Image.h" 9 #include "platform/graphics/Image.h"
10 #include "wtf/text/StringBuilder.h" 10 #include "wtf/text/StringBuilder.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 CSSPaintValue::CSSPaintValue(CSSCustomIdentValue* name) 14 CSSPaintValue::CSSPaintValue(CSSCustomIdentValue* name)
15 : CSSImageGeneratorValue(PaintClass) 15 : CSSImageGeneratorValue(PaintClass)
16 , m_name(name) 16 , m_name(name)
17 , m_paintImageGeneratorObserver(new Observer(this)) 17 , m_paintImageGeneratorObserver(new Observer(this))
18 { 18 {
19 } 19 }
20 20
21 CSSPaintValue::~CSSPaintValue() 21 CSSPaintValue::~CSSPaintValue()
22 { 22 {
23 } 23 }
24 24
25 String CSSPaintValue::customCSSText() const 25 String CSSPaintValue::customCSSText() const
26 { 26 {
27 StringBuilder result; 27 StringBuilder result;
28 result.appendLiteral("paint("); 28 result.append("paint(");
29 result.append(m_name->customCSSText()); 29 result.append(m_name->customCSSText());
30 result.append(')'); 30 result.append(')');
31 return result.toString(); 31 return result.toString();
32 } 32 }
33 33
34 String CSSPaintValue::name() const 34 String CSSPaintValue::name() const
35 { 35 {
36 return m_name->value(); 36 return m_name->value();
37 } 37 }
38 38
(...skipping 24 matching lines...) Expand all
63 63
64 DEFINE_TRACE_AFTER_DISPATCH(CSSPaintValue) 64 DEFINE_TRACE_AFTER_DISPATCH(CSSPaintValue)
65 { 65 {
66 visitor->trace(m_name); 66 visitor->trace(m_name);
67 visitor->trace(m_generator); 67 visitor->trace(m_generator);
68 visitor->trace(m_paintImageGeneratorObserver); 68 visitor->trace(m_paintImageGeneratorObserver);
69 CSSImageGeneratorValue::traceAfterDispatch(visitor); 69 CSSImageGeneratorValue::traceAfterDispatch(visitor);
70 } 70 }
71 71
72 } // namespace blink 72 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSPageRule.cpp ('k') | third_party/WebKit/Source/core/css/CSSSelector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698