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

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

Issue 22405003: Revert "[css3-text] Implement text-decoration property shorthand" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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/CSSComputedStyleDeclaration.cpp ('k') | Source/core/css/CSSShorthands.in » ('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 2095 matching lines...) Expand 10 before | Expand all | Expand 10 after
2106 validPrimitive = true; 2106 validPrimitive = true;
2107 break; 2107 break;
2108 case CSSPropertyFontFamily: 2108 case CSSPropertyFontFamily:
2109 // [[ <family-name> | <generic-family> ],]* [<family-name> | <generic-fa mily>] | inherit 2109 // [[ <family-name> | <generic-family> ],]* [<family-name> | <generic-fa mily>] | inherit
2110 { 2110 {
2111 parsedValue = parseFontFamily(); 2111 parsedValue = parseFontFamily();
2112 break; 2112 break;
2113 } 2113 }
2114 2114
2115 case CSSPropertyTextDecoration: 2115 case CSSPropertyTextDecoration:
2116 // Fall through 'text-decoration-line' parsing if CSS 3 Text Decoration
2117 // is disabled to match CSS 2.1 rules for parsing 'text-decoration'.
2118 if (RuntimeEnabledFeatures::css3TextDecorationsEnabled()) {
2119 // [ <text-decoration-line> || <text-decoration-style> || <text-deco ration-color> ] | inherit
2120 return parseShorthand(CSSPropertyTextDecoration, textDecorationShort hand(), important);
2121 }
2122 case CSSPropertyWebkitTextDecorationsInEffect: 2116 case CSSPropertyWebkitTextDecorationsInEffect:
2123 case CSSPropertyTextDecorationLine: 2117 case CSSPropertyTextDecorationLine:
2124 // none | [ underline || overline || line-through || blink ] | inherit 2118 // none | [ underline || overline || line-through || blink ] | inherit
2125 return parseTextDecoration(propId, important); 2119 return parseTextDecoration(propId, important);
2126 2120
2127 case CSSPropertyTextDecorationStyle: 2121 case CSSPropertyTextDecorationStyle:
2128 // solid | double | dotted | dashed | wavy 2122 // solid | double | dotted | dashed | wavy
2129 if (RuntimeEnabledFeatures::css3TextDecorationsEnabled() 2123 if (RuntimeEnabledFeatures::css3TextDecorationsEnabled()
2130 && (id == CSSValueSolid || id == CSSValueDouble || id == CSSValueDot ted || id == CSSValueDashed || id == CSSValueWavy)) 2124 && (id == CSSValueSolid || id == CSSValueDouble || id == CSSValueDot ted || id == CSSValueDashed || id == CSSValueWavy))
2131 validPrimitive = true; 2125 validPrimitive = true;
(...skipping 6880 matching lines...) Expand 10 before | Expand all | Expand 10 after
9012 list->append(cssValuePool().createIdentifierValue(value->id)); 9006 list->append(cssValuePool().createIdentifierValue(value->id));
9013 break; 9007 break;
9014 default: 9008 default:
9015 isValid = false; 9009 isValid = false;
9016 break; 9010 break;
9017 } 9011 }
9018 if (isValid) 9012 if (isValid)
9019 value = m_valueList->next(); 9013 value = m_valueList->next();
9020 } 9014 }
9021 9015
9022 // Values are either valid or in shorthand scope. 9016 if (list->length() && isValid) {
9023 if (list->length() && (isValid || inShorthand())) {
9024 addTextDecorationProperty(propId, list.release(), important); 9017 addTextDecorationProperty(propId, list.release(), important);
9025 return true; 9018 return true;
9026 } 9019 }
9027 9020
9028 return false; 9021 return false;
9029 } 9022 }
9030 9023
9031 #if ENABLE(CSS3_TEXT) 9024 #if ENABLE(CSS3_TEXT)
9032 bool CSSParser::parseTextUnderlinePosition(bool important) 9025 bool CSSParser::parseTextUnderlinePosition(bool important)
9033 { 9026 {
(...skipping 2886 matching lines...) Expand 10 before | Expand all | Expand 10 after
11920 { 11913 {
11921 // The tokenizer checks for the construct of an+b. 11914 // The tokenizer checks for the construct of an+b.
11922 // However, since the {ident} rule precedes the {nth} rule, some of those 11915 // However, since the {ident} rule precedes the {nth} rule, some of those
11923 // tokens are identified as string literal. Furthermore we need to accept 11916 // tokens are identified as string literal. Furthermore we need to accept
11924 // "odd" and "even" which does not match to an+b. 11917 // "odd" and "even" which does not match to an+b.
11925 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") 11918 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even")
11926 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); 11919 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n");
11927 } 11920 }
11928 11921
11929 } 11922 }
OLDNEW
« no previous file with comments | « Source/core/css/CSSComputedStyleDeclaration.cpp ('k') | Source/core/css/CSSShorthands.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698