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: Source/core/css/parser/CSSPropertyParser.cpp

Issue 1293793007: Unprefix min-content, max-content, fit-content (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review comment Created 5 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/CSSValueKeywords.in ('k') | Source/core/css/resolver/StyleBuilderConverter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. 8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
9 * Copyright (C) 2012 Intel Corporation. All rights reserved. 9 * Copyright (C) 2012 Intel Corporation. All rights reserved.
10 * 10 *
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 || id == CSSValueWebkitRepeatingLinearGradient 362 || id == CSSValueWebkitRepeatingLinearGradient
363 || id == CSSValueWebkitRepeatingRadialGradient 363 || id == CSSValueWebkitRepeatingRadialGradient
364 || id == CSSValueWebkitGradient 364 || id == CSSValueWebkitGradient
365 || id == CSSValueWebkitCanvas 365 || id == CSSValueWebkitCanvas
366 || id == CSSValueWebkitCrossFade; 366 || id == CSSValueWebkitCrossFade;
367 } 367 }
368 368
369 bool CSSPropertyParser::validWidthOrHeight(CSSParserValue* value, Units unitless ) 369 bool CSSPropertyParser::validWidthOrHeight(CSSParserValue* value, Units unitless )
370 { 370 {
371 int id = value->id; 371 int id = value->id;
372 if (id == CSSValueIntrinsic || id == CSSValueMinIntrinsic || id == CSSValueW ebkitMinContent || id == CSSValueWebkitMaxContent || id == CSSValueWebkitFillAva ilable || id == CSSValueWebkitFitContent) { 372 if (id == CSSValueIntrinsic || id == CSSValueMinIntrinsic
373 || id == CSSValueWebkitMinContent || id == CSSValueWebkitMaxContent || i d == CSSValueWebkitFillAvailable || id == CSSValueWebkitFitContent
374 || id == CSSValueMinContent || id == CSSValueMaxContent || id == CSSValu eFitContent) {
373 if (m_context.useCounter()) { 375 if (m_context.useCounter()) {
374 switch (value->id) { 376 switch (value->id) {
375 case CSSValueIntrinsic: 377 case CSSValueIntrinsic:
376 m_context.useCounter()->count(UseCounter::LegacyCSSValueIntrinsi c); 378 m_context.useCounter()->count(UseCounter::LegacyCSSValueIntrinsi c);
377 break; 379 break;
378 case CSSValueMinIntrinsic: 380 case CSSValueMinIntrinsic:
379 m_context.useCounter()->count(UseCounter::LegacyCSSValueMinIntri nsic); 381 m_context.useCounter()->count(UseCounter::LegacyCSSValueMinIntri nsic);
380 break; 382 break;
381 case CSSValueWebkitMinContent: 383 case CSSValueWebkitMinContent:
382 m_context.useCounter()->count(UseCounter::CSSValuePrefixedMinCon tent); 384 m_context.useCounter()->count(UseCounter::CSSValuePrefixedMinCon tent);
383 break; 385 break;
384 case CSSValueWebkitMaxContent: 386 case CSSValueWebkitMaxContent:
385 m_context.useCounter()->count(UseCounter::CSSValuePrefixedMaxCon tent); 387 m_context.useCounter()->count(UseCounter::CSSValuePrefixedMaxCon tent);
386 break; 388 break;
387 case CSSValueWebkitFillAvailable: 389 case CSSValueWebkitFillAvailable:
388 m_context.useCounter()->count(UseCounter::CSSValuePrefixedFillAv ailable); 390 m_context.useCounter()->count(UseCounter::CSSValuePrefixedFillAv ailable);
389 break; 391 break;
390 case CSSValueWebkitFitContent: 392 case CSSValueWebkitFitContent:
391 m_context.useCounter()->count(UseCounter::CSSValuePrefixedFitCon tent); 393 m_context.useCounter()->count(UseCounter::CSSValuePrefixedFitCon tent);
392 break; 394 break;
393 default: 395 default:
394 ASSERT_NOT_REACHED(); 396 break;
395 } 397 }
396 } 398 }
397 return true; 399 return true;
398 } 400 }
399 return validUnit(value, FLength | FPercent | FNonNeg | unitless); 401 return validUnit(value, FLength | FPercent | FNonNeg | unitless);
400 } 402 }
401 403
402 inline PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseValidPr imitive(CSSValueID identifier, CSSParserValue* value) 404 inline PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseValidPr imitive(CSSValueID identifier, CSSParserValue* value)
403 { 405 {
404 if (identifier) 406 if (identifier)
(...skipping 7702 matching lines...) Expand 10 before | Expand all | Expand 10 after
8107 } 8109 }
8108 } 8110 }
8109 8111
8110 if (!list->length()) 8112 if (!list->length())
8111 return nullptr; 8113 return nullptr;
8112 8114
8113 return list.release(); 8115 return list.release();
8114 } 8116 }
8115 8117
8116 } // namespace blink 8118 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/CSSValueKeywords.in ('k') | Source/core/css/resolver/StyleBuilderConverter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698