OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "config.h" |
| 6 #include "core/css/CSSStringValue.h" |
| 7 |
| 8 #include "core/css/CSSMarkup.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 CSSStringValue::~CSSStringValue() |
| 13 { |
| 14 if (m_string) |
| 15 m_string->deref(); |
| 16 } |
| 17 |
| 18 String CSSStringValue::customCSSText() const |
| 19 { |
| 20 switch (m_serializationType) { |
| 21 case SerializeAsString: |
| 22 return serializeString(m_string); |
| 23 case SerializeAsCustomIdentifier: |
| 24 return quoteCSSStringIfNeeded(m_string); |
| 25 case SerializeAsURI: |
| 26 return "url(" + quoteCSSURLIfNeeded(m_string) + ")"; |
| 27 } |
| 28 ASSERT_NOT_REACHED(); |
| 29 return String(); |
| 30 } |
| 31 |
| 32 DEFINE_TRACE_AFTER_DISPATCH(CSSStringValue) |
| 33 { |
| 34 CSSValue::traceAfterDispatch(visitor); |
| 35 } |
| 36 |
| 37 } |
OLD | NEW |