OLD | NEW |
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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 if (command_line.HasSwitch(switches::kEnableWebFontsInterventionTrigger)) | 254 if (command_line.HasSwitch(switches::kEnableWebFontsInterventionTrigger)) |
255 WebRuntimeFeatures::enableWebFontsInterventionTrigger(true); | 255 WebRuntimeFeatures::enableWebFontsInterventionTrigger(true); |
256 | 256 |
257 WebRuntimeFeatures::enableScrollAnchoring( | 257 WebRuntimeFeatures::enableScrollAnchoring( |
258 base::FeatureList::IsEnabled(features::kScrollAnchoring) || | 258 base::FeatureList::IsEnabled(features::kScrollAnchoring) || |
259 enableExperimentalWebPlatformFeatures); | 259 enableExperimentalWebPlatformFeatures); |
260 | 260 |
261 if (command_line.HasSwitch(switches::kEnableSlimmingPaintV2)) | 261 if (command_line.HasSwitch(switches::kEnableSlimmingPaintV2)) |
262 WebRuntimeFeatures::enableSlimmingPaintV2(true); | 262 WebRuntimeFeatures::enableSlimmingPaintV2(true); |
263 | 263 |
264 WebRuntimeFeatures::enableSlimmingPaintInvalidation( | 264 if (base::FeatureList::IsEnabled(features::kSlimmingPaintInvalidation)) |
265 base::FeatureList::IsEnabled(features::kSlimmingPaintInvalidation)); | 265 WebRuntimeFeatures::enableSlimmingPaintInvalidation(true); |
266 | 266 |
267 if (command_line.HasSwitch(switches::kEnableSlimmingPaintInvalidation)) | 267 if (command_line.HasSwitch(switches::kEnableSlimmingPaintInvalidation)) |
268 WebRuntimeFeatures::enableSlimmingPaintInvalidation(true); | 268 WebRuntimeFeatures::enableSlimmingPaintInvalidation(true); |
269 | 269 |
270 if (command_line.HasSwitch(switches::kDisableSlimmingPaintInvalidation)) | 270 if (command_line.HasSwitch(switches::kDisableSlimmingPaintInvalidation)) |
271 WebRuntimeFeatures::enableSlimmingPaintInvalidation(false); | 271 WebRuntimeFeatures::enableSlimmingPaintInvalidation(false); |
272 | 272 |
273 if (base::FeatureList::IsEnabled(features::kDocumentWriteEvaluator)) | 273 if (base::FeatureList::IsEnabled(features::kDocumentWriteEvaluator)) |
274 WebRuntimeFeatures::enableDocumentWriteEvaluator(true); | 274 WebRuntimeFeatures::enableDocumentWriteEvaluator(true); |
275 | 275 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 378 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
379 std::vector<std::string> disabled_features = base::SplitString( | 379 std::vector<std::string> disabled_features = base::SplitString( |
380 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 380 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
381 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 381 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
382 for (const std::string& feature : disabled_features) | 382 for (const std::string& feature : disabled_features) |
383 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 383 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
384 } | 384 } |
385 } | 385 } |
386 | 386 |
387 } // namespace content | 387 } // namespace content |
OLD | NEW |