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

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

Issue 57493002: Remove 'alphabetic' value from text-underline-position (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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
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 2164 matching lines...) Expand 10 before | Expand all | Expand 10 after
2175 return parseTextDecoration(propId, important); 2175 return parseTextDecoration(propId, important);
2176 2176
2177 case CSSPropertyTextDecorationStyle: 2177 case CSSPropertyTextDecorationStyle:
2178 // solid | double | dotted | dashed | wavy 2178 // solid | double | dotted | dashed | wavy
2179 if (RuntimeEnabledFeatures::css3TextDecorationsEnabled() 2179 if (RuntimeEnabledFeatures::css3TextDecorationsEnabled()
2180 && (id == CSSValueSolid || id == CSSValueDouble || id == CSSValueDot ted || id == CSSValueDashed || id == CSSValueWavy)) 2180 && (id == CSSValueSolid || id == CSSValueDouble || id == CSSValueDot ted || id == CSSValueDashed || id == CSSValueWavy))
2181 validPrimitive = true; 2181 validPrimitive = true;
2182 break; 2182 break;
2183 2183
2184 case CSSPropertyTextUnderlinePosition: 2184 case CSSPropertyTextUnderlinePosition:
2185 // auto | alphabetic | under 2185 // FIXME: Implement support for 'left' and 'right' values.
Julien - ping for review 2013/11/04 16:06:43 This FIXME is too far from the implementation and
abinader 2013/11/04 16:38:02 OK, will remove that.
2186 // auto | under | inherit
2186 if (RuntimeEnabledFeatures::css3TextDecorationsEnabled()) 2187 if (RuntimeEnabledFeatures::css3TextDecorationsEnabled())
2187 return parseTextUnderlinePosition(important); 2188 return parseTextUnderlinePosition(important);
2188 return false; 2189 return false;
2189 2190
2190 case CSSPropertyZoom: // normal | reset | document | <number> | <pe rcentage> | inherit 2191 case CSSPropertyZoom: // normal | reset | document | <number> | <pe rcentage> | inherit
2191 if (id == CSSValueNormal || id == CSSValueReset || id == CSSValueDocumen t) 2192 if (id == CSSValueNormal || id == CSSValueReset || id == CSSValueDocumen t)
2192 validPrimitive = true; 2193 validPrimitive = true;
2193 else 2194 else
2194 validPrimitive = (!id && validUnit(value, FNumber | FPercent | FNonN eg, HTMLStandardMode)); 2195 validPrimitive = (!id && validUnit(value, FNumber | FPercent | FNonN eg, HTMLStandardMode));
2195 break; 2196 break;
(...skipping 6931 matching lines...) Expand 10 before | Expand all | Expand 10 after
9127 if (list->length() && (isValid || inShorthand())) { 9128 if (list->length() && (isValid || inShorthand())) {
9128 addTextDecorationProperty(propId, list.release(), important); 9129 addTextDecorationProperty(propId, list.release(), important);
9129 return true; 9130 return true;
9130 } 9131 }
9131 9132
9132 return false; 9133 return false;
9133 } 9134 }
9134 9135
9135 bool CSSParser::parseTextUnderlinePosition(bool important) 9136 bool CSSParser::parseTextUnderlinePosition(bool important)
9136 { 9137 {
9137 // The text-underline-position property has sintax "auto | alphabetic | [ un der || [ left | right ] ]". 9138 // FIXME: Implement support for 'left' and 'right' values.
9138 // However, values 'left' and 'right' are not implemented yet, so we will pa rse sintax
9139 // "auto | alphabetic | under" for now.
Julien - ping for review 2013/11/04 16:06:43 I would rather keep this comment so that we know w
abinader 2013/11/04 16:38:02 Ack!
9140 CSSParserValue* value = m_valueList->current(); 9139 CSSParserValue* value = m_valueList->current();
9141 switch (value->id) { 9140 switch (value->id) {
9142 case CSSValueAuto: 9141 case CSSValueAuto:
9143 case CSSValueAlphabetic:
9144 case CSSValueUnder: 9142 case CSSValueUnder:
9145 if (m_valueList->next()) 9143 if (m_valueList->next())
9146 return false; 9144 return false;
9147 addProperty(CSSPropertyTextUnderlinePosition, cssValuePool().createIdent ifierValue(value->id), important); 9145 addProperty(CSSPropertyTextUnderlinePosition, cssValuePool().createIdent ifierValue(value->id), important);
9148 return true; 9146 return true;
9149 default: 9147 default:
9150 return false; 9148 return false;
9151 } 9149 }
9152 } 9150 }
9153 9151
(...skipping 2799 matching lines...) Expand 10 before | Expand all | Expand 10 after
11953 { 11951 {
11954 // The tokenizer checks for the construct of an+b. 11952 // The tokenizer checks for the construct of an+b.
11955 // However, since the {ident} rule precedes the {nth} rule, some of those 11953 // However, since the {ident} rule precedes the {nth} rule, some of those
11956 // tokens are identified as string literal. Furthermore we need to accept 11954 // tokens are identified as string literal. Furthermore we need to accept
11957 // "odd" and "even" which does not match to an+b. 11955 // "odd" and "even" which does not match to an+b.
11958 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") 11956 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even")
11959 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); 11957 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n");
11960 } 11958 }
11961 11959
11962 } 11960 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698