| 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/cssom/KeywordValue.h" | 5 #include "core/css/cssom/KeywordValue.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
| 8 #include "core/css/CSSCustomIdentValue.h" | 8 #include "core/css/CSSCustomIdentValue.h" |
| 9 #include "core/css/parser/CSSParserString.h" | 9 #include "core/css/parser/CSSParserString.h" |
| 10 #include "core/css/parser/CSSPropertyParser.h" | 10 #include "core/css/parser/CSSPropertyParser.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 return m_keywordValue; | 25 return m_keywordValue; |
| 26 } | 26 } |
| 27 | 27 |
| 28 CSSValueID KeywordValue::keywordValueID() const | 28 CSSValueID KeywordValue::keywordValueID() const |
| 29 { | 29 { |
| 30 CSSParserString cssKeywordString; | 30 CSSParserString cssKeywordString; |
| 31 cssKeywordString.init(m_keywordValue); | 31 cssKeywordString.init(m_keywordValue); |
| 32 return cssValueKeywordID(cssKeywordString); | 32 return cssValueKeywordID(cssKeywordString); |
| 33 } | 33 } |
| 34 | 34 |
| 35 RawPtr<CSSValue> KeywordValue::toCSSValue() const | 35 CSSValue* KeywordValue::toCSSValue() const |
| 36 { | 36 { |
| 37 CSSValueID keywordID = keywordValueID(); | 37 CSSValueID keywordID = keywordValueID(); |
| 38 if (keywordID == CSSValueID::CSSValueInvalid) { | 38 if (keywordID == CSSValueID::CSSValueInvalid) { |
| 39 return CSSCustomIdentValue::create(m_keywordValue); | 39 return CSSCustomIdentValue::create(m_keywordValue); |
| 40 } | 40 } |
| 41 return cssValuePool().createIdentifierValue(keywordID); | 41 return cssValuePool().createIdentifierValue(keywordID); |
| 42 } | 42 } |
| 43 | 43 |
| 44 } // namespace blink | 44 } // namespace blink |
| OLD | NEW |