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

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

Issue 1808753002: Make consumeCustomIdent exclude css wide keywords (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add subtests Created 4 years, 9 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
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/CSSPropertyParserHelpers.h" 5 #include "core/css/parser/CSSPropertyParserHelpers.h"
6 6
7 #include "core/css/CSSCalculationValue.h" 7 #include "core/css/CSSCalculationValue.h"
8 #include "core/css/CSSStringValue.h" 8 #include "core/css/CSSStringValue.h"
9 9
10 namespace blink { 10 namespace blink {
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 281
282 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumeIdentRange(CSSParserTokenRange& range, CSSValueID lower, CSSValueID upper) 282 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumeIdentRange(CSSParserTokenRange& range, CSSValueID lower, CSSValueID upper)
283 { 283 {
284 if (range.peek().id() < lower || range.peek().id() > upper) 284 if (range.peek().id() < lower || range.peek().id() > upper)
285 return nullptr; 285 return nullptr;
286 return consumeIdent(range); 286 return consumeIdent(range);
287 } 287 }
288 288
289 PassRefPtrWillBeRawPtr<CSSCustomIdentValue> consumeCustomIdent(CSSParserTokenRan ge& range) 289 PassRefPtrWillBeRawPtr<CSSCustomIdentValue> consumeCustomIdent(CSSParserTokenRan ge& range)
290 { 290 {
291 if (range.peek().type() != IdentToken) 291 if (range.peek().type() != IdentToken || isCSSWideKeyword(range.peek().id()) )
292 return nullptr; 292 return nullptr;
293 return CSSCustomIdentValue::create(range.consumeIncludingWhitespace().value( )); 293 return CSSCustomIdentValue::create(range.consumeIncludingWhitespace().value( ));
294 } 294 }
295 295
296 PassRefPtrWillBeRawPtr<CSSStringValue> consumeString(CSSParserTokenRange& range) 296 PassRefPtrWillBeRawPtr<CSSStringValue> consumeString(CSSParserTokenRange& range)
297 { 297 {
298 if (range.peek().type() != StringToken) 298 if (range.peek().type() != StringToken)
299 return nullptr; 299 return nullptr;
300 return CSSStringValue::create(range.consumeIncludingWhitespace().value()); 300 return CSSStringValue::create(range.consumeIncludingWhitespace().value());
301 } 301 }
(...skipping 16 matching lines...) Expand all
318 range.consumeWhitespace(); 318 range.consumeWhitespace();
319 return next.value(); 319 return next.value();
320 } 320 }
321 321
322 return String(); 322 return String();
323 } 323 }
324 324
325 } // namespace CSSPropertyParserHelpers 325 } // namespace CSSPropertyParserHelpers
326 326
327 } // namespace blink 327 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698