bool QWebPreferencesPrivate::testAttribute(QWebPreferencesPrivate::WebAttribute attr) const { WKPreferencesRef preferencesRef = WKPageGroupGetPreferences(webViewPrivate->pageGroup.get()); switch (attr) { case AutoLoadImages: return WKPreferencesGetLoadsImagesAutomatically(preferencesRef); #if ENABLE(FULLSCREEN_API) case FullScreenEnabled: return WKPreferencesGetFullScreenEnabled(preferencesRef); #endif case JavascriptEnabled: return WKPreferencesGetJavaScriptEnabled(preferencesRef); case PluginsEnabled: return WKPreferencesGetPluginsEnabled(preferencesRef); case OfflineWebApplicationCacheEnabled: return WKPreferencesGetOfflineWebApplicationCacheEnabled(preferencesRef); case LocalStorageEnabled: return WKPreferencesGetLocalStorageEnabled(preferencesRef); case XSSAuditingEnabled: return WKPreferencesGetXSSAuditorEnabled(preferencesRef); case PrivateBrowsingEnabled: return WKPreferencesGetPrivateBrowsingEnabled(preferencesRef); case DnsPrefetchEnabled: return WKPreferencesGetDNSPrefetchingEnabled(preferencesRef); case FrameFlatteningEnabled: return WKPreferencesGetFrameFlatteningEnabled(preferencesRef); case DeveloperExtrasEnabled: return WKPreferencesGetDeveloperExtrasEnabled(preferencesRef); #if ENABLE(WEBGL) case WebGLEnabled: return WKPreferencesGetWebGLEnabled(preferencesRef); #if ENABLE(CSS_SHADERS) case CSSCustomFilterEnabled: return WKPreferencesGetCSSCustomFilterEnabled(preferencesRef); #endif #endif #if ENABLE(WEB_AUDIO) case WebAudioEnabled: return WKPreferencesGetWebAudioEnabled(preferencesRef); #endif case CaretBrowsingEnabled: return WKPreferencesGetCaretBrowsingEnabled(preferencesRef); case NotificationsEnabled: return WKPreferencesGetNotificationsEnabled(preferencesRef); case UniversalAccessFromFileURLsAllowed: return WKPreferencesGetUniversalAccessFromFileURLsAllowed(preferencesRef); case FileAccessFromFileURLsAllowed: return WKPreferencesGetFileAccessFromFileURLsAllowed(preferencesRef); default: ASSERT_NOT_REACHED(); return false; } }
bool QWebPreferencesPrivate::testAttribute(QWebPreferencesPrivate::WebAttribute attr) const { switch (attr) { case AutoLoadImages: return WKPreferencesGetLoadsImagesAutomatically(preferencesRef()); #if ENABLE(FULLSCREEN_API) case FullScreenEnabled: return WKPreferencesGetFullScreenEnabled(preferencesRef()); #endif case JavascriptEnabled: return WKPreferencesGetJavaScriptEnabled(preferencesRef()); case PluginsEnabled: return WKPreferencesGetPluginsEnabled(preferencesRef()); case OfflineWebApplicationCacheEnabled: return WKPreferencesGetOfflineWebApplicationCacheEnabled(preferencesRef()); case LocalStorageEnabled: return WKPreferencesGetLocalStorageEnabled(preferencesRef()); case XSSAuditingEnabled: return WKPreferencesGetXSSAuditorEnabled(preferencesRef()); case PrivateBrowsingEnabled: return WKPreferencesGetPrivateBrowsingEnabled(preferencesRef()); case DnsPrefetchEnabled: return WKPreferencesGetDNSPrefetchingEnabled(preferencesRef()); case FrameFlatteningEnabled: return WKPreferencesGetFrameFlatteningEnabled(preferencesRef()); case DeveloperExtrasEnabled: return WKPreferencesGetDeveloperExtrasEnabled(preferencesRef()); #if ENABLE(WEBGL) case WebGLEnabled: return WKPreferencesGetWebGLEnabled(preferencesRef()); #endif default: ASSERT_NOT_REACHED(); return false; } }