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