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

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

Issue 2468323002: Enable compositing opaque fixed position elements which will maintain LCD text. (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | 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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 299
300 if (base::FeatureList::IsEnabled(features::kServiceWorkerNavigationPreload)) 300 if (base::FeatureList::IsEnabled(features::kServiceWorkerNavigationPreload))
301 WebRuntimeFeatures::enableServiceWorkerNavigationPreload(true); 301 WebRuntimeFeatures::enableServiceWorkerNavigationPreload(true);
302 302
303 if (base::FeatureList::IsEnabled(features::kSpeculativeLaunchServiceWorker)) 303 if (base::FeatureList::IsEnabled(features::kSpeculativeLaunchServiceWorker))
304 WebRuntimeFeatures::enableSpeculativeLaunchServiceWorker(true); 304 WebRuntimeFeatures::enableSpeculativeLaunchServiceWorker(true);
305 305
306 if (base::FeatureList::IsEnabled(features::kGamepadExtensions)) 306 if (base::FeatureList::IsEnabled(features::kGamepadExtensions))
307 WebRuntimeFeatures::enableGamepadExtensions(true); 307 WebRuntimeFeatures::enableGamepadExtensions(true);
308 308
309 if (!base::FeatureList::IsEnabled(features::kCompositeOpaqueFixedPosition))
310 WebRuntimeFeatures::enableFeatureFromString("CompositeOpaqueFixedPosition",
311 false);
312
309 if (!base::FeatureList::IsEnabled(features::kCompositeOpaqueScrollers)) 313 if (!base::FeatureList::IsEnabled(features::kCompositeOpaqueScrollers))
310 WebRuntimeFeatures::enableFeatureFromString("CompositeOpaqueScrollers", 314 WebRuntimeFeatures::enableFeatureFromString("CompositeOpaqueScrollers",
311 false); 315 false);
312 316
313 if (base::FeatureList::IsEnabled(features::kGenericSensor)) 317 if (base::FeatureList::IsEnabled(features::kGenericSensor))
314 WebRuntimeFeatures::enableGenericSensor(true); 318 WebRuntimeFeatures::enableGenericSensor(true);
315 319
316 // Enable explicitly enabled features, and then disable explicitly disabled 320 // Enable explicitly enabled features, and then disable explicitly disabled
317 // ones. 321 // ones.
318 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) { 322 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) {
319 std::vector<std::string> enabled_features = base::SplitString( 323 std::vector<std::string> enabled_features = base::SplitString(
320 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures), 324 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures),
321 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 325 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
322 for (const std::string& feature : enabled_features) 326 for (const std::string& feature : enabled_features)
323 WebRuntimeFeatures::enableFeatureFromString(feature, true); 327 WebRuntimeFeatures::enableFeatureFromString(feature, true);
324 } 328 }
325 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 329 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
326 std::vector<std::string> disabled_features = base::SplitString( 330 std::vector<std::string> disabled_features = base::SplitString(
327 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 331 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
328 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 332 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
329 for (const std::string& feature : disabled_features) 333 for (const std::string& feature : disabled_features)
330 WebRuntimeFeatures::enableFeatureFromString(feature, false); 334 WebRuntimeFeatures::enableFeatureFromString(feature, false);
331 } 335 }
332 } 336 }
333 337
334 } // namespace content 338 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/public/common/content_features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698