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

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

Issue 14324009: Add support for disabling CSS Properties at runtime (Closed) Base URL: http://src.chromium.org/blink/trunk/Source/
Patch Set: Runtime guard more uses of CSSPropertyID, per Elliot's request. Created 7 years, 8 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 | « Source/core/css/CSSComputedStyleDeclaration.cpp ('k') | Source/core/css/DOMWindowCSS.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 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1277 return true; 1277 return true;
1278 if (parseTranslateTransformValue(declaration, propertyID, string, important) ) 1278 if (parseTranslateTransformValue(declaration, propertyID, string, important) )
1279 return true; 1279 return true;
1280 1280
1281 CSSParser parser(context); 1281 CSSParser parser(context);
1282 return parser.parseValue(declaration, propertyID, string, important, context StyleSheet); 1282 return parser.parseValue(declaration, propertyID, string, important, context StyleSheet);
1283 } 1283 }
1284 1284
1285 bool CSSParser::parseValue(StylePropertySet* declaration, CSSPropertyID property ID, const String& string, bool important, StyleSheetContents* contextStyleSheet) 1285 bool CSSParser::parseValue(StylePropertySet* declaration, CSSPropertyID property ID, const String& string, bool important, StyleSheetContents* contextStyleSheet)
1286 { 1286 {
1287 // FIXME: Check RuntimeCSSEnabled::isPropertyEnabled or isValueEnabledForPro perty.
1288
1287 setStyleSheet(contextStyleSheet); 1289 setStyleSheet(contextStyleSheet);
1288 1290
1289 setupParser("@-internal-value{", string, "} "); 1291 setupParser("@-internal-value{", string, "} ");
1290 1292
1291 m_id = propertyID; 1293 m_id = propertyID;
1292 m_important = important; 1294 m_important = important;
1293 1295
1294 cssyyparse(this); 1296 cssyyparse(this);
1295 1297
1296 m_rule = 0; 1298 m_rule = 0;
(...skipping 10424 matching lines...) Expand 10 before | Expand all | Expand 10 after
11721 { 11723 {
11722 // The tokenizer checks for the construct of an+b. 11724 // The tokenizer checks for the construct of an+b.
11723 // However, since the {ident} rule precedes the {nth} rule, some of those 11725 // However, since the {ident} rule precedes the {nth} rule, some of those
11724 // tokens are identified as string literal. Furthermore we need to accept 11726 // tokens are identified as string literal. Furthermore we need to accept
11725 // "odd" and "even" which does not match to an+b. 11727 // "odd" and "even" which does not match to an+b.
11726 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") 11728 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even")
11727 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); 11729 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n");
11728 } 11730 }
11729 11731
11730 } 11732 }
OLDNEW
« no previous file with comments | « Source/core/css/CSSComputedStyleDeclaration.cpp ('k') | Source/core/css/DOMWindowCSS.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698