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

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

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 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"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 KeywordValue* KeywordValue::create(const String& keyword, ExceptionState& except ionState) 14 KeywordValue* KeywordValue::create(const String& keyword, ExceptionState& except ionState)
15 { 15 {
16 if (keyword.isEmpty()) { 16 if (keyword.isEmpty()) {
17 exceptionState.throwTypeError("KeywordValue does not support empty strin gs"); 17 exceptionState.throwTypeError("KeywordValue does not support empty strin gs");
18 return nullptr; 18 return nullptr;
19 } 19 }
20 return new KeywordValue(keyword); 20 return new KeywordValue(keyword);
21 } 21 }
22 22
23 const String& KeywordValue::keywordValue() const 23 const String& KeywordValue::keywordValue() const
24 { 24 {
25 return m_keywordValue; 25 return m_keywordValue;
26 } 26 }
27 27
28 PassRefPtrWillBeRawPtr<CSSValue> KeywordValue::toCSSValue() const 28 RawPtr<CSSValue> KeywordValue::toCSSValue() const
29 { 29 {
30 CSSParserString cssKeywordString; 30 CSSParserString cssKeywordString;
31 cssKeywordString.init(m_keywordValue); 31 cssKeywordString.init(m_keywordValue);
32 CSSValueID keywordID = cssValueKeywordID(cssKeywordString); 32 CSSValueID keywordID = cssValueKeywordID(cssKeywordString);
33 if (keywordID == CSSValueID::CSSValueInvalid) { 33 if (keywordID == CSSValueID::CSSValueInvalid) {
34 return CSSCustomIdentValue::create(m_keywordValue); 34 return CSSCustomIdentValue::create(m_keywordValue);
35 } 35 }
36 return cssValuePool().createIdentifierValue(keywordID); 36 return cssValuePool().createIdentifierValue(keywordID);
37 } 37 }
38 38
39 } // namespace blink 39 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698