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

Side by Side Diff: third_party/WebKit/Source/core/css/parser/CSSVariableParser.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/parser/CSSVariableParser.h" 5 #include "core/css/parser/CSSVariableParser.h"
6 6
7 #include "core/css/CSSCustomPropertyDeclaration.h" 7 #include "core/css/CSSCustomPropertyDeclaration.h"
8 #include "core/css/parser/CSSParserTokenRange.h" 8 #include "core/css/parser/CSSParserTokenRange.h"
9 #include "core/css/parser/CSSParserValues.h" 9 #include "core/css/parser/CSSParserValues.h"
10 10
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 return CSSValueInvalid; 102 return CSSValueInvalid;
103 } 103 }
104 104
105 bool CSSVariableParser::containsValidVariableReferences(CSSParserTokenRange rang e) 105 bool CSSVariableParser::containsValidVariableReferences(CSSParserTokenRange rang e)
106 { 106 {
107 bool hasReferences; 107 bool hasReferences;
108 CSSValueID type = classifyVariableRange(range, hasReferences); 108 CSSValueID type = classifyVariableRange(range, hasReferences);
109 return type == CSSValueInternalVariableValue && hasReferences; 109 return type == CSSValueInternalVariableValue && hasReferences;
110 } 110 }
111 111
112 PassRefPtrWillBeRawPtr<CSSCustomPropertyDeclaration> CSSVariableParser::parseDec larationValue(const AtomicString& variableName, CSSParserTokenRange range) 112 RawPtr<CSSCustomPropertyDeclaration> CSSVariableParser::parseDeclarationValue(co nst AtomicString& variableName, CSSParserTokenRange range)
113 { 113 {
114 if (range.atEnd()) 114 if (range.atEnd())
115 return nullptr; 115 return nullptr;
116 116
117 bool hasReferences; 117 bool hasReferences;
118 CSSValueID type = classifyVariableRange(range, hasReferences); 118 CSSValueID type = classifyVariableRange(range, hasReferences);
119 119
120 if (type == CSSValueInvalid) 120 if (type == CSSValueInvalid)
121 return nullptr; 121 return nullptr;
122 if (type == CSSValueInternalVariableValue) 122 if (type == CSSValueInternalVariableValue)
123 return CSSCustomPropertyDeclaration::create(variableName, CSSVariableDat a::create(range, hasReferences)); 123 return CSSCustomPropertyDeclaration::create(variableName, CSSVariableDat a::create(range, hasReferences));
124 return CSSCustomPropertyDeclaration::create(variableName, type); 124 return CSSCustomPropertyDeclaration::create(variableName, type);
125 } 125 }
126 126
127 } // namespace blink 127 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698