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

Side by Side Diff: Source/core/page/RuntimeCSSEnabled.cpp

Issue 22839023: Add support for the object-position CSS property. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase master Created 7 years, 3 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/resolver/StyleBuilderCustom.cpp ('k') | Source/core/page/UseCounter.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) 2013 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 CSSPropertyGridColumnEnd, 85 CSSPropertyGridColumnEnd,
86 CSSPropertyGridRowStart, 86 CSSPropertyGridRowStart,
87 CSSPropertyGridRowEnd, 87 CSSPropertyGridRowEnd,
88 CSSPropertyGridColumn, 88 CSSPropertyGridColumn,
89 CSSPropertyGridRow, 89 CSSPropertyGridRow,
90 CSSPropertyGridArea, 90 CSSPropertyGridArea,
91 CSSPropertyGridAutoFlow, 91 CSSPropertyGridAutoFlow,
92 CSSPropertyGridTemplate 92 CSSPropertyGridTemplate
93 }; 93 };
94 setCSSPropertiesEnabled(cssGridLayoutProperties, WTF_ARRAY_LENGTH(cssGridLay outProperties), RuntimeEnabledFeatures::cssGridLayoutEnabled()); 94 setCSSPropertiesEnabled(cssGridLayoutProperties, WTF_ARRAY_LENGTH(cssGridLay outProperties), RuntimeEnabledFeatures::cssGridLayoutEnabled());
95 CSSPropertyID cssObjectFitPositionProperties[] = {
96 CSSPropertyObjectFit,
97 CSSPropertyObjectPosition
98 };
99 setCSSPropertiesEnabled(cssObjectFitPositionProperties, WTF_ARRAY_LENGTH(css ObjectFitPositionProperties), RuntimeEnabledFeatures::objectFitPositionEnabled() );
95 100
96 CSSPropertyID animationProperties[] = { 101 CSSPropertyID animationProperties[] = {
97 CSSPropertyAnimation, 102 CSSPropertyAnimation,
98 CSSPropertyAnimationName, 103 CSSPropertyAnimationName,
99 CSSPropertyAnimationDuration, 104 CSSPropertyAnimationDuration,
100 CSSPropertyAnimationTimingFunction, 105 CSSPropertyAnimationTimingFunction,
101 CSSPropertyAnimationDelay, 106 CSSPropertyAnimationDelay,
102 CSSPropertyAnimationIterationCount, 107 CSSPropertyAnimationIterationCount,
103 CSSPropertyAnimationDirection, 108 CSSPropertyAnimationDirection,
104 CSSPropertyAnimationFillMode, 109 CSSPropertyAnimationFillMode,
105 CSSPropertyAnimationPlayState 110 CSSPropertyAnimationPlayState
106 }; 111 };
107 setCSSPropertiesEnabled(animationProperties, WTF_ARRAY_LENGTH(animationPrope rties), RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled()); 112 setCSSPropertiesEnabled(animationProperties, WTF_ARRAY_LENGTH(animationPrope rties), RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled());
108 113
109 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyBackgroundBlendMode, Run timeEnabledFeatures::cssCompositingEnabled()); 114 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyBackgroundBlendMode, Run timeEnabledFeatures::cssCompositingEnabled());
110 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyMixBlendMode, RuntimeEna bledFeatures::cssCompositingEnabled()); 115 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyMixBlendMode, RuntimeEna bledFeatures::cssCompositingEnabled());
111 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyTouchAction, RuntimeEnab ledFeatures::cssTouchActionEnabled()); 116 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyTouchAction, RuntimeEnab ledFeatures::cssTouchActionEnabled());
112 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyPaintOrder, RuntimeEnabl edFeatures::svgPaintOrderEnabled()); 117 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyPaintOrder, RuntimeEnabl edFeatures::svgPaintOrderEnabled());
113 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyVariable, RuntimeEnabled Features::cssVariablesEnabled()); 118 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyVariable, RuntimeEnabled Features::cssVariablesEnabled());
114 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyObjectFit, RuntimeEnable dFeatures::objectFitPositionEnabled());
115 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyMaskSourceType, RuntimeE nabledFeatures::cssMaskSourceTypeEnabled()); 119 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyMaskSourceType, RuntimeE nabledFeatures::cssMaskSourceTypeEnabled());
116 } 120 }
117 121
118 static BoolVector& propertySwitches() 122 static BoolVector& propertySwitches()
119 { 123 {
120 static BoolVector* switches = 0; 124 static BoolVector* switches = 0;
121 if (!switches) { 125 if (!switches) {
122 switches = new BoolVector; 126 switches = new BoolVector;
123 // Accomodate CSSPropertyIDs that fall outside the firstCSSProperty, las tCSSProperty range (eg. CSSPropertyVariable). 127 // Accomodate CSSPropertyIDs that fall outside the firstCSSProperty, las tCSSProperty range (eg. CSSPropertyVariable).
124 switches->fill(true, lastCSSProperty + 1); 128 switches->fill(true, lastCSSProperty + 1);
(...skipping 27 matching lines...) Expand all
152 void RuntimeCSSEnabled::filterEnabledCSSPropertiesIntoVector(const CSSPropertyID * properties, size_t propertyCount, Vector<CSSPropertyID>& outVector) 156 void RuntimeCSSEnabled::filterEnabledCSSPropertiesIntoVector(const CSSPropertyID * properties, size_t propertyCount, Vector<CSSPropertyID>& outVector)
153 { 157 {
154 for (unsigned i = 0; i < propertyCount; i++) { 158 for (unsigned i = 0; i < propertyCount; i++) {
155 CSSPropertyID property = properties[i]; 159 CSSPropertyID property = properties[i];
156 if (RuntimeCSSEnabled::isCSSPropertyEnabled(property)) 160 if (RuntimeCSSEnabled::isCSSPropertyEnabled(property))
157 outVector.append(property); 161 outVector.append(property);
158 } 162 }
159 } 163 }
160 164
161 } // namespace WebCore 165 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/resolver/StyleBuilderCustom.cpp ('k') | Source/core/page/UseCounter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698