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

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

Issue 418163003: Simplify watched selector handling and remove remnants of user stylesheets (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@cascade
Patch Set: use includeEmptyRules flag on MatchRequest Created 6 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
« no previous file with comments | « Source/core/css/ElementRuleCollector.cpp ('k') | Source/core/css/parser/BisonCSSParser-in.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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 }; 96 };
97 setCSSPropertiesEnabled(animationProperties, WTF_ARRAY_LENGTH(animationPrope rties), RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled()); 97 setCSSPropertiesEnabled(animationProperties, WTF_ARRAY_LENGTH(animationPrope rties), RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled());
98 98
99 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyMixBlendMode, RuntimeEna bledFeatures::cssCompositingEnabled()); 99 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyMixBlendMode, RuntimeEna bledFeatures::cssCompositingEnabled());
100 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyIsolation, RuntimeEnable dFeatures::cssCompositingEnabled()); 100 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyIsolation, RuntimeEnable dFeatures::cssCompositingEnabled());
101 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyTouchActionDelay, Runtim eEnabledFeatures::cssTouchActionDelayEnabled()); 101 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyTouchActionDelay, Runtim eEnabledFeatures::cssTouchActionDelayEnabled());
102 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyMaskSourceType, RuntimeE nabledFeatures::cssMaskSourceTypeEnabled()); 102 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyMaskSourceType, RuntimeE nabledFeatures::cssMaskSourceTypeEnabled());
103 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyColumnFill, RuntimeEnabl edFeatures::regionBasedColumnsEnabled()); 103 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyColumnFill, RuntimeEnabl edFeatures::regionBasedColumnsEnabled());
104 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyScrollBehavior, RuntimeE nabledFeatures::cssomSmoothScrollEnabled()); 104 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyScrollBehavior, RuntimeE nabledFeatures::cssomSmoothScrollEnabled());
105 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyWillChange, RuntimeEnabl edFeatures::cssWillChangeEnabled()); 105 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyWillChange, RuntimeEnabl edFeatures::cssWillChangeEnabled());
106
107 // InternalCallback is an implementation detail, rather than an experimental feature, and should never be exposed to the web.
108 RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyInternalCallback, false) ;
109 } 106 }
110 107
111 static CSSPropertySwitches& propertySwitches() 108 static CSSPropertySwitches& propertySwitches()
112 { 109 {
113 static CSSPropertySwitches* switches = 0; 110 static CSSPropertySwitches* switches = 0;
114 if (!switches) { 111 if (!switches) {
115 switches = new CSSPropertySwitches(true); // All bits sets to 1. 112 switches = new CSSPropertySwitches(true); // All bits sets to 1.
116 setPropertySwitchesFromRuntimeFeatures(); 113 setPropertySwitchesFromRuntimeFeatures();
117 } 114 }
118 return *switches; 115 return *switches;
(...skipping 28 matching lines...) Expand all
147 void RuntimeCSSEnabled::filterEnabledCSSPropertiesIntoVector(const CSSPropertyID * properties, size_t propertyCount, Vector<CSSPropertyID>& outVector) 144 void RuntimeCSSEnabled::filterEnabledCSSPropertiesIntoVector(const CSSPropertyID * properties, size_t propertyCount, Vector<CSSPropertyID>& outVector)
148 { 145 {
149 for (unsigned i = 0; i < propertyCount; i++) { 146 for (unsigned i = 0; i < propertyCount; i++) {
150 CSSPropertyID property = properties[i]; 147 CSSPropertyID property = properties[i];
151 if (RuntimeCSSEnabled::isCSSPropertyEnabled(property)) 148 if (RuntimeCSSEnabled::isCSSPropertyEnabled(property))
152 outVector.append(property); 149 outVector.append(property);
153 } 150 }
154 } 151 }
155 152
156 } // namespace blink 153 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/ElementRuleCollector.cpp ('k') | Source/core/css/parser/BisonCSSParser-in.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698