OLD | NEW |
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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 settings->setEditingBehaviorType(m_originalEditingBehavior); | 87 settings->setEditingBehaviorType(m_originalEditingBehavior); |
88 settings->setTextAutosizingEnabled(m_originalTextAutosizingEnabled); | 88 settings->setTextAutosizingEnabled(m_originalTextAutosizingEnabled); |
89 settings->setTextAutosizingWindowSizeOverride(m_originalTextAutosizingWindow
SizeOverride); | 89 settings->setTextAutosizingWindowSizeOverride(m_originalTextAutosizingWindow
SizeOverride); |
90 settings->setAccessibilityFontScaleFactor(m_originalAccessibilityFontScaleFa
ctor); | 90 settings->setAccessibilityFontScaleFactor(m_originalAccessibilityFontScaleFa
ctor); |
91 settings->setMediaTypeOverride(m_originalMediaTypeOverride); | 91 settings->setMediaTypeOverride(m_originalMediaTypeOverride); |
92 settings->setMockScrollbarsEnabled(m_originalMockScrollbarsEnabled); | 92 settings->setMockScrollbarsEnabled(m_originalMockScrollbarsEnabled); |
93 settings->setMockGestureTapHighlightsEnabled(m_originalMockGestureTapHighlig
htsEnabled); | 93 settings->setMockGestureTapHighlightsEnabled(m_originalMockGestureTapHighlig
htsEnabled); |
94 RuntimeEnabledFeatures::setLangAttributeAwareFormControlUIEnabled(m_langAttr
ibuteAwareFormControlUIEnabled); | 94 RuntimeEnabledFeatures::setLangAttributeAwareFormControlUIEnabled(m_langAttr
ibuteAwareFormControlUIEnabled); |
95 settings->setImagesEnabled(m_imagesEnabled); | 95 settings->setImagesEnabled(m_imagesEnabled); |
96 settings->setDefaultVideoPosterURL(m_defaultVideoPosterURL); | 96 settings->setDefaultVideoPosterURL(m_defaultVideoPosterURL); |
97 settings->setLayerSquashingEnabled(m_originalLayerSquashingEnabled); | |
98 settings->genericFontFamilySettings().reset(); | 97 settings->genericFontFamilySettings().reset(); |
99 RuntimeEnabledFeatures::setPseudoClassesInMatchingCriteriaInAuthorShadowTree
sEnabled(m_originalPseudoClassesInMatchingCriteriaInAuthorShadowTreesEnabled); | 98 RuntimeEnabledFeatures::setPseudoClassesInMatchingCriteriaInAuthorShadowTree
sEnabled(m_originalPseudoClassesInMatchingCriteriaInAuthorShadowTreesEnabled); |
100 RuntimeEnabledFeatures::setImageColorProfilesEnabled(m_originalImageColorPro
filesEnabled); | 99 RuntimeEnabledFeatures::setImageColorProfilesEnabled(m_originalImageColorPro
filesEnabled); |
101 } | 100 } |
102 | 101 |
103 #if ENABLE(OILPAN) | 102 #if ENABLE(OILPAN) |
104 InternalSettings* InternalSettings::from(Page& page) | 103 InternalSettings* InternalSettings::from(Page& page) |
105 { | 104 { |
106 if (!HeapSupplement<Page>::from(page, supplementName())) | 105 if (!HeapSupplement<Page>::from(page, supplementName())) |
107 HeapSupplement<Page>::provideTo(page, supplementName(), new InternalSett
ings(page)); | 106 HeapSupplement<Page>::provideTo(page, supplementName(), new InternalSett
ings(page)); |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 { | 207 { |
209 RuntimeEnabledFeatures::setOverlayScrollbarsEnabled(enabled); | 208 RuntimeEnabledFeatures::setOverlayScrollbarsEnabled(enabled); |
210 } | 209 } |
211 | 210 |
212 void InternalSettings::setViewportEnabled(bool enabled, ExceptionState& exceptio
nState) | 211 void InternalSettings::setViewportEnabled(bool enabled, ExceptionState& exceptio
nState) |
213 { | 212 { |
214 InternalSettingsGuardForSettings(); | 213 InternalSettingsGuardForSettings(); |
215 settings()->setViewportEnabled(enabled); | 214 settings()->setViewportEnabled(enabled); |
216 } | 215 } |
217 | 216 |
218 // FIXME: This is a temporary flag and should be removed once squashing is | |
219 // ready (crbug.com/261605). | |
220 void InternalSettings::setLayerSquashingEnabled(bool enabled, ExceptionState& ex
ceptionState) | |
221 { | |
222 InternalSettingsGuardForSettings(); | |
223 settings()->setLayerSquashingEnabled(enabled); | |
224 } | |
225 | |
226 void InternalSettings::setStandardFontFamily(const AtomicString& family, const S
tring& script, ExceptionState& exceptionState) | 217 void InternalSettings::setStandardFontFamily(const AtomicString& family, const S
tring& script, ExceptionState& exceptionState) |
227 { | 218 { |
228 InternalSettingsGuardForSettings(); | 219 InternalSettingsGuardForSettings(); |
229 UScriptCode code = scriptNameToCode(script); | 220 UScriptCode code = scriptNameToCode(script); |
230 if (code == USCRIPT_INVALID_CODE) | 221 if (code == USCRIPT_INVALID_CODE) |
231 return; | 222 return; |
232 if (settings()->genericFontFamilySettings().updateStandard(family, code)) | 223 if (settings()->genericFontFamilySettings().updateStandard(family, code)) |
233 settings()->notifyGenericFontFamilyChange(); | 224 settings()->notifyGenericFontFamilyChange(); |
234 } | 225 } |
235 | 226 |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 hoverType = HoverTypeOnDemand; | 432 hoverType = HoverTypeOnDemand; |
442 else if (token == "hover") | 433 else if (token == "hover") |
443 hoverType = HoverTypeHover; | 434 hoverType = HoverTypeHover; |
444 else | 435 else |
445 exceptionState.throwDOMException(SyntaxError, "The hover type token ('"
+ token + ")' is invalid."); | 436 exceptionState.throwDOMException(SyntaxError, "The hover type token ('"
+ token + ")' is invalid."); |
446 | 437 |
447 settings()->setPrimaryHoverType(hoverType); | 438 settings()->setPrimaryHoverType(hoverType); |
448 } | 439 } |
449 | 440 |
450 } | 441 } |
OLD | NEW |