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

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

Issue 22482004: Add support for the object-fit CSS property. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Oops, sorry! Forgot to update UseCounter.cpp 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
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 CSSPropertyGridRow, 86 CSSPropertyGridRow,
87 CSSPropertyGridArea, 87 CSSPropertyGridArea,
88 CSSPropertyGridAutoFlow 88 CSSPropertyGridAutoFlow
89 }; 89 };
90 setCSSPropertiesEnabled(cssGridLayoutProperties, WTF_ARRAY_LENGTH(cssGridLay outProperties), RuntimeEnabledFeatures::cssGridLayoutEnabled()); 90 setCSSPropertiesEnabled(cssGridLayoutProperties, WTF_ARRAY_LENGTH(cssGridLay outProperties), RuntimeEnabledFeatures::cssGridLayoutEnabled());
91 91
92 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyBackgroundBlendMode, Run timeEnabledFeatures::cssCompositingEnabled()); 92 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyBackgroundBlendMode, Run timeEnabledFeatures::cssCompositingEnabled());
93 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyMixBlendMode, RuntimeEna bledFeatures::cssCompositingEnabled()); 93 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyMixBlendMode, RuntimeEna bledFeatures::cssCompositingEnabled());
94 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyTouchAction, RuntimeEnab ledFeatures::cssTouchActionEnabled()); 94 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyTouchAction, RuntimeEnab ledFeatures::cssTouchActionEnabled());
95 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyVariable, RuntimeEnabled Features::cssVariablesEnabled()); 95 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyVariable, RuntimeEnabled Features::cssVariablesEnabled());
96 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyObjectFit, RuntimeEnable dFeatures::objectFitPositionEnabled());
96 } 97 }
97 98
98 static BoolVector& propertySwitches() 99 static BoolVector& propertySwitches()
99 { 100 {
100 static BoolVector* switches = 0; 101 static BoolVector* switches = 0;
101 if (!switches) { 102 if (!switches) {
102 switches = new BoolVector; 103 switches = new BoolVector;
103 // Accomodate CSSPropertyIDs that fall outside the firstCSSProperty, las tCSSProperty range (eg. CSSPropertyVariable). 104 // Accomodate CSSPropertyIDs that fall outside the firstCSSProperty, las tCSSProperty range (eg. CSSPropertyVariable).
104 switches->fill(true, lastCSSProperty + 1); 105 switches->fill(true, lastCSSProperty + 1);
105 setPropertySwitchesFromRuntimeFeatures(); 106 setPropertySwitchesFromRuntimeFeatures();
(...skipping 21 matching lines...) Expand all
127 void RuntimeCSSEnabled::filterEnabledCSSPropertiesIntoVector(const CSSPropertyID * properties, size_t propertyCount, Vector<CSSPropertyID>& outVector) 128 void RuntimeCSSEnabled::filterEnabledCSSPropertiesIntoVector(const CSSPropertyID * properties, size_t propertyCount, Vector<CSSPropertyID>& outVector)
128 { 129 {
129 for (unsigned i = 0; i < propertyCount; i++) { 130 for (unsigned i = 0; i < propertyCount; i++) {
130 CSSPropertyID property = properties[i]; 131 CSSPropertyID property = properties[i];
131 if (RuntimeCSSEnabled::isCSSPropertyEnabled(property)) 132 if (RuntimeCSSEnabled::isCSSPropertyEnabled(property))
132 outVector.append(property); 133 outVector.append(property);
133 } 134 }
134 } 135 }
135 136
136 } // namespace WebCore 137 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698