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

Side by Side Diff: Source/core/css/parser/CSSPropertyParser.cpp

Issue 1020093004: Add initial/inherit/unset tests to font-family-parse-keyword.html (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add unset Created 5 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 | « LayoutTests/fast/css/font-family-parse-keyword-expected.html ('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 /* 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 3180 matching lines...) Expand 10 before | Expand all | Expand 10 after
3191 } 3191 }
3192 } 3192 }
3193 if ((propId == CSSPropertyTransitionProperty || propId == CSSPropertyWebkitT ransitionProperty) && !isValidTransitionPropertyList(list.get())) 3193 if ((propId == CSSPropertyTransitionProperty || propId == CSSPropertyWebkitT ransitionProperty) && !isValidTransitionPropertyList(list.get()))
3194 return nullptr; 3194 return nullptr;
3195 ASSERT(list->length()); 3195 ASSERT(list->length());
3196 return list.release(); 3196 return list.release();
3197 } 3197 }
3198 3198
3199 static inline bool isCSSWideKeyword(CSSParserValue& value) 3199 static inline bool isCSSWideKeyword(CSSParserValue& value)
3200 { 3200 {
3201 return value.id == CSSValueInitial || value.id == CSSValueInherit || value.i d == CSSValueDefault; 3201 return value.id == CSSValueInitial || value.id == CSSValueInherit || value.i d == CSSValueUnset || value.id == CSSValueDefault;
3202 } 3202 }
3203 3203
3204 static inline bool isValidCustomIdentForGridPositions(CSSParserValue& value) 3204 static inline bool isValidCustomIdentForGridPositions(CSSParserValue& value)
3205 { 3205 {
3206 // FIXME: we need a more general solution for <custom-ident> in all properti es. 3206 // FIXME: we need a more general solution for <custom-ident> in all properti es.
3207 return value.unit == CSSPrimitiveValue::CSS_IDENT && value.id != CSSValueSpa n && value.id != CSSValueAuto && !isCSSWideKeyword(value); 3207 return value.unit == CSSPrimitiveValue::CSS_IDENT && value.id != CSSValueSpa n && value.id != CSSValueAuto && !isCSSWideKeyword(value);
3208 } 3208 }
3209 3209
3210 // The function parses [ <integer> || <custom-ident> ] in <grid-line> (which can be stand alone or with 'span'). 3210 // The function parses [ <integer> || <custom-ident> ] in <grid-line> (which can be stand alone or with 'span').
3211 bool CSSPropertyParser::parseIntegerOrCustomIdentFromGridPosition(RefPtrWillBeRa wPtr<CSSPrimitiveValue>& numericValue, RefPtrWillBeRawPtr<CSSPrimitiveValue>& gr idLineName) 3211 bool CSSPropertyParser::parseIntegerOrCustomIdentFromGridPosition(RefPtrWillBeRa wPtr<CSSPrimitiveValue>& numericValue, RefPtrWillBeRawPtr<CSSPrimitiveValue>& gr idLineName)
(...skipping 5278 matching lines...) Expand 10 before | Expand all | Expand 10 after
8490 } 8490 }
8491 } 8491 }
8492 8492
8493 if (!list->length()) 8493 if (!list->length())
8494 return nullptr; 8494 return nullptr;
8495 8495
8496 return list.release(); 8496 return list.release();
8497 } 8497 }
8498 8498
8499 } // namespace blink 8499 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/fast/css/font-family-parse-keyword-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698