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

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

Issue 643713006: Run-time control enableImageColorProfiles during layout tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 months 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/testing/InternalSettings.h ('k') | Source/core/testing/InternalSettings.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 , m_originalTextAutosizingWindowSizeOverride(settings->textAutosizingWindowS izeOverride()) 67 , m_originalTextAutosizingWindowSizeOverride(settings->textAutosizingWindowS izeOverride())
68 , m_originalAccessibilityFontScaleFactor(settings->accessibilityFontScaleFac tor()) 68 , m_originalAccessibilityFontScaleFactor(settings->accessibilityFontScaleFac tor())
69 , m_originalMediaTypeOverride(settings->mediaTypeOverride()) 69 , m_originalMediaTypeOverride(settings->mediaTypeOverride())
70 , m_originalMockScrollbarsEnabled(settings->mockScrollbarsEnabled()) 70 , m_originalMockScrollbarsEnabled(settings->mockScrollbarsEnabled())
71 , m_originalMockGestureTapHighlightsEnabled(settings->mockGestureTapHighligh tsEnabled()) 71 , m_originalMockGestureTapHighlightsEnabled(settings->mockGestureTapHighligh tsEnabled())
72 , m_langAttributeAwareFormControlUIEnabled(RuntimeEnabledFeatures::langAttri buteAwareFormControlUIEnabled()) 72 , m_langAttributeAwareFormControlUIEnabled(RuntimeEnabledFeatures::langAttri buteAwareFormControlUIEnabled())
73 , m_imagesEnabled(settings->imagesEnabled()) 73 , m_imagesEnabled(settings->imagesEnabled())
74 , m_defaultVideoPosterURL(settings->defaultVideoPosterURL()) 74 , m_defaultVideoPosterURL(settings->defaultVideoPosterURL())
75 , m_originalLayerSquashingEnabled(settings->layerSquashingEnabled()) 75 , m_originalLayerSquashingEnabled(settings->layerSquashingEnabled())
76 , m_originalPseudoClassesInMatchingCriteriaInAuthorShadowTreesEnabled(Runtim eEnabledFeatures::pseudoClassesInMatchingCriteriaInAuthorShadowTreesEnabled()) 76 , m_originalPseudoClassesInMatchingCriteriaInAuthorShadowTreesEnabled(Runtim eEnabledFeatures::pseudoClassesInMatchingCriteriaInAuthorShadowTreesEnabled())
77 , m_originalImageColorProfilesEnabled(RuntimeEnabledFeatures::imageColorProf ilesEnabled())
77 { 78 {
78 } 79 }
79 80
80 void InternalSettings::Backup::restoreTo(Settings* settings) 81 void InternalSettings::Backup::restoreTo(Settings* settings)
81 { 82 {
82 RuntimeEnabledFeatures::setAuthorShadowDOMForAnyElementEnabled(m_originalAut horShadowDOMForAnyElementEnabled); 83 RuntimeEnabledFeatures::setAuthorShadowDOMForAnyElementEnabled(m_originalAut horShadowDOMForAnyElementEnabled);
83 RuntimeEnabledFeatures::setExperimentalContentSecurityPolicyFeaturesEnabled( m_originalCSP); 84 RuntimeEnabledFeatures::setExperimentalContentSecurityPolicyFeaturesEnabled( m_originalCSP);
84 RuntimeEnabledFeatures::setLaxMixedContentCheckingEnabled(m_originalLaxMixed ContentCheckingEnabled); 85 RuntimeEnabledFeatures::setLaxMixedContentCheckingEnabled(m_originalLaxMixed ContentCheckingEnabled);
85 RuntimeEnabledFeatures::setOverlayScrollbarsEnabled(m_originalOverlayScrollb arsEnabled); 86 RuntimeEnabledFeatures::setOverlayScrollbarsEnabled(m_originalOverlayScrollb arsEnabled);
86 settings->setEditingBehaviorType(m_originalEditingBehavior); 87 settings->setEditingBehaviorType(m_originalEditingBehavior);
87 settings->setTextAutosizingEnabled(m_originalTextAutosizingEnabled); 88 settings->setTextAutosizingEnabled(m_originalTextAutosizingEnabled);
88 settings->setTextAutosizingWindowSizeOverride(m_originalTextAutosizingWindow SizeOverride); 89 settings->setTextAutosizingWindowSizeOverride(m_originalTextAutosizingWindow SizeOverride);
89 settings->setAccessibilityFontScaleFactor(m_originalAccessibilityFontScaleFa ctor); 90 settings->setAccessibilityFontScaleFactor(m_originalAccessibilityFontScaleFa ctor);
90 settings->setMediaTypeOverride(m_originalMediaTypeOverride); 91 settings->setMediaTypeOverride(m_originalMediaTypeOverride);
91 settings->setMockScrollbarsEnabled(m_originalMockScrollbarsEnabled); 92 settings->setMockScrollbarsEnabled(m_originalMockScrollbarsEnabled);
92 settings->setMockGestureTapHighlightsEnabled(m_originalMockGestureTapHighlig htsEnabled); 93 settings->setMockGestureTapHighlightsEnabled(m_originalMockGestureTapHighlig htsEnabled);
93 RuntimeEnabledFeatures::setLangAttributeAwareFormControlUIEnabled(m_langAttr ibuteAwareFormControlUIEnabled); 94 RuntimeEnabledFeatures::setLangAttributeAwareFormControlUIEnabled(m_langAttr ibuteAwareFormControlUIEnabled);
94 settings->setImagesEnabled(m_imagesEnabled); 95 settings->setImagesEnabled(m_imagesEnabled);
95 settings->setDefaultVideoPosterURL(m_defaultVideoPosterURL); 96 settings->setDefaultVideoPosterURL(m_defaultVideoPosterURL);
96 settings->setLayerSquashingEnabled(m_originalLayerSquashingEnabled); 97 settings->setLayerSquashingEnabled(m_originalLayerSquashingEnabled);
97 settings->genericFontFamilySettings().reset(); 98 settings->genericFontFamilySettings().reset();
98 RuntimeEnabledFeatures::setPseudoClassesInMatchingCriteriaInAuthorShadowTree sEnabled(m_originalPseudoClassesInMatchingCriteriaInAuthorShadowTreesEnabled); 99 RuntimeEnabledFeatures::setPseudoClassesInMatchingCriteriaInAuthorShadowTree sEnabled(m_originalPseudoClassesInMatchingCriteriaInAuthorShadowTreesEnabled);
100 RuntimeEnabledFeatures::setImageColorProfilesEnabled(m_originalImageColorPro filesEnabled);
99 } 101 }
100 102
101 #if ENABLE(OILPAN) 103 #if ENABLE(OILPAN)
102 InternalSettings* InternalSettings::from(Page& page) 104 InternalSettings* InternalSettings::from(Page& page)
103 { 105 {
104 if (!HeapSupplement<Page>::from(page, supplementName())) 106 if (!HeapSupplement<Page>::from(page, supplementName()))
105 HeapSupplement<Page>::provideTo(page, supplementName(), new InternalSett ings(page)); 107 HeapSupplement<Page>::provideTo(page, supplementName(), new InternalSett ings(page));
106 return static_cast<InternalSettings*>(HeapSupplement<Page>::from(page, suppl ementName())); 108 return static_cast<InternalSettings*>(HeapSupplement<Page>::from(page, suppl ementName()));
107 } 109 }
108 #else 110 #else
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 void InternalSettings::setLaxMixedContentCheckingEnabled(bool enabled) 192 void InternalSettings::setLaxMixedContentCheckingEnabled(bool enabled)
191 { 193 {
192 RuntimeEnabledFeatures::setLaxMixedContentCheckingEnabled(enabled); 194 RuntimeEnabledFeatures::setLaxMixedContentCheckingEnabled(enabled);
193 } 195 }
194 196
195 void InternalSettings::setPseudoClassesInMatchingCriteriaInAuthorShadowTreesEnab led(bool enabled) 197 void InternalSettings::setPseudoClassesInMatchingCriteriaInAuthorShadowTreesEnab led(bool enabled)
196 { 198 {
197 RuntimeEnabledFeatures::setPseudoClassesInMatchingCriteriaInAuthorShadowTree sEnabled(enabled); 199 RuntimeEnabledFeatures::setPseudoClassesInMatchingCriteriaInAuthorShadowTree sEnabled(enabled);
198 } 200 }
199 201
202 void InternalSettings::setImageColorProfilesEnabled(bool enabled)
203 {
204 RuntimeEnabledFeatures::setImageColorProfilesEnabled(enabled);
205 }
206
200 void InternalSettings::setOverlayScrollbarsEnabled(bool enabled) 207 void InternalSettings::setOverlayScrollbarsEnabled(bool enabled)
201 { 208 {
202 RuntimeEnabledFeatures::setOverlayScrollbarsEnabled(enabled); 209 RuntimeEnabledFeatures::setOverlayScrollbarsEnabled(enabled);
203 } 210 }
204 211
205 void InternalSettings::setViewportEnabled(bool enabled, ExceptionState& exceptio nState) 212 void InternalSettings::setViewportEnabled(bool enabled, ExceptionState& exceptio nState)
206 { 213 {
207 InternalSettingsGuardForSettings(); 214 InternalSettingsGuardForSettings();
208 settings()->setViewportEnabled(enabled); 215 settings()->setViewportEnabled(enabled);
209 } 216 }
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 hoverType = HoverTypeOnDemand; 441 hoverType = HoverTypeOnDemand;
435 else if (token == "hover") 442 else if (token == "hover")
436 hoverType = HoverTypeHover; 443 hoverType = HoverTypeHover;
437 else 444 else
438 exceptionState.throwDOMException(SyntaxError, "The hover type token ('" + token + ")' is invalid."); 445 exceptionState.throwDOMException(SyntaxError, "The hover type token ('" + token + ")' is invalid.");
439 446
440 settings()->setPrimaryHoverType(hoverType); 447 settings()->setPrimaryHoverType(hoverType);
441 } 448 }
442 449
443 } 450 }
OLDNEW
« no previous file with comments | « Source/core/testing/InternalSettings.h ('k') | Source/core/testing/InternalSettings.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698