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

Side by Side Diff: third_party/WebKit/Source/core/testing/InternalSettings.cpp

Issue 1405993008: compositor-worker: plumb element id and mutable properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 , m_originalDisplayModeOverride(settings->displayModeOverride()) 68 , m_originalDisplayModeOverride(settings->displayModeOverride())
69 , m_originalMockScrollbarsEnabled(settings->mockScrollbarsEnabled()) 69 , m_originalMockScrollbarsEnabled(settings->mockScrollbarsEnabled())
70 , m_originalMockGestureTapHighlightsEnabled(settings->mockGestureTapHighligh tsEnabled()) 70 , m_originalMockGestureTapHighlightsEnabled(settings->mockGestureTapHighligh tsEnabled())
71 , m_langAttributeAwareFormControlUIEnabled(RuntimeEnabledFeatures::langAttri buteAwareFormControlUIEnabled()) 71 , m_langAttributeAwareFormControlUIEnabled(RuntimeEnabledFeatures::langAttri buteAwareFormControlUIEnabled())
72 , m_imagesEnabled(settings->imagesEnabled()) 72 , m_imagesEnabled(settings->imagesEnabled())
73 , m_defaultVideoPosterURL(settings->defaultVideoPosterURL()) 73 , m_defaultVideoPosterURL(settings->defaultVideoPosterURL())
74 , m_originalLayerSquashingEnabled(settings->layerSquashingEnabled()) 74 , m_originalLayerSquashingEnabled(settings->layerSquashingEnabled())
75 , m_originalImageColorProfilesEnabled(RuntimeEnabledFeatures::imageColorProf ilesEnabled()) 75 , m_originalImageColorProfilesEnabled(RuntimeEnabledFeatures::imageColorProf ilesEnabled())
76 , m_originalImageAnimationPolicy(settings->imageAnimationPolicy()) 76 , m_originalImageAnimationPolicy(settings->imageAnimationPolicy())
77 , m_originalScrollTopLeftInteropEnabled(RuntimeEnabledFeatures::scrollTopLef tInteropEnabled()) 77 , m_originalScrollTopLeftInteropEnabled(RuntimeEnabledFeatures::scrollTopLef tInteropEnabled())
78 , m_originalCompositorWorkerEnabled(RuntimeEnabledFeatures::compositorWorker Enabled())
78 { 79 {
79 } 80 }
80 81
81 void InternalSettings::Backup::restoreTo(Settings* settings) 82 void InternalSettings::Backup::restoreTo(Settings* settings)
82 { 83 {
83 RuntimeEnabledFeatures::setAuthorShadowDOMForAnyElementEnabled(m_originalAut horShadowDOMForAnyElementEnabled); 84 RuntimeEnabledFeatures::setAuthorShadowDOMForAnyElementEnabled(m_originalAut horShadowDOMForAnyElementEnabled);
84 RuntimeEnabledFeatures::setExperimentalContentSecurityPolicyFeaturesEnabled( m_originalCSP); 85 RuntimeEnabledFeatures::setExperimentalContentSecurityPolicyFeaturesEnabled( m_originalCSP);
85 RuntimeEnabledFeatures::setCSSStickyPositionEnabled(m_originalCSSStickyPosit ionEnabled); 86 RuntimeEnabledFeatures::setCSSStickyPositionEnabled(m_originalCSSStickyPosit ionEnabled);
86 RuntimeEnabledFeatures::setOverlayScrollbarsEnabled(m_originalOverlayScrollb arsEnabled); 87 RuntimeEnabledFeatures::setOverlayScrollbarsEnabled(m_originalOverlayScrollb arsEnabled);
87 settings->setEditingBehaviorType(m_originalEditingBehavior); 88 settings->setEditingBehaviorType(m_originalEditingBehavior);
88 settings->setTextAutosizingEnabled(m_originalTextAutosizingEnabled); 89 settings->setTextAutosizingEnabled(m_originalTextAutosizingEnabled);
89 settings->setTextAutosizingWindowSizeOverride(m_originalTextAutosizingWindow SizeOverride); 90 settings->setTextAutosizingWindowSizeOverride(m_originalTextAutosizingWindow SizeOverride);
90 settings->setAccessibilityFontScaleFactor(m_originalAccessibilityFontScaleFa ctor); 91 settings->setAccessibilityFontScaleFactor(m_originalAccessibilityFontScaleFa ctor);
91 settings->setMediaTypeOverride(m_originalMediaTypeOverride); 92 settings->setMediaTypeOverride(m_originalMediaTypeOverride);
92 settings->setDisplayModeOverride(m_originalDisplayModeOverride); 93 settings->setDisplayModeOverride(m_originalDisplayModeOverride);
93 settings->setMockScrollbarsEnabled(m_originalMockScrollbarsEnabled); 94 settings->setMockScrollbarsEnabled(m_originalMockScrollbarsEnabled);
94 settings->setMockGestureTapHighlightsEnabled(m_originalMockGestureTapHighlig htsEnabled); 95 settings->setMockGestureTapHighlightsEnabled(m_originalMockGestureTapHighlig htsEnabled);
95 RuntimeEnabledFeatures::setLangAttributeAwareFormControlUIEnabled(m_langAttr ibuteAwareFormControlUIEnabled); 96 RuntimeEnabledFeatures::setLangAttributeAwareFormControlUIEnabled(m_langAttr ibuteAwareFormControlUIEnabled);
96 settings->setImagesEnabled(m_imagesEnabled); 97 settings->setImagesEnabled(m_imagesEnabled);
97 settings->setDefaultVideoPosterURL(m_defaultVideoPosterURL); 98 settings->setDefaultVideoPosterURL(m_defaultVideoPosterURL);
98 settings->genericFontFamilySettings().reset(); 99 settings->genericFontFamilySettings().reset();
99 RuntimeEnabledFeatures::setImageColorProfilesEnabled(m_originalImageColorPro filesEnabled); 100 RuntimeEnabledFeatures::setImageColorProfilesEnabled(m_originalImageColorPro filesEnabled);
100 settings->setImageAnimationPolicy(m_originalImageAnimationPolicy); 101 settings->setImageAnimationPolicy(m_originalImageAnimationPolicy);
101 RuntimeEnabledFeatures::setScrollTopLeftInteropEnabled(m_originalScrollTopLe ftInteropEnabled); 102 RuntimeEnabledFeatures::setScrollTopLeftInteropEnabled(m_originalScrollTopLe ftInteropEnabled);
103 RuntimeEnabledFeatures::setCompositorWorkerEnabled(m_originalCompositorWorke rEnabled);
102 } 104 }
103 105
104 #if ENABLE(OILPAN) 106 #if ENABLE(OILPAN)
105 InternalSettings* InternalSettings::from(Page& page) 107 InternalSettings* InternalSettings::from(Page& page)
106 { 108 {
107 if (!HeapSupplement<Page>::from(page, supplementName())) 109 if (!HeapSupplement<Page>::from(page, supplementName()))
108 HeapSupplement<Page>::provideTo(page, supplementName(), new InternalSett ings(page)); 110 HeapSupplement<Page>::provideTo(page, supplementName(), new InternalSett ings(page));
109 return static_cast<InternalSettings*>(HeapSupplement<Page>::from(page, suppl ementName())); 111 return static_cast<InternalSettings*>(HeapSupplement<Page>::from(page, suppl ementName()));
110 } 112 }
111 #else 113 #else
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 InternalSettingsGuardForSettings(); 505 InternalSettingsGuardForSettings();
504 settings()->setLogDnsPrefetchAndPreconnect(enabled); 506 settings()->setLogDnsPrefetchAndPreconnect(enabled);
505 } 507 }
506 508
507 void InternalSettings::setPreloadLogging(bool enabled, ExceptionState& exception State) 509 void InternalSettings::setPreloadLogging(bool enabled, ExceptionState& exception State)
508 { 510 {
509 InternalSettingsGuardForSettings(); 511 InternalSettingsGuardForSettings();
510 settings()->setLogPreload(enabled); 512 settings()->setLogPreload(enabled);
511 } 513 }
512 514
515 void InternalSettings::setCompositorWorkerEnabled(bool enabled, ExceptionState& exceptionState)
516 {
517 InternalSettingsGuardForSettings();
518 RuntimeEnabledFeatures::setCompositorWorkerEnabled(enabled);
513 } 519 }
520
521 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698