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

Side by Side Diff: third_party/WebKit/Source/core/css/parser/CSSVariableParser.cpp

Issue 1858753003: Remove RawPtr from core/css (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 } 115 }
116 116
117 bool CSSVariableParser::containsValidVariableReferences(CSSParserTokenRange rang e) 117 bool CSSVariableParser::containsValidVariableReferences(CSSParserTokenRange rang e)
118 { 118 {
119 bool hasReferences; 119 bool hasReferences;
120 bool hasAtApplyRule; 120 bool hasAtApplyRule;
121 CSSValueID type = classifyVariableRange(range, hasReferences, hasAtApplyRule ); 121 CSSValueID type = classifyVariableRange(range, hasReferences, hasAtApplyRule );
122 return type == CSSValueInternalVariableValue && hasReferences && !hasAtApply Rule; 122 return type == CSSValueInternalVariableValue && hasReferences && !hasAtApply Rule;
123 } 123 }
124 124
125 RawPtr<CSSCustomPropertyDeclaration> CSSVariableParser::parseDeclarationValue(co nst AtomicString& variableName, CSSParserTokenRange range) 125 CSSCustomPropertyDeclaration* CSSVariableParser::parseDeclarationValue(const Ato micString& variableName, CSSParserTokenRange range)
126 { 126 {
127 if (range.atEnd()) 127 if (range.atEnd())
128 return nullptr; 128 return nullptr;
129 129
130 bool hasReferences; 130 bool hasReferences;
131 bool hasAtApplyRule; 131 bool hasAtApplyRule;
132 CSSValueID type = classifyVariableRange(range, hasReferences, hasAtApplyRule ); 132 CSSValueID type = classifyVariableRange(range, hasReferences, hasAtApplyRule );
133 133
134 if (type == CSSValueInvalid) 134 if (type == CSSValueInvalid)
135 return nullptr; 135 return nullptr;
136 if (type == CSSValueInternalVariableValue) 136 if (type == CSSValueInternalVariableValue)
137 return CSSCustomPropertyDeclaration::create(variableName, CSSVariableDat a::create(range, hasReferences || hasAtApplyRule)); 137 return CSSCustomPropertyDeclaration::create(variableName, CSSVariableDat a::create(range, hasReferences || hasAtApplyRule));
138 return CSSCustomPropertyDeclaration::create(variableName, type); 138 return CSSCustomPropertyDeclaration::create(variableName, type);
139 } 139 }
140 140
141 } // namespace blink 141 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698