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

Side by Side Diff: content/child/runtime_features.cc

Issue 1682993002: Add about:flags entry for scroll anchoring. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 10 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 | « chrome/browser/about_flags.cc ('k') | content/public/common/content_features.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/child/runtime_features.h" 5 #include "content/child/runtime_features.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 if (command_line.HasSwitch(switches::kDisablePresentationAPI)) 173 if (command_line.HasSwitch(switches::kDisablePresentationAPI))
174 WebRuntimeFeatures::enablePresentationAPI(false); 174 WebRuntimeFeatures::enablePresentationAPI(false);
175 175
176 if (base::FeatureList::IsEnabled(features::kWebFontsIntervention)) { 176 if (base::FeatureList::IsEnabled(features::kWebFontsIntervention)) {
177 WebRuntimeFeatures::enableWebFontsIntervention(true); 177 WebRuntimeFeatures::enableWebFontsIntervention(true);
178 if (command_line.HasSwitch(switches::kEnableWebFontsInterventionTrigger)) 178 if (command_line.HasSwitch(switches::kEnableWebFontsInterventionTrigger))
179 WebRuntimeFeatures::enableWebFontsInterventionTrigger(true); 179 WebRuntimeFeatures::enableWebFontsInterventionTrigger(true);
180 } 180 }
181 181
182 if (base::FeatureList::IsEnabled(features::kScrollAnchoring))
183 WebRuntimeFeatures::enableScrollAnchoring(true);
184
182 if (command_line.HasSwitch(switches::kEnableSlimmingPaintV2)) 185 if (command_line.HasSwitch(switches::kEnableSlimmingPaintV2))
183 WebRuntimeFeatures::enableSlimmingPaintV2(true); 186 WebRuntimeFeatures::enableSlimmingPaintV2(true);
184 187
185 // Enable explicitly enabled features, and then disable explicitly disabled 188 // Enable explicitly enabled features, and then disable explicitly disabled
186 // ones. 189 // ones.
187 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) { 190 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) {
188 std::vector<std::string> enabled_features = base::SplitString( 191 std::vector<std::string> enabled_features = base::SplitString(
189 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures), 192 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures),
190 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 193 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
191 for (const std::string& feature : enabled_features) 194 for (const std::string& feature : enabled_features)
192 WebRuntimeFeatures::enableFeatureFromString(feature, true); 195 WebRuntimeFeatures::enableFeatureFromString(feature, true);
193 } 196 }
194 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 197 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
195 std::vector<std::string> disabled_features = base::SplitString( 198 std::vector<std::string> disabled_features = base::SplitString(
196 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 199 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
197 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 200 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
198 for (const std::string& feature : disabled_features) 201 for (const std::string& feature : disabled_features)
199 WebRuntimeFeatures::enableFeatureFromString(feature, false); 202 WebRuntimeFeatures::enableFeatureFromString(feature, false);
200 } 203 }
201 } 204 }
202 205
203 } // namespace content 206 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | content/public/common/content_features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698