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

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

Issue 18371008: Add a WebDocument::watchCssSelectors(selectors) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@pinned
Patch Set: Sync 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
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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 CSSPropertyAnimationPlayState 105 CSSPropertyAnimationPlayState
106 }; 106 };
107 setCSSPropertiesEnabled(animationProperties, WTF_ARRAY_LENGTH(animationPrope rties), RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled()); 107 setCSSPropertiesEnabled(animationProperties, WTF_ARRAY_LENGTH(animationPrope rties), RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled());
108 108
109 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyBackgroundBlendMode, Run timeEnabledFeatures::cssCompositingEnabled()); 109 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyBackgroundBlendMode, Run timeEnabledFeatures::cssCompositingEnabled());
110 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyMixBlendMode, RuntimeEna bledFeatures::cssCompositingEnabled()); 110 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyMixBlendMode, RuntimeEna bledFeatures::cssCompositingEnabled());
111 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyTouchAction, RuntimeEnab ledFeatures::cssTouchActionEnabled()); 111 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyTouchAction, RuntimeEnab ledFeatures::cssTouchActionEnabled());
112 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyPaintOrder, RuntimeEnabl edFeatures::svgPaintOrderEnabled()); 112 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyPaintOrder, RuntimeEnabl edFeatures::svgPaintOrderEnabled());
113 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyVariable, RuntimeEnabled Features::cssVariablesEnabled()); 113 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyVariable, RuntimeEnabled Features::cssVariablesEnabled());
114 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyObjectFit, RuntimeEnable dFeatures::objectFitPositionEnabled()); 114 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyObjectFit, RuntimeEnable dFeatures::objectFitPositionEnabled());
115
116 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyInternalCallback, false) ;
esprehn 2013/09/04 06:08:28 This needs a comment why you pass false and nothin
Jeffrey Yasskin 2013/09/12 22:09:59 Done; see if you like the wording.
115 } 117 }
116 118
117 static BoolVector& propertySwitches() 119 static BoolVector& propertySwitches()
118 { 120 {
119 static BoolVector* switches = 0; 121 static BoolVector* switches = 0;
120 if (!switches) { 122 if (!switches) {
121 switches = new BoolVector; 123 switches = new BoolVector;
122 // Accomodate CSSPropertyIDs that fall outside the firstCSSProperty, las tCSSProperty range (eg. CSSPropertyVariable). 124 // Accomodate CSSPropertyIDs that fall outside the firstCSSProperty, las tCSSProperty range (eg. CSSPropertyVariable).
123 switches->fill(true, lastCSSProperty + 1); 125 switches->fill(true, lastCSSProperty + 1);
124 setPropertySwitchesFromRuntimeFeatures(); 126 setPropertySwitchesFromRuntimeFeatures();
(...skipping 26 matching lines...) Expand all
151 void RuntimeCSSEnabled::filterEnabledCSSPropertiesIntoVector(const CSSPropertyID * properties, size_t propertyCount, Vector<CSSPropertyID>& outVector) 153 void RuntimeCSSEnabled::filterEnabledCSSPropertiesIntoVector(const CSSPropertyID * properties, size_t propertyCount, Vector<CSSPropertyID>& outVector)
152 { 154 {
153 for (unsigned i = 0; i < propertyCount; i++) { 155 for (unsigned i = 0; i < propertyCount; i++) {
154 CSSPropertyID property = properties[i]; 156 CSSPropertyID property = properties[i];
155 if (RuntimeCSSEnabled::isCSSPropertyEnabled(property)) 157 if (RuntimeCSSEnabled::isCSSPropertyEnabled(property))
156 outVector.append(property); 158 outVector.append(property);
157 } 159 }
158 } 160 }
159 161
160 } // namespace WebCore 162 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698