2 * Copyright (C) 2006, 2007, 2008, 2009, 2011, 2012 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 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 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 "AudioSession.h"
30 #include "BackForwardController.h"
31 #include "CachedResourceLoader.h"
32 #include "CookieStorage.h"
36 #include "FontCascade.h"
37 #include "FontGenericFamilies.h"
38 #include "FrameTree.h"
39 #include "FrameView.h"
40 #include "HTMLMediaElement.h"
41 #include "HistoryItem.h"
42 #include "InspectorInstrumentation.h"
43 #include "MainFrame.h"
45 #include "PageCache.h"
46 #include "RuntimeApplicationChecks.h"
47 #include "StorageMap.h"
49 #include <wtf/NeverDestroyed.h>
50 #include <wtf/StdLibExtras.h>
52 #if ENABLE(MEDIA_STREAM)
53 #include "MockRealtimeMediaSourceCenter.h"
58 static void setImageLoadingSettings(Page* page)
63 for (Frame* frame = &page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
64 if (!frame->document())
66 frame->document()->cachedResourceLoader().setImagesEnabled(page->settings().areImagesEnabled());
67 frame->document()->cachedResourceLoader().setAutoLoadImages(page->settings().loadsImagesAutomatically());
71 static void invalidateAfterGenericFamilyChange(Page* page)
73 invalidateFontCascadeCache();
75 page->setNeedsRecalcStyleInAllFrames();
79 bool Settings::gAVFoundationEnabled = true;
80 bool Settings::gAVFoundationNSURLSessionEnabled = true;
84 bool Settings::gQTKitEnabled = false;
87 bool Settings::gMockScrollbarsEnabled = false;
88 bool Settings::gUsesOverlayScrollbars = false;
89 bool Settings::gMockScrollAnimatorEnabled = false;
91 #if ENABLE(MEDIA_STREAM)
92 bool Settings::gMockCaptureDevicesEnabled = false;
93 bool Settings::gMediaCaptureRequiresSecureConnection = true;
97 bool Settings::gShouldUseHighResolutionTimers = true;
100 bool Settings::gShouldRespectPriorityInCSSAttributeSetters = false;
101 bool Settings::gLowPowerVideoAudioBufferSizeEnabled = false;
102 bool Settings::gResourceLoadStatisticsEnabledEnabled = false;
103 bool Settings::gAllowsAnySSLCertificate = false;
106 bool Settings::gNetworkDataUsageTrackingEnabled = false;
107 bool Settings::gAVKitEnabled = false;
108 bool Settings::gShouldOptOutOfNetworkStateObservation = false;
109 bool Settings::gManageAudioSession = false;
113 // 1) EditingMacBehavior comprises Tiger, Leopard, SnowLeopard and iOS builds, as well as QtWebKit when built on Mac;
114 // 2) EditingWindowsBehavior comprises Win32 build;
115 // 3) EditingUnixBehavior comprises all unix-based systems, but Darwin/MacOS (and then abusing the terminology);
116 // 99) MacEditingBehavior is used as a fallback.
117 static EditingBehaviorType editingBehaviorTypeForPlatform()
125 EditingWindowsBehavior
136 static const bool defaultYouTubeFlashPluginReplacementEnabled = true;
138 static const bool defaultYouTubeFlashPluginReplacementEnabled = false;
142 static const bool defaultFixedPositionCreatesStackingContext = true;
143 static const bool defaultFixedBackgroundsPaintRelativeToDocument = true;
144 static const bool defaultAcceleratedCompositingForFixedPositionEnabled = true;
145 static const bool defaultAllowsInlineMediaPlayback = false;
146 static const bool defaultInlineMediaPlaybackRequiresPlaysInlineAttribute = true;
147 static const bool defaultVideoPlaybackRequiresUserGesture = true;
148 static const bool defaultAudioPlaybackRequiresUserGesture = true;
149 static const bool defaultMediaDataLoadsAutomatically = false;
150 static const bool defaultShouldRespectImageOrientation = true;
151 static const bool defaultImageSubsamplingEnabled = true;
152 static const bool defaultScrollingTreeIncludesFrames = true;
153 static const bool defaultMediaControlsScaleWithPageZoom = true;
154 static const bool defaultQuickTimePluginReplacementEnabled = true;
156 static const bool defaultFixedPositionCreatesStackingContext = false;
157 static const bool defaultFixedBackgroundsPaintRelativeToDocument = false;
158 static const bool defaultAcceleratedCompositingForFixedPositionEnabled = false;
159 static const bool defaultAllowsInlineMediaPlayback = true;
160 static const bool defaultInlineMediaPlaybackRequiresPlaysInlineAttribute = false;
161 static const bool defaultVideoPlaybackRequiresUserGesture = false;
162 static const bool defaultAudioPlaybackRequiresUserGesture = false;
163 static const bool defaultMediaDataLoadsAutomatically = true;
164 static const bool defaultShouldRespectImageOrientation = false;
165 static const bool defaultImageSubsamplingEnabled = false;
166 static const bool defaultScrollingTreeIncludesFrames = false;
167 static const bool defaultMediaControlsScaleWithPageZoom = true;
168 static const bool defaultQuickTimePluginReplacementEnabled = false;
171 static const bool defaultRequiresUserGestureToLoadVideo = true;
173 static const bool defaultAllowsPictureInPictureMediaPlayback = true;
175 static const double defaultIncrementalRenderingSuppressionTimeoutInSeconds = 5;
176 #if USE(UNIFIED_TEXT_CHECKING)
177 static const bool defaultUnifiedTextCheckerEnabled = true;
179 static const bool defaultUnifiedTextCheckerEnabled = false;
181 static const bool defaultSmartInsertDeleteEnabled = true;
182 static const bool defaultSelectTrailingWhitespaceEnabled = false;
184 // This amount of time must have elapsed before we will even consider scheduling a layout without a delay.
185 // FIXME: For faster machines this value can really be lowered to 200. 250 is adequate, but a little high
187 static const auto layoutScheduleThreshold = 250ms;
189 Settings::Settings(Page* page)
191 , m_mediaTypeOverride("screen")
192 , m_fontGenericFamilies(std::make_unique<FontGenericFamilies>())
193 , m_storageBlockingPolicy(SecurityOrigin::AllowAllStorage)
194 , m_layoutInterval(layoutScheduleThreshold)
195 , m_minimumDOMTimerInterval(DOMTimer::defaultMinimumInterval())
196 SETTINGS_INITIALIZER_LIST
197 , m_isJavaEnabled(false)
198 , m_isJavaEnabledForLocalFiles(true)
199 , m_loadsImagesAutomatically(false)
200 , m_areImagesEnabled(true)
201 , m_preferMIMETypeForImages(false)
202 , m_arePluginsEnabled(false)
203 , m_isScriptEnabled(false)
204 , m_needsAdobeFrameReloadingQuirk(false)
205 , m_usesPageCache(false)
206 , m_fontRenderingMode(0)
207 , m_showTiledScrollingIndicator(false)
208 , m_backgroundShouldExtendBeyondPage(false)
209 , m_dnsPrefetchingEnabled(false)
210 #if ENABLE(TOUCH_EVENTS)
211 , m_touchEventEmulationEnabled(false)
213 , m_scrollingPerformanceLoggingEnabled(false)
214 , m_timeWithoutMouseMovementBeforeHidingControls(3)
215 , m_setImageLoadingSettingsTimer(*this, &Settings::imageLoadingSettingsTimerFired)
216 , m_hiddenPageDOMTimerThrottlingEnabled(false)
217 , m_hiddenPageCSSAnimationSuspensionEnabled(false)
218 , m_fontFallbackPrefersPictographs(false)
219 , m_webFontsAlwaysFallBack(false)
220 , m_forcePendingWebGLPolicy(false)
222 // A Frame may not have been created yet, so we initialize the AtomicString
223 // hash before trying to use it.
224 AtomicString::init();
225 initializeDefaultFontFamilies();
226 m_page = page; // Page is not yet fully initialized when constructing Settings, so keeping m_page null over initializeDefaultFontFamilies() call.
229 Settings::~Settings()
233 Ref<Settings> Settings::create(Page* page)
235 return adoptRef(*new Settings(page));
238 SETTINGS_SETTER_BODIES
241 void Settings::initializeDefaultFontFamilies()
243 // Other platforms can set up fonts from a client, but on Mac, we want it in WebCore to share code between WebKit1 and WebKit2.
247 const AtomicString& Settings::standardFontFamily(UScriptCode script) const
249 return m_fontGenericFamilies->standardFontFamily(script);
252 void Settings::setStandardFontFamily(const AtomicString& family, UScriptCode script)
254 bool changes = m_fontGenericFamilies->setStandardFontFamily(family, script);
256 invalidateAfterGenericFamilyChange(m_page);
259 const AtomicString& Settings::fixedFontFamily(UScriptCode script) const
261 return m_fontGenericFamilies->fixedFontFamily(script);
264 void Settings::setFixedFontFamily(const AtomicString& family, UScriptCode script)
266 bool changes = m_fontGenericFamilies->setFixedFontFamily(family, script);
268 invalidateAfterGenericFamilyChange(m_page);
271 const AtomicString& Settings::serifFontFamily(UScriptCode script) const
273 return m_fontGenericFamilies->serifFontFamily(script);
276 void Settings::setSerifFontFamily(const AtomicString& family, UScriptCode script)
278 bool changes = m_fontGenericFamilies->setSerifFontFamily(family, script);
280 invalidateAfterGenericFamilyChange(m_page);
283 const AtomicString& Settings::sansSerifFontFamily(UScriptCode script) const
285 return m_fontGenericFamilies->sansSerifFontFamily(script);
288 void Settings::setSansSerifFontFamily(const AtomicString& family, UScriptCode script)
290 bool changes = m_fontGenericFamilies->setSansSerifFontFamily(family, script);
292 invalidateAfterGenericFamilyChange(m_page);
295 const AtomicString& Settings::cursiveFontFamily(UScriptCode script) const
297 return m_fontGenericFamilies->cursiveFontFamily(script);
300 void Settings::setCursiveFontFamily(const AtomicString& family, UScriptCode script)
302 bool changes = m_fontGenericFamilies->setCursiveFontFamily(family, script);
304 invalidateAfterGenericFamilyChange(m_page);
307 const AtomicString& Settings::fantasyFontFamily(UScriptCode script) const
309 return m_fontGenericFamilies->fantasyFontFamily(script);
312 void Settings::setFantasyFontFamily(const AtomicString& family, UScriptCode script)
314 bool changes = m_fontGenericFamilies->setFantasyFontFamily(family, script);
316 invalidateAfterGenericFamilyChange(m_page);
319 const AtomicString& Settings::pictographFontFamily(UScriptCode script) const
321 return m_fontGenericFamilies->pictographFontFamily(script);
324 void Settings::setPictographFontFamily(const AtomicString& family, UScriptCode script)
326 bool changes = m_fontGenericFamilies->setPictographFontFamily(family, script);
328 invalidateAfterGenericFamilyChange(m_page);
331 float Settings::defaultMinimumZoomFontSize()
337 bool Settings::defaultTextAutosizingEnabled()
343 void Settings::setMediaTypeOverride(const String& mediaTypeOverride)
345 if (m_mediaTypeOverride == mediaTypeOverride)
348 m_mediaTypeOverride = mediaTypeOverride;
353 FrameView* view = m_page->mainFrame().view();
356 view->setMediaType(mediaTypeOverride);
357 m_page->setNeedsRecalcStyleInAllFrames();
360 void Settings::setLoadsImagesAutomatically(bool loadsImagesAutomatically)
362 m_loadsImagesAutomatically = loadsImagesAutomatically;
364 // Changing this setting to true might immediately start new loads for images that had previously had loading disabled.
365 // If this happens while a WebView is being dealloc'ed, and we don't know the WebView is being dealloc'ed, these new loads
366 // can cause crashes downstream when the WebView memory has actually been free'd.
367 // One example where this can happen is in Mac apps that subclass WebView then do work in their overridden dealloc methods.
368 // Starting these loads synchronously is not important. By putting it on a 0-delay, properly closing the Page cancels them
369 // before they have a chance to really start.
370 // See http://webkit.org/b/60572 for more discussion.
371 m_setImageLoadingSettingsTimer.startOneShot(0);
374 void Settings::imageLoadingSettingsTimerFired()
376 setImageLoadingSettings(m_page);
379 void Settings::setScriptEnabled(bool isScriptEnabled)
381 if (m_isScriptEnabled == isScriptEnabled)
384 m_isScriptEnabled = isScriptEnabled;
390 m_page->setNeedsRecalcStyleInAllFrames();
392 InspectorInstrumentation::scriptsEnabled(*m_page, m_isScriptEnabled);
395 void Settings::setJavaEnabled(bool isJavaEnabled)
397 m_isJavaEnabled = isJavaEnabled;
400 void Settings::setJavaEnabledForLocalFiles(bool isJavaEnabledForLocalFiles)
402 m_isJavaEnabledForLocalFiles = isJavaEnabledForLocalFiles;
405 void Settings::setImagesEnabled(bool areImagesEnabled)
407 m_areImagesEnabled = areImagesEnabled;
409 // See comment in setLoadsImagesAutomatically.
410 m_setImageLoadingSettingsTimer.startOneShot(0);
413 void Settings::setPreferMIMETypeForImages(bool preferMIMETypeForImages)
415 m_preferMIMETypeForImages = preferMIMETypeForImages;
418 void Settings::setForcePendingWebGLPolicy(bool forced)
420 m_forcePendingWebGLPolicy = forced;
423 void Settings::setPluginsEnabled(bool arePluginsEnabled)
425 if (m_arePluginsEnabled == arePluginsEnabled)
428 m_arePluginsEnabled = arePluginsEnabled;
429 Page::refreshPlugins(false);
432 void Settings::setUserStyleSheetLocation(const URL& userStyleSheetLocation)
434 if (m_userStyleSheetLocation == userStyleSheetLocation)
437 m_userStyleSheetLocation = userStyleSheetLocation;
440 m_page->userStyleSheetLocationChanged();
443 // FIXME: This quirk is needed because of Radar 4674537 and 5211271. We need to phase it out once Adobe
444 // can fix the bug from their end.
445 void Settings::setNeedsAdobeFrameReloadingQuirk(bool shouldNotReloadIFramesForUnchangedSRC)
447 m_needsAdobeFrameReloadingQuirk = shouldNotReloadIFramesForUnchangedSRC;
450 void Settings::setMinimumDOMTimerInterval(std::chrono::milliseconds interval)
452 auto oldTimerInterval = m_minimumDOMTimerInterval;
453 m_minimumDOMTimerInterval = interval;
458 for (Frame* frame = &m_page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
459 if (frame->document())
460 frame->document()->adjustMinimumTimerInterval(oldTimerInterval);
464 void Settings::setLayoutInterval(std::chrono::milliseconds layoutInterval)
466 // FIXME: It seems weird that this function may disregard the specified layout interval.
467 // We should either expose layoutScheduleThreshold or better communicate this invariant.
468 m_layoutInterval = std::max(layoutInterval, layoutScheduleThreshold);
471 void Settings::setUsesPageCache(bool usesPageCache)
473 if (m_usesPageCache == usesPageCache)
476 m_usesPageCache = usesPageCache;
481 if (!m_usesPageCache)
482 PageCache::singleton().pruneToSizeNow(0, PruningReason::None);
485 void Settings::setFontRenderingMode(FontRenderingMode mode)
487 if (fontRenderingMode() == mode)
489 m_fontRenderingMode = static_cast<int>(mode);
491 m_page->setNeedsRecalcStyleInAllFrames();
494 FontRenderingMode Settings::fontRenderingMode() const
496 return static_cast<FontRenderingMode>(m_fontRenderingMode);
499 void Settings::setDNSPrefetchingEnabled(bool dnsPrefetchingEnabled)
501 if (m_dnsPrefetchingEnabled == dnsPrefetchingEnabled)
504 m_dnsPrefetchingEnabled = dnsPrefetchingEnabled;
506 m_page->dnsPrefetchingStateChanged();
509 void Settings::setShowTiledScrollingIndicator(bool enabled)
511 if (m_showTiledScrollingIndicator == enabled)
514 m_showTiledScrollingIndicator = enabled;
517 #if ENABLE(RESOURCE_USAGE)
518 void Settings::setResourceUsageOverlayVisible(bool visible)
520 if (m_resourceUsageOverlayVisible == visible)
523 m_resourceUsageOverlayVisible = visible;
525 m_page->setResourceUsageOverlayVisible(visible);
530 void Settings::setShouldUseHighResolutionTimers(bool shouldUseHighResolutionTimers)
532 gShouldUseHighResolutionTimers = shouldUseHighResolutionTimers;
536 void Settings::setStorageBlockingPolicy(SecurityOrigin::StorageBlockingPolicy enabled)
538 if (m_storageBlockingPolicy == enabled)
541 m_storageBlockingPolicy = enabled;
543 m_page->storageBlockingStateChanged();
546 void Settings::setBackgroundShouldExtendBeyondPage(bool shouldExtend)
548 if (m_backgroundShouldExtendBeyondPage == shouldExtend)
551 m_backgroundShouldExtendBeyondPage = shouldExtend;
554 m_page->mainFrame().view()->updateExtendBackgroundIfNecessary();
557 #if USE(AVFOUNDATION)
558 void Settings::setAVFoundationEnabled(bool enabled)
560 if (gAVFoundationEnabled == enabled)
563 gAVFoundationEnabled = enabled;
564 HTMLMediaElement::resetMediaEngines();
567 void Settings::setAVFoundationNSURLSessionEnabled(bool enabled)
569 if (gAVFoundationNSURLSessionEnabled == enabled)
572 gAVFoundationNSURLSessionEnabled = enabled;
577 void Settings::setQTKitEnabled(bool enabled)
579 if (gQTKitEnabled == enabled)
582 gQTKitEnabled = enabled;
583 HTMLMediaElement::resetMediaEngines();
587 #if ENABLE(MEDIA_STREAM)
588 bool Settings::mockCaptureDevicesEnabled()
590 return gMockCaptureDevicesEnabled;
593 void Settings::setMockCaptureDevicesEnabled(bool enabled)
595 gMockCaptureDevicesEnabled = enabled;
596 MockRealtimeMediaSourceCenter::setMockRealtimeMediaSourceCenterEnabled(enabled);
599 bool Settings::mediaCaptureRequiresSecureConnection() const
601 return gMediaCaptureRequiresSecureConnection;
604 void Settings::setMediaCaptureRequiresSecureConnection(bool mediaCaptureRequiresSecureConnection)
606 gMediaCaptureRequiresSecureConnection = mediaCaptureRequiresSecureConnection;
610 void Settings::setScrollingPerformanceLoggingEnabled(bool enabled)
612 m_scrollingPerformanceLoggingEnabled = enabled;
614 if (m_page && m_page->mainFrame().view())
615 m_page->mainFrame().view()->setScrollingPerformanceLoggingEnabled(enabled);
618 // It's very important that this setting doesn't change in the middle of a document's lifetime.
619 // The Mac port uses this flag when registering and deregistering platform-dependent scrollbar
620 // objects. Therefore, if this changes at an unexpected time, deregistration may not happen
621 // correctly, which may cause the platform to follow dangling pointers.
622 void Settings::setMockScrollbarsEnabled(bool flag)
624 gMockScrollbarsEnabled = flag;
625 // FIXME: This should update scroll bars in existing pages.
628 bool Settings::mockScrollbarsEnabled()
630 return gMockScrollbarsEnabled;
633 void Settings::setUsesOverlayScrollbars(bool flag)
635 gUsesOverlayScrollbars = flag;
636 // FIXME: This should update scroll bars in existing pages.
639 bool Settings::usesOverlayScrollbars()
641 return gUsesOverlayScrollbars;
644 void Settings::setUsesMockScrollAnimator(bool flag)
646 gMockScrollAnimatorEnabled = flag;
649 bool Settings::usesMockScrollAnimator()
651 return gMockScrollAnimatorEnabled;
654 void Settings::setShouldRespectPriorityInCSSAttributeSetters(bool flag)
656 gShouldRespectPriorityInCSSAttributeSetters = flag;
659 bool Settings::shouldRespectPriorityInCSSAttributeSetters()
661 return gShouldRespectPriorityInCSSAttributeSetters;
664 void Settings::setHiddenPageDOMTimerThrottlingEnabled(bool flag)
666 if (m_hiddenPageDOMTimerThrottlingEnabled == flag)
668 m_hiddenPageDOMTimerThrottlingEnabled = flag;
670 m_page->hiddenPageDOMTimerThrottlingStateChanged();
673 void Settings::setHiddenPageDOMTimerThrottlingAutoIncreases(bool flag)
675 if (m_hiddenPageDOMTimerThrottlingAutoIncreases == flag)
677 m_hiddenPageDOMTimerThrottlingAutoIncreases = flag;
679 m_page->hiddenPageDOMTimerThrottlingStateChanged();
682 void Settings::setHiddenPageCSSAnimationSuspensionEnabled(bool flag)
684 if (m_hiddenPageCSSAnimationSuspensionEnabled == flag)
686 m_hiddenPageCSSAnimationSuspensionEnabled = flag;
688 m_page->hiddenPageCSSAnimationSuspensionStateChanged();
691 void Settings::setFontFallbackPrefersPictographs(bool preferPictographs)
693 if (m_fontFallbackPrefersPictographs == preferPictographs)
696 m_fontFallbackPrefersPictographs = preferPictographs;
698 m_page->setNeedsRecalcStyleInAllFrames();
701 void Settings::setWebFontsAlwaysFallBack(bool enable)
703 if (m_webFontsAlwaysFallBack == enable)
706 m_webFontsAlwaysFallBack = enable;
709 void Settings::setLowPowerVideoAudioBufferSizeEnabled(bool flag)
711 gLowPowerVideoAudioBufferSizeEnabled = flag;
714 void Settings::setResourceLoadStatisticsEnabled(bool flag)
716 gResourceLoadStatisticsEnabledEnabled = flag;
720 void Settings::setAudioSessionCategoryOverride(unsigned sessionCategory)
722 AudioSession::sharedSession().setCategoryOverride(static_cast<AudioSession::CategoryType>(sessionCategory));
725 unsigned Settings::audioSessionCategoryOverride()
727 return AudioSession::sharedSession().categoryOverride();
730 void Settings::setNetworkDataUsageTrackingEnabled(bool trackingEnabled)
732 gNetworkDataUsageTrackingEnabled = trackingEnabled;
735 bool Settings::networkDataUsageTrackingEnabled()
737 return gNetworkDataUsageTrackingEnabled;
740 static String& sharedNetworkInterfaceNameGlobal()
742 static NeverDestroyed<String> networkInterfaceName;
743 return networkInterfaceName;
746 void Settings::setNetworkInterfaceName(const String& networkInterfaceName)
748 sharedNetworkInterfaceNameGlobal() = networkInterfaceName;
751 const String& Settings::networkInterfaceName()
753 return sharedNetworkInterfaceNameGlobal();
757 bool Settings::globalConstRedeclarationShouldThrow()
760 return !MacApplication::isIBooks();
762 return !IOSApplication::isIBooks();
768 void Settings::setAllowsAnySSLCertificate(bool allowAnySSLCertificate)
770 gAllowsAnySSLCertificate = allowAnySSLCertificate;
773 bool Settings::allowsAnySSLCertificate()
775 return gAllowsAnySSLCertificate;
778 } // namespace WebCore