| 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 if (command_line.HasSwitch(switches::kEnableWebFontsInterventionTrigger)) | 247 if (command_line.HasSwitch(switches::kEnableWebFontsInterventionTrigger)) |
| 248 WebRuntimeFeatures::enableWebFontsInterventionTrigger(true); | 248 WebRuntimeFeatures::enableWebFontsInterventionTrigger(true); |
| 249 | 249 |
| 250 WebRuntimeFeatures::enableScrollAnchoring( | 250 WebRuntimeFeatures::enableScrollAnchoring( |
| 251 base::FeatureList::IsEnabled(features::kScrollAnchoring) || | 251 base::FeatureList::IsEnabled(features::kScrollAnchoring) || |
| 252 enableExperimentalWebPlatformFeatures); | 252 enableExperimentalWebPlatformFeatures); |
| 253 | 253 |
| 254 if (command_line.HasSwitch(switches::kEnableSlimmingPaintV2)) | 254 if (command_line.HasSwitch(switches::kEnableSlimmingPaintV2)) |
| 255 WebRuntimeFeatures::enableSlimmingPaintV2(true); | 255 WebRuntimeFeatures::enableSlimmingPaintV2(true); |
| 256 | 256 |
| 257 if (base::FeatureList::IsEnabled(features::kSlimmingPaintInvalidation)) |
| 258 WebRuntimeFeatures::enableSlimmingPaintInvalidation(true); |
| 259 |
| 257 if (command_line.HasSwitch(switches::kEnableSlimmingPaintInvalidation)) | 260 if (command_line.HasSwitch(switches::kEnableSlimmingPaintInvalidation)) |
| 258 WebRuntimeFeatures::enableSlimmingPaintInvalidation(true); | 261 WebRuntimeFeatures::enableSlimmingPaintInvalidation(true); |
| 259 | 262 |
| 260 if (command_line.HasSwitch(switches::kDisableSlimmingPaintInvalidation)) | 263 if (command_line.HasSwitch(switches::kDisableSlimmingPaintInvalidation)) |
| 261 WebRuntimeFeatures::enableSlimmingPaintInvalidation(false); | 264 WebRuntimeFeatures::enableSlimmingPaintInvalidation(false); |
| 262 | 265 |
| 263 if (base::FeatureList::IsEnabled(features::kDocumentWriteEvaluator)) | 266 if (base::FeatureList::IsEnabled(features::kDocumentWriteEvaluator)) |
| 264 WebRuntimeFeatures::enableDocumentWriteEvaluator(true); | 267 WebRuntimeFeatures::enableDocumentWriteEvaluator(true); |
| 265 | 268 |
| 266 if (base::FeatureList::IsEnabled(features::kLazyParseCSS)) | 269 if (base::FeatureList::IsEnabled(features::kLazyParseCSS)) |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 371 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 369 std::vector<std::string> disabled_features = base::SplitString( | 372 std::vector<std::string> disabled_features = base::SplitString( |
| 370 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 373 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 371 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 374 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 372 for (const std::string& feature : disabled_features) | 375 for (const std::string& feature : disabled_features) |
| 373 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 376 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 374 } | 377 } |
| 375 } | 378 } |
| 376 | 379 |
| 377 } // namespace content | 380 } // namespace content |
| OLD | NEW |