2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 #include "BackForwardList.h"
32 #include "FrameTree.h"
33 #include "FrameView.h"
34 #include "HistoryItem.h"
36 #include "PageCache.h"
37 #include "StorageMap.h"
44 static void setNeedsReapplyStylesInAllFrames(Page* page)
46 for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()->traverseNext())
47 frame->setNeedsReapplyStyles();
51 bool Settings::gShouldPaintNativeControls = true;
54 #if PLATFORM(WIN) || (OS(WINDOWS) && PLATFORM(WX))
55 bool Settings::gShouldUseHighResolutionTimers = true;
58 Settings::Settings(Page* page)
61 , m_layoutAlgorithm(kLayoutFitColumnToScreen)
63 , m_editableLinkBehavior(EditableLinkDefaultBehavior)
64 , m_textDirectionSubmenuInclusionBehavior(TextDirectionSubmenuAutomaticallyIncluded)
65 , m_minimumFontSize(0)
66 , m_minimumLogicalFontSize(0)
67 , m_defaultFontSize(0)
68 , m_defaultFixedFontSize(0)
70 , m_useWideViewport(false)
72 #ifdef ANDROID_MULTIPLE_WINDOWS
73 , m_supportMultipleWindows(true)
75 #ifdef ANDROID_BLOCK_NETWORK_IMAGE
76 , m_blockNetworkImage(false)
78 , m_maximumDecodedImageSize(numeric_limits<size_t>::max())
79 #if ENABLE(DOM_STORAGE)
80 , m_localStorageQuota(5 * 1024 * 1024) // Suggested by the HTML5 spec.
81 , m_sessionStorageQuota(StorageMap::noQuota)
83 , m_pluginAllowedRunTime(numeric_limits<unsigned>::max())
84 , m_zoomMode(ZoomPage)
85 , m_isSpatialNavigationEnabled(false)
86 , m_isJavaEnabled(false)
87 , m_loadsImagesAutomatically(false)
88 , m_privateBrowsingEnabled(false)
89 , m_caretBrowsingEnabled(false)
90 , m_areImagesEnabled(true)
91 , m_isMediaEnabled(true)
92 , m_arePluginsEnabled(false)
93 , m_localStorageEnabled(false)
94 , m_isJavaScriptEnabled(false)
95 , m_isWebSecurityEnabled(true)
96 , m_allowUniversalAccessFromFileURLs(true)
97 , m_allowFileAccessFromFileURLs(true)
98 , m_javaScriptCanOpenWindowsAutomatically(false)
99 , m_javaScriptCanAccessClipboard(false)
100 , m_shouldPrintBackgrounds(false)
101 , m_textAreasAreResizable(false)
102 #if ENABLE(DASHBOARD_SUPPORT)
103 , m_usesDashboardBackwardCompatibilityMode(false)
105 , m_needsAdobeFrameReloadingQuirk(false)
106 , m_needsKeyboardEventDisambiguationQuirks(false)
107 , m_treatsAnyTextCSSLinkAsStylesheet(false)
108 , m_needsLeopardMailQuirks(false)
109 , m_needsTigerMailQuirks(false)
110 , m_isDOMPasteAllowed(false)
111 , m_shrinksStandaloneImagesToFit(true)
112 , m_usesPageCache(false)
113 , m_showsURLsInToolTips(false)
114 , m_forceFTPDirectoryListings(false)
115 , m_developerExtrasEnabled(false)
116 , m_authorAndUserStylesEnabled(true)
117 , m_needsSiteSpecificQuirks(false)
118 , m_fontRenderingMode(0)
119 , m_frameFlatteningEnabled(false)
120 , m_webArchiveDebugModeEnabled(false)
121 , m_localFileContentSniffingEnabled(false)
122 , m_inApplicationChromeMode(false)
123 , m_offlineWebApplicationCacheEnabled(false)
124 , m_shouldPaintCustomScrollbars(false)
125 , m_enforceCSSMIMETypeInStrictMode(true)
126 , m_usesEncodingDetector(false)
127 , m_allowScriptsToCloseWindows(false)
129 #if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))
130 // (PLATFORM(MAC) is always false in Chromium, hence the extra condition.)
133 EditingWindowsBehavior
136 // FIXME: This should really be disabled by default as it makes platforms that don't support the feature download files
137 // they can't use by. Leaving enabled for now to not change existing behavior.
138 , m_downloadableBinaryFontsEnabled(true)
139 , m_xssAuditorEnabled(false)
140 , m_acceleratedCompositingEnabled(true)
141 , m_showDebugBorders(false)
142 , m_showRepaintCounter(false)
143 , m_experimentalNotificationsEnabled(false)
144 , m_webGLEnabled(false)
145 , m_loadDeferringEnabled(true)
146 , m_tiledBackingStoreEnabled(false)
148 #ifdef ANDROID_PLUGINS
149 , m_pluginsOnDemand(false)
152 , m_html5ParserEnabled(false)
153 >>>>>>> webkit.org at r60074
155 // A Frame may not have been created yet, so we initialize the AtomicString
156 // hash before trying to use it.
157 AtomicString::init();
158 #ifdef ANDROID_META_SUPPORT
159 resetMetadataSettings();
163 void Settings::setStandardFontFamily(const AtomicString& standardFontFamily)
165 if (standardFontFamily == m_standardFontFamily)
168 m_standardFontFamily = standardFontFamily;
169 setNeedsReapplyStylesInAllFrames(m_page);
172 void Settings::setFixedFontFamily(const AtomicString& fixedFontFamily)
174 if (m_fixedFontFamily == fixedFontFamily)
177 m_fixedFontFamily = fixedFontFamily;
178 setNeedsReapplyStylesInAllFrames(m_page);
181 void Settings::setSerifFontFamily(const AtomicString& serifFontFamily)
183 if (m_serifFontFamily == serifFontFamily)
186 m_serifFontFamily = serifFontFamily;
187 setNeedsReapplyStylesInAllFrames(m_page);
190 void Settings::setSansSerifFontFamily(const AtomicString& sansSerifFontFamily)
192 if (m_sansSerifFontFamily == sansSerifFontFamily)
195 m_sansSerifFontFamily = sansSerifFontFamily;
196 setNeedsReapplyStylesInAllFrames(m_page);
199 void Settings::setCursiveFontFamily(const AtomicString& cursiveFontFamily)
201 if (m_cursiveFontFamily == cursiveFontFamily)
204 m_cursiveFontFamily = cursiveFontFamily;
205 setNeedsReapplyStylesInAllFrames(m_page);
208 void Settings::setFantasyFontFamily(const AtomicString& fantasyFontFamily)
210 if (m_fantasyFontFamily == fantasyFontFamily)
213 m_fantasyFontFamily = fantasyFontFamily;
214 setNeedsReapplyStylesInAllFrames(m_page);
217 void Settings::setMinimumFontSize(int minimumFontSize)
219 if (m_minimumFontSize == minimumFontSize)
222 m_minimumFontSize = minimumFontSize;
223 setNeedsReapplyStylesInAllFrames(m_page);
226 void Settings::setMinimumLogicalFontSize(int minimumLogicalFontSize)
228 if (m_minimumLogicalFontSize == minimumLogicalFontSize)
231 m_minimumLogicalFontSize = minimumLogicalFontSize;
232 setNeedsReapplyStylesInAllFrames(m_page);
235 void Settings::setDefaultFontSize(int defaultFontSize)
237 if (m_defaultFontSize == defaultFontSize)
240 m_defaultFontSize = defaultFontSize;
241 setNeedsReapplyStylesInAllFrames(m_page);
244 void Settings::setDefaultFixedFontSize(int defaultFontSize)
246 if (m_defaultFixedFontSize == defaultFontSize)
249 m_defaultFixedFontSize = defaultFontSize;
250 setNeedsReapplyStylesInAllFrames(m_page);
253 #ifdef ANDROID_BLOCK_NETWORK_IMAGE
254 void Settings::setBlockNetworkImage(bool blockNetworkImage)
256 m_blockNetworkImage = blockNetworkImage;
260 void Settings::setLoadsImagesAutomatically(bool loadsImagesAutomatically)
262 m_loadsImagesAutomatically = loadsImagesAutomatically;
265 void Settings::setJavaScriptEnabled(bool isJavaScriptEnabled)
267 m_isJavaScriptEnabled = isJavaScriptEnabled;
270 void Settings::setWebSecurityEnabled(bool isWebSecurityEnabled)
272 m_isWebSecurityEnabled = isWebSecurityEnabled;
275 void Settings::setAllowUniversalAccessFromFileURLs(bool allowUniversalAccessFromFileURLs)
277 m_allowUniversalAccessFromFileURLs = allowUniversalAccessFromFileURLs;
280 void Settings::setAllowFileAccessFromFileURLs(bool allowFileAccessFromFileURLs)
282 m_allowFileAccessFromFileURLs = allowFileAccessFromFileURLs;
285 void Settings::setSpatialNavigationEnabled(bool isSpatialNavigationEnabled)
287 m_isSpatialNavigationEnabled = isSpatialNavigationEnabled;
290 void Settings::setJavaEnabled(bool isJavaEnabled)
292 m_isJavaEnabled = isJavaEnabled;
295 void Settings::setImagesEnabled(bool areImagesEnabled)
297 m_areImagesEnabled = areImagesEnabled;
300 void Settings::setMediaEnabled(bool isMediaEnabled)
302 m_isMediaEnabled = isMediaEnabled;
305 void Settings::setPluginsEnabled(bool arePluginsEnabled)
307 m_arePluginsEnabled = arePluginsEnabled;
310 void Settings::setLocalStorageEnabled(bool localStorageEnabled)
312 m_localStorageEnabled = localStorageEnabled;
315 #if ENABLE(DOM_STORAGE)
316 void Settings::setLocalStorageQuota(unsigned localStorageQuota)
318 m_localStorageQuota = localStorageQuota;
321 void Settings::setSessionStorageQuota(unsigned sessionStorageQuota)
323 m_sessionStorageQuota = sessionStorageQuota;
327 void Settings::setPrivateBrowsingEnabled(bool privateBrowsingEnabled)
329 if (m_privateBrowsingEnabled == privateBrowsingEnabled)
332 m_privateBrowsingEnabled = privateBrowsingEnabled;
333 m_page->privateBrowsingStateChanged();
336 void Settings::setJavaScriptCanOpenWindowsAutomatically(bool javaScriptCanOpenWindowsAutomatically)
338 m_javaScriptCanOpenWindowsAutomatically = javaScriptCanOpenWindowsAutomatically;
341 void Settings::setJavaScriptCanAccessClipboard(bool javaScriptCanAccessClipboard)
343 m_javaScriptCanAccessClipboard = javaScriptCanAccessClipboard;
346 void Settings::setDefaultTextEncodingName(const String& defaultTextEncodingName)
348 m_defaultTextEncodingName = defaultTextEncodingName;
351 void Settings::setUserStyleSheetLocation(const KURL& userStyleSheetLocation)
353 if (m_userStyleSheetLocation == userStyleSheetLocation)
356 m_userStyleSheetLocation = userStyleSheetLocation;
358 m_page->userStyleSheetLocationChanged();
361 void Settings::setShouldPrintBackgrounds(bool shouldPrintBackgrounds)
363 m_shouldPrintBackgrounds = shouldPrintBackgrounds;
366 void Settings::setTextAreasAreResizable(bool textAreasAreResizable)
368 if (m_textAreasAreResizable == textAreasAreResizable)
371 m_textAreasAreResizable = textAreasAreResizable;
372 setNeedsReapplyStylesInAllFrames(m_page);
375 void Settings::setEditableLinkBehavior(EditableLinkBehavior editableLinkBehavior)
377 m_editableLinkBehavior = editableLinkBehavior;
380 void Settings::setTextDirectionSubmenuInclusionBehavior(TextDirectionSubmenuInclusionBehavior behavior)
382 m_textDirectionSubmenuInclusionBehavior = behavior;
385 #if ENABLE(DASHBOARD_SUPPORT)
386 void Settings::setUsesDashboardBackwardCompatibilityMode(bool usesDashboardBackwardCompatibilityMode)
388 m_usesDashboardBackwardCompatibilityMode = usesDashboardBackwardCompatibilityMode;
392 // FIXME: This quirk is needed because of Radar 4674537 and 5211271. We need to phase it out once Adobe
393 // can fix the bug from their end.
394 void Settings::setNeedsAdobeFrameReloadingQuirk(bool shouldNotReloadIFramesForUnchangedSRC)
396 m_needsAdobeFrameReloadingQuirk = shouldNotReloadIFramesForUnchangedSRC;
399 // This is a quirk we are pro-actively applying to old applications. It changes keyboard event dispatching,
400 // making keyIdentifier available on keypress events, making charCode available on keydown/keyup events,
401 // and getting keypress dispatched in more cases.
402 void Settings::setNeedsKeyboardEventDisambiguationQuirks(bool needsQuirks)
404 m_needsKeyboardEventDisambiguationQuirks = needsQuirks;
407 void Settings::setTreatsAnyTextCSSLinkAsStylesheet(bool treatsAnyTextCSSLinkAsStylesheet)
409 m_treatsAnyTextCSSLinkAsStylesheet = treatsAnyTextCSSLinkAsStylesheet;
412 void Settings::setNeedsLeopardMailQuirks(bool needsQuirks)
414 m_needsLeopardMailQuirks = needsQuirks;
417 void Settings::setNeedsTigerMailQuirks(bool needsQuirks)
419 m_needsTigerMailQuirks = needsQuirks;
422 void Settings::setDOMPasteAllowed(bool DOMPasteAllowed)
424 m_isDOMPasteAllowed = DOMPasteAllowed;
427 void Settings::setUsesPageCache(bool usesPageCache)
429 if (m_usesPageCache == usesPageCache)
432 m_usesPageCache = usesPageCache;
433 if (!m_usesPageCache) {
434 HistoryItemVector& historyItems = m_page->backForwardList()->entries();
435 for (unsigned i = 0; i < historyItems.size(); i++)
436 pageCache()->remove(historyItems[i].get());
437 pageCache()->releaseAutoreleasedPagesNow();
441 void Settings::setShrinksStandaloneImagesToFit(bool shrinksStandaloneImagesToFit)
443 m_shrinksStandaloneImagesToFit = shrinksStandaloneImagesToFit;
446 void Settings::setShowsURLsInToolTips(bool showsURLsInToolTips)
448 m_showsURLsInToolTips = showsURLsInToolTips;
451 void Settings::setFTPDirectoryTemplatePath(const String& path)
453 m_ftpDirectoryTemplatePath = path;
456 void Settings::setForceFTPDirectoryListings(bool force)
458 m_forceFTPDirectoryListings = force;
461 void Settings::setDeveloperExtrasEnabled(bool developerExtrasEnabled)
463 m_developerExtrasEnabled = developerExtrasEnabled;
466 #ifdef ANDROID_META_SUPPORT
467 void Settings::resetMetadataSettings()
469 m_viewport_width = -1;
470 m_viewport_height = -1;
471 m_viewport_initial_scale = 0;
472 m_viewport_minimum_scale = 0;
473 m_viewport_maximum_scale = 0;
474 m_viewport_user_scalable = true;
475 m_viewport_target_densitydpi = -1;
476 m_format_detection_telephone = true;
477 m_format_detection_address = true;
478 m_format_detection_email = true;
481 void Settings::setMetadataSettings(const String& key, const String& value)
483 if (key == "width") {
484 if (value == "device-width") {
485 m_viewport_width = 0;
487 int width = value.toInt();
488 if (width <= 10000) {
490 // This is a hack to accommodate the pages designed for the
491 // original iPhone. The new version, since 10/2007, is to
492 // use device-width which works for both portrait and
494 m_viewport_width = 0;
496 m_viewport_width = width;
500 } else if (key == "height") {
501 if (value == "device-height") {
502 m_viewport_height = 0;
504 int height = value.toInt();
505 if (height >= 200 && height <= 10000) {
506 m_viewport_height = height;
509 } else if (key == "initial-scale") {
510 int scale = int(value.toFloat() * 100);
511 if (scale >= 1 && scale <= 1000) {
512 m_viewport_initial_scale = scale;
514 } else if (key == "minimum-scale") {
515 int scale = int(value.toFloat() * 100);
516 if (scale >= 1 && scale <= 1000) {
517 m_viewport_minimum_scale = scale;
519 } else if (key == "maximum-scale") {
520 int scale = int(value.toFloat() * 100);
521 if (scale >= 1 && scale <= 1000) {
522 m_viewport_maximum_scale = scale;
524 } else if (key == "user-scalable") {
525 // even Apple doc says using "no", "0" is common in the real world, and
526 // some sites, e.g. gomoviesapp.com, use "false".
527 if (value == "no" || value == "0" || value == "false") {
528 m_viewport_user_scalable = false;
530 } else if (key == "target-densitydpi") {
531 if (value == "device-dpi") {
532 m_viewport_target_densitydpi = 0;
533 } else if (value == "low-dpi") {
534 m_viewport_target_densitydpi = 120;
535 } else if (value == "medium-dpi") {
536 m_viewport_target_densitydpi = 160;
537 } else if (value == "high-dpi") {
538 m_viewport_target_densitydpi = 240;
540 int dpi = value.toInt();
541 if (dpi >= 70 && dpi <= 400) {
542 m_viewport_target_densitydpi = dpi;
545 } else if (key == "telephone") {
547 m_format_detection_telephone = false;
549 } else if (key == "address") {
551 m_format_detection_address = false;
553 } else if (key == "email") {
555 m_format_detection_email = false;
557 } else if (key == "format-detection") {
558 // even Apple doc says "format-detection" should be the name of the
559 // <meta> tag. In the real world, e.g. amazon.com, use
560 // "format-detection=no" in the "viewport" <meta> tag to disable all
563 m_format_detection_telephone = false;
564 m_format_detection_address = false;
565 m_format_detection_email = false;
570 void Settings::setViewportWidth(int width)
572 if (width < 0 || width > 10000)
573 m_viewport_width = -1;
575 m_viewport_width = width;
578 void Settings::setViewportHeight(int height)
580 if (height < 0 || height > 10000)
581 m_viewport_height = -1;
583 m_viewport_height = height;
586 void Settings::setViewportInitialScale(int scale)
588 if (scale < 1 || scale > 1000)
589 m_viewport_initial_scale = 0;
591 m_viewport_initial_scale = scale;
594 void Settings::setViewportMinimumScale(int scale)
596 if (scale < 1 || scale > 1000)
597 m_viewport_minimum_scale = 0;
599 m_viewport_minimum_scale = scale;
602 void Settings::setViewportMaximumScale(int scale)
604 if (scale < 1 || scale > 1000)
605 m_viewport_maximum_scale = 0;
607 m_viewport_maximum_scale = scale;
610 void Settings::setViewportUserScalable(bool scalable)
612 m_viewport_user_scalable = scalable;
615 void Settings::setViewportTargetDensityDpi(int dpi)
617 if (dpi < 0 || dpi > 400)
618 m_viewport_target_densitydpi = -1;
620 m_viewport_target_densitydpi = dpi;
623 void Settings::setFormatDetectionAddress(bool detect)
625 m_format_detection_address = detect;
628 void Settings::setFormatDetectionEmail(bool detect)
630 m_format_detection_email = detect;
633 void Settings::setFormatDetectionTelephone(bool detect)
635 m_format_detection_telephone = detect;
639 void Settings::setAuthorAndUserStylesEnabled(bool authorAndUserStylesEnabled)
641 if (m_authorAndUserStylesEnabled == authorAndUserStylesEnabled)
644 m_authorAndUserStylesEnabled = authorAndUserStylesEnabled;
645 setNeedsReapplyStylesInAllFrames(m_page);
648 void Settings::setFontRenderingMode(FontRenderingMode mode)
650 if (fontRenderingMode() == mode)
652 m_fontRenderingMode = mode;
653 setNeedsReapplyStylesInAllFrames(m_page);
656 FontRenderingMode Settings::fontRenderingMode() const
658 return static_cast<FontRenderingMode>(m_fontRenderingMode);
661 void Settings::setNeedsSiteSpecificQuirks(bool needsQuirks)
663 m_needsSiteSpecificQuirks = needsQuirks;
666 void Settings::setFrameFlatteningEnabled(bool frameFlatteningEnabled)
668 m_frameFlatteningEnabled = frameFlatteningEnabled;
671 void Settings::setWebArchiveDebugModeEnabled(bool enabled)
673 m_webArchiveDebugModeEnabled = enabled;
676 void Settings::setLocalFileContentSniffingEnabled(bool enabled)
678 m_localFileContentSniffingEnabled = enabled;
681 void Settings::setLocalStorageDatabasePath(const String& path)
683 m_localStorageDatabasePath = path;
686 void Settings::setApplicationChromeMode(bool mode)
688 m_inApplicationChromeMode = mode;
691 void Settings::setOfflineWebApplicationCacheEnabled(bool enabled)
693 m_offlineWebApplicationCacheEnabled = enabled;
696 void Settings::setShouldPaintCustomScrollbars(bool shouldPaintCustomScrollbars)
698 m_shouldPaintCustomScrollbars = shouldPaintCustomScrollbars;
701 void Settings::setZoomMode(ZoomMode mode)
703 if (mode == m_zoomMode)
707 setNeedsReapplyStylesInAllFrames(m_page);
710 void Settings::setEnforceCSSMIMETypeInStrictMode(bool enforceCSSMIMETypeInStrictMode)
712 m_enforceCSSMIMETypeInStrictMode = enforceCSSMIMETypeInStrictMode;
715 #if USE(SAFARI_THEME)
716 void Settings::setShouldPaintNativeControls(bool shouldPaintNativeControls)
718 gShouldPaintNativeControls = shouldPaintNativeControls;
722 void Settings::setUsesEncodingDetector(bool usesEncodingDetector)
724 m_usesEncodingDetector = usesEncodingDetector;
727 void Settings::setAllowScriptsToCloseWindows(bool allowScriptsToCloseWindows)
729 m_allowScriptsToCloseWindows = allowScriptsToCloseWindows;
732 void Settings::setCaretBrowsingEnabled(bool caretBrowsingEnabled)
734 m_caretBrowsingEnabled = caretBrowsingEnabled;
737 void Settings::setDownloadableBinaryFontsEnabled(bool downloadableBinaryFontsEnabled)
739 m_downloadableBinaryFontsEnabled = downloadableBinaryFontsEnabled;
742 void Settings::setXSSAuditorEnabled(bool xssAuditorEnabled)
744 m_xssAuditorEnabled = xssAuditorEnabled;
747 void Settings::setAcceleratedCompositingEnabled(bool enabled)
749 if (m_acceleratedCompositingEnabled == enabled)
752 m_acceleratedCompositingEnabled = enabled;
753 setNeedsReapplyStylesInAllFrames(m_page);
756 void Settings::setShowDebugBorders(bool enabled)
758 if (m_showDebugBorders == enabled)
761 m_showDebugBorders = enabled;
762 setNeedsReapplyStylesInAllFrames(m_page);
765 void Settings::setShowRepaintCounter(bool enabled)
767 if (m_showRepaintCounter == enabled)
770 m_showRepaintCounter = enabled;
771 setNeedsReapplyStylesInAllFrames(m_page);
774 void Settings::setExperimentalNotificationsEnabled(bool enabled)
776 m_experimentalNotificationsEnabled = enabled;
779 void Settings::setPluginAllowedRunTime(unsigned runTime)
781 m_pluginAllowedRunTime = runTime;
782 m_page->pluginAllowedRunTimeChanged();
785 #if PLATFORM(WIN) || (OS(WINDOWS) && PLATFORM(WX))
786 void Settings::setShouldUseHighResolutionTimers(bool shouldUseHighResolutionTimers)
788 gShouldUseHighResolutionTimers = shouldUseHighResolutionTimers;
792 void Settings::setWebGLEnabled(bool enabled)
794 m_webGLEnabled = enabled;
797 void Settings::setLoadDeferringEnabled(bool enabled)
799 m_loadDeferringEnabled = enabled;
802 void Settings::setTiledBackingStoreEnabled(bool enabled)
804 m_tiledBackingStoreEnabled = enabled;
805 #if ENABLE(TILED_BACKING_STORE)
806 if (m_page->mainFrame())
807 m_page->mainFrame()->setTiledBackingStoreEnabled(enabled);
811 } // namespace WebCore