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

Side by Side Diff: Source/core/css/parser/BisonCSSParser-in.cpp

Issue 131773002: Broaden justify-self's parsing name (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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/parser/BisonCSSParser.h ('k') | Source/core/rendering/style/RenderStyle.h » ('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 2417 matching lines...) Expand 10 before | Expand all | Expand 10 after
2428 addPropertyWithPrefixingVariant(propId, val.release(), important); 2428 addPropertyWithPrefixingVariant(propId, val.release(), important);
2429 return true; 2429 return true;
2430 } 2430 }
2431 return false; 2431 return false;
2432 } 2432 }
2433 2433
2434 case CSSPropertyJustifySelf: 2434 case CSSPropertyJustifySelf:
2435 if (!RuntimeEnabledFeatures::cssGridLayoutEnabled()) 2435 if (!RuntimeEnabledFeatures::cssGridLayoutEnabled())
2436 return false; 2436 return false;
2437 2437
2438 return parseJustifySelf(propId, important); 2438 return parseItemPositionOverflowPosition(propId, important);
2439 case CSSPropertyGridAutoColumns: 2439 case CSSPropertyGridAutoColumns:
2440 case CSSPropertyGridAutoRows: 2440 case CSSPropertyGridAutoRows:
2441 if (!RuntimeEnabledFeatures::cssGridLayoutEnabled()) 2441 if (!RuntimeEnabledFeatures::cssGridLayoutEnabled())
2442 return false; 2442 return false;
2443 parsedValue = parseGridTrackSize(*m_valueList); 2443 parsedValue = parseGridTrackSize(*m_valueList);
2444 break; 2444 break;
2445 2445
2446 case CSSPropertyGridDefinitionColumns: 2446 case CSSPropertyGridDefinitionColumns:
2447 case CSSPropertyGridDefinitionRows: 2447 case CSSPropertyGridDefinitionRows:
2448 if (!RuntimeEnabledFeatures::cssGridLayoutEnabled()) 2448 if (!RuntimeEnabledFeatures::cssGridLayoutEnabled())
(...skipping 2641 matching lines...) Expand 10 before | Expand all | Expand 10 after
5090 return false; 5090 return false;
5091 } 5091 }
5092 5092
5093 static bool isItemPositionKeyword(CSSValueID id) 5093 static bool isItemPositionKeyword(CSSValueID id)
5094 { 5094 {
5095 return id == CSSValueStart || id == CSSValueEnd || id == CSSValueCenter 5095 return id == CSSValueStart || id == CSSValueEnd || id == CSSValueCenter
5096 || id == CSSValueSelfStart || id == CSSValueSelfEnd || id == CSSValueFle xStart 5096 || id == CSSValueSelfStart || id == CSSValueSelfEnd || id == CSSValueFle xStart
5097 || id == CSSValueFlexEnd || id == CSSValueLeft || id == CSSValueRight; 5097 || id == CSSValueFlexEnd || id == CSSValueLeft || id == CSSValueRight;
5098 } 5098 }
5099 5099
5100 bool BisonCSSParser::parseJustifySelf(CSSPropertyID propId, bool important) 5100 bool BisonCSSParser::parseItemPositionOverflowPosition(CSSPropertyID propId, boo l important)
5101 { 5101 {
5102 // auto | baseline | stretch | [<item-position> && <overflow-position>? ] 5102 // auto | baseline | stretch | [<item-position> && <overflow-position>? ]
5103 // <item-position> = center | start | end | self-start | self-end | flex-sta rt | flex-end | left | right; 5103 // <item-position> = center | start | end | self-start | self-end | flex-sta rt | flex-end | left | right;
5104 // <overflow-position> = true | safe 5104 // <overflow-position> = true | safe
5105 5105
5106 CSSParserValue* value = m_valueList->current(); 5106 CSSParserValue* value = m_valueList->current();
5107 5107
5108 if (value->id == CSSValueAuto || value->id == CSSValueBaseline || value->id == CSSValueStretch) { 5108 if (value->id == CSSValueAuto || value->id == CSSValueBaseline || value->id == CSSValueStretch) {
5109 if (m_valueList->next()) 5109 if (m_valueList->next())
5110 return false; 5110 return false;
(...skipping 5480 matching lines...) Expand 10 before | Expand all | Expand 10 after
10591 { 10591 {
10592 // The tokenizer checks for the construct of an+b. 10592 // The tokenizer checks for the construct of an+b.
10593 // However, since the {ident} rule precedes the {nth} rule, some of those 10593 // However, since the {ident} rule precedes the {nth} rule, some of those
10594 // tokens are identified as string literal. Furthermore we need to accept 10594 // tokens are identified as string literal. Furthermore we need to accept
10595 // "odd" and "even" which does not match to an+b. 10595 // "odd" and "even" which does not match to an+b.
10596 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") 10596 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even")
10597 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); 10597 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n");
10598 } 10598 }
10599 10599
10600 } 10600 }
OLDNEW
« no previous file with comments | « Source/core/css/parser/BisonCSSParser.h ('k') | Source/core/rendering/style/RenderStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698