| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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/CSSStringValue.h" | 5 #include "core/css/CSSStringValue.h" |
| 6 | 6 |
| 7 #include "core/css/CSSMarkup.h" | 7 #include "core/css/CSSMarkup.h" |
| 8 #include "core/css/serializer/CSSDeserializeStream.h" |
| 9 #include "core/css/serializer/CSSSerializeStream.h" |
| 8 #include "wtf/text/WTFString.h" | 10 #include "wtf/text/WTFString.h" |
| 9 | 11 |
| 10 namespace blink { | 12 namespace blink { |
| 11 | 13 |
| 12 CSSStringValue::CSSStringValue(const String& str) | 14 CSSStringValue::CSSStringValue(const String& str) |
| 13 : CSSValue(StringClass) | 15 : CSSValue(StringClass) |
| 14 , m_string(str) { } | 16 , m_string(str) { } |
| 15 | 17 |
| 18 PassRefPtrWillBeRawPtr<CSSStringValue> CSSStringValue::deserializeAfterDispatch(
CSSDeserializeStream* stream) |
| 19 { |
| 20 String string = stream->readString(); |
| 21 return CSSStringValue::create(string); |
| 22 } |
| 23 |
| 16 String CSSStringValue::customCSSText() const | 24 String CSSStringValue::customCSSText() const |
| 17 { | 25 { |
| 18 return serializeString(m_string); | 26 return serializeString(m_string); |
| 19 } | 27 } |
| 20 | 28 |
| 29 void CSSStringValue::serializeAfterDispatch(CSSSerializeStream* stream) const |
| 30 { |
| 31 stream->writeString(m_string); |
| 32 } |
| 33 |
| 21 DEFINE_TRACE_AFTER_DISPATCH(CSSStringValue) | 34 DEFINE_TRACE_AFTER_DISPATCH(CSSStringValue) |
| 22 { | 35 { |
| 23 CSSValue::traceAfterDispatch(visitor); | 36 CSSValue::traceAfterDispatch(visitor); |
| 24 } | 37 } |
| 25 | 38 |
| 26 } // namespace blink | 39 } // namespace blink |
| OLD | NEW |