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

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

Issue 216003002: Avoid exposing disabled CSS properties in will-change and transition (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Move checking to transition and will-change Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 #include "core/css/CSSShadowValue.h" 62 #include "core/css/CSSShadowValue.h"
63 #include "core/css/CSSTimingFunctionValue.h" 63 #include "core/css/CSSTimingFunctionValue.h"
64 #include "core/css/CSSTransformValue.h" 64 #include "core/css/CSSTransformValue.h"
65 #include "core/css/CSSUnicodeRangeValue.h" 65 #include "core/css/CSSUnicodeRangeValue.h"
66 #include "core/css/CSSValueList.h" 66 #include "core/css/CSSValueList.h"
67 #include "core/css/CSSValuePool.h" 67 #include "core/css/CSSValuePool.h"
68 #include "core/css/Counter.h" 68 #include "core/css/Counter.h"
69 #include "core/css/HashTools.h" 69 #include "core/css/HashTools.h"
70 #include "core/css/Pair.h" 70 #include "core/css/Pair.h"
71 #include "core/css/Rect.h" 71 #include "core/css/Rect.h"
72 #include "core/css/RuntimeCSSEnabled.h"
72 #include "core/css/parser/CSSParserIdioms.h" 73 #include "core/css/parser/CSSParserIdioms.h"
73 #include "core/html/parser/HTMLParserIdioms.h" 74 #include "core/html/parser/HTMLParserIdioms.h"
74 #include "core/inspector/InspectorInstrumentation.h" 75 #include "core/inspector/InspectorInstrumentation.h"
75 #include "core/rendering/RenderTheme.h" 76 #include "core/rendering/RenderTheme.h"
76 #include "core/svg/SVGParserUtilities.h" 77 #include "core/svg/SVGParserUtilities.h"
77 #include "platform/FloatConversion.h" 78 #include "platform/FloatConversion.h"
78 #include "wtf/BitArray.h" 79 #include "wtf/BitArray.h"
79 #include "wtf/HexNumber.h" 80 #include "wtf/HexNumber.h"
80 #include "wtf/text/StringBuffer.h" 81 #include "wtf/text/StringBuffer.h"
81 #include "wtf/text/StringBuilder.h" 82 #include "wtf/text/StringBuilder.h"
(...skipping 2992 matching lines...) Expand 10 before | Expand all | Expand 10 after
3074 return cssValuePool().createIdentifierValue(value->id); 3075 return cssValuePool().createIdentifierValue(value->id);
3075 return nullptr; 3076 return nullptr;
3076 } 3077 }
3077 3078
3078 PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAnimationProperty(Anima tionParseContext& context) 3079 PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAnimationProperty(Anima tionParseContext& context)
3079 { 3080 {
3080 CSSParserValue* value = m_valueList->current(); 3081 CSSParserValue* value = m_valueList->current();
3081 if (value->unit != CSSPrimitiveValue::CSS_IDENT) 3082 if (value->unit != CSSPrimitiveValue::CSS_IDENT)
3082 return nullptr; 3083 return nullptr;
3083 CSSPropertyID result = cssPropertyID(value->string); 3084 CSSPropertyID result = cssPropertyID(value->string);
3084 if (result) 3085 if (result && RuntimeCSSEnabled::isCSSPropertyEnabled(result))
3085 return cssValuePool().createIdentifierValue(result); 3086 return cssValuePool().createIdentifierValue(result);
3086 if (equalIgnoringCase(value, "all")) { 3087 if (equalIgnoringCase(value, "all")) {
3087 context.sawAnimationPropertyKeyword(); 3088 context.sawAnimationPropertyKeyword();
3088 return cssValuePool().createIdentifierValue(CSSValueAll); 3089 return cssValuePool().createIdentifierValue(CSSValueAll);
3089 } 3090 }
3090 if (equalIgnoringCase(value, "none")) { 3091 if (equalIgnoringCase(value, "none")) {
3091 context.commitAnimationPropertyKeyword(); 3092 context.commitAnimationPropertyKeyword();
3092 context.sawAnimationPropertyKeyword(); 3093 context.sawAnimationPropertyKeyword();
3093 return cssValuePool().createIdentifierValue(CSSValueNone); 3094 return cssValuePool().createIdentifierValue(CSSValueNone);
3094 } 3095 }
(...skipping 3921 matching lines...) Expand 10 before | Expand all | Expand 10 after
7016 if (!isComma(currentValue)) 7017 if (!isComma(currentValue))
7017 return false; 7018 return false;
7018 expectComma = false; 7019 expectComma = false;
7019 m_valueList->next(); 7020 m_valueList->next();
7020 continue; 7021 continue;
7021 } 7022 }
7022 7023
7023 if (currentValue->unit != CSSPrimitiveValue::CSS_IDENT) 7024 if (currentValue->unit != CSSPrimitiveValue::CSS_IDENT)
7024 return false; 7025 return false;
7025 7026
7026 if (CSSPropertyID property = cssPropertyID(currentValue->string)) { 7027 CSSPropertyID property = cssPropertyID(currentValue->string);
7028 if (property && RuntimeCSSEnabled::isCSSPropertyEnabled(property)) {
7027 if (property == CSSPropertyWillChange) 7029 if (property == CSSPropertyWillChange)
7028 return false; 7030 return false;
7029 values->append(cssValuePool().createIdentifierValue(property)); 7031 values->append(cssValuePool().createIdentifierValue(property));
7030 } else { 7032 } else {
7031 switch (currentValue->id) { 7033 switch (currentValue->id) {
7032 case CSSValueNone: 7034 case CSSValueNone:
7033 case CSSValueAll: 7035 case CSSValueAll:
7034 case CSSValueAuto: 7036 case CSSValueAuto:
7035 case CSSValueDefault: 7037 case CSSValueDefault:
7036 case CSSValueInitial: 7038 case CSSValueInitial:
(...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after
8232 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill)); 8234 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill));
8233 if (!seenStroke) 8235 if (!seenStroke)
8234 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke) ); 8236 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke) );
8235 if (!seenMarkers) 8237 if (!seenMarkers)
8236 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers )); 8238 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers ));
8237 8239
8238 return parsedValues.release(); 8240 return parsedValues.release();
8239 } 8241 }
8240 8242
8241 } // namespace WebCore 8243 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698