Changeset 209230 in webkit
- Timestamp:
- Dec 1, 2016 7:30:37 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r209229 r209230 1 2016-12-01 Jiewen Tan <jiewen_tan@apple.com> 2 3 Add a runtime flag for SubtleCrypto 4 https://bugs.webkit.org/show_bug.cgi?id=164982 5 6 Reviewed by Brent Fulgham. 7 8 * bindings/generic/RuntimeEnabledFeatures.h: 9 (WebCore::RuntimeEnabledFeatures::setSubtleCryptoEnabled): 10 (WebCore::RuntimeEnabledFeatures::subtleCryptoEnabled): 11 * page/Crypto.idl: 12 1 13 2016-12-01 Saam Barati <sbarati@apple.com> 2 14 -
trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h
r208983 r209230 241 241 #endif 242 242 243 #if ENABLE(SUBTLE_CRYPTO) 244 void setSubtleCryptoEnabled(bool isEnabled) { m_isSubtleCryptoEnabled = isEnabled; } 245 bool subtleCryptoEnabled() const { return m_isSubtleCryptoEnabled; } 246 #endif 247 243 248 WEBCORE_EXPORT static RuntimeEnabledFeatures& sharedFeatures(); 244 249 … … 363 368 #endif 364 369 370 #if ENABLE(SUBTLE_CRYPTO) 371 bool m_isSubtleCryptoEnabled; 372 #endif 373 365 374 friend class WTF::NeverDestroyed<RuntimeEnabledFeatures>; 366 375 }; -
trunk/Source/WebCore/page/Crypto.idl
r207522 r209230 32 32 GenerateIsReachable=ImplScriptExecutionContext, 33 33 ] interface Crypto { 34 [Conditional=SUBTLE_CRYPTO ] readonly attribute SubtleCrypto subtle;34 [Conditional=SUBTLE_CRYPTO, EnabledAtRuntime=SubtleCrypto] readonly attribute SubtleCrypto subtle; 35 35 [Custom, MayThrowException] ArrayBufferView getRandomValues(ArrayBufferView array); 36 36 -
trunk/Source/WebKit/mac/ChangeLog
r209159 r209230 1 2016-12-01 Jiewen Tan <jiewen_tan@apple.com> 2 3 Add a runtime flag for SubtleCrypto 4 https://bugs.webkit.org/show_bug.cgi?id=164982 5 6 Reviewed by Brent Fulgham. 7 8 * WebView/WebPreferenceKeysPrivate.h: 9 * WebView/WebPreferences.mm: 10 (+[WebPreferences initialize]): 11 (-[WebPreferences subtleCryptoEnabled]): 12 (-[WebPreferences setSubtleCryptoEnabled:]): 13 * WebView/WebPreferencesPrivate.h: 14 * WebView/WebView.mm: 15 (-[WebView _preferencesChanged:]): 16 1 17 2016-11-30 Said Abou-Hallawa <sabouhallawa@apple.com> 2 18 -
trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
r209159 r209230 174 174 #define WebKitModernMediaControlsEnabledPreferenceKey @"WebKitModernMediaControlsEnabled" 175 175 #define WebKitPointerLockEnabledPreferenceKey @"WebKitPointerLockEnabled" 176 #define WebKitSubtleCryptoEnabledPreferenceKey @"WebKitSubtleCryptoEnabled" 176 177 177 178 #if !TARGET_OS_IPHONE -
trunk/Source/WebKit/mac/WebView/WebPreferences.mm
r209159 r209230 631 631 [NSNumber numberWithBool:NO], WebKitVisualViewportEnabledPreferenceKey, 632 632 [NSNumber numberWithBool:YES], WebKitNeedsStorageAccessFromFileURLsQuirkKey, 633 #if ENABLE(SUBTLE_CRYPTO) 634 [NSNumber numberWithBool:YES], WebKitSubtleCryptoEnabledPreferenceKey, 635 #endif 633 636 nil]; 634 637 … … 2681 2684 } 2682 2685 2686 - (BOOL)subtleCryptoEnabled 2687 { 2688 return [self _boolValueForKey:WebKitSubtleCryptoEnabledPreferenceKey]; 2689 } 2690 2691 - (void)setSubtleCryptoEnabled:(BOOL)flag 2692 { 2693 [self _setBoolValue:flag forKey:WebKitSubtleCryptoEnabledPreferenceKey]; 2694 } 2695 2696 2683 2697 - (void)setMetaRefreshEnabled:(BOOL)enabled 2684 2698 { -
trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h
r209159 r209230 161 161 - (void)setSpatialNavigationEnabled:(BOOL)flag; 162 162 163 - (void)setSubtleCryptoEnabled:(BOOL)flag; 164 - (BOOL)subtleCryptoEnabled; 165 163 166 #if !TARGET_OS_IPHONE 164 167 // zero means do AutoScale -
trunk/Source/WebKit/mac/WebView/WebView.mm
r209159 r209230 2867 2867 #endif 2868 2868 2869 #if ENABLE(SUBTLE_CRYPTO) 2870 RuntimeEnabledFeatures::sharedFeatures().setSubtleCryptoEnabled([preferences subtleCryptoEnabled]); 2871 #endif 2872 2869 2873 NSTimeInterval timeout = [preferences incrementalRenderingSuppressionTimeoutInSeconds]; 2870 2874 if (timeout > 0) -
trunk/Source/WebKit2/ChangeLog
r209229 r209230 1 2016-12-01 Jiewen Tan <jiewen_tan@apple.com> 2 3 Add a runtime flag for SubtleCrypto 4 https://bugs.webkit.org/show_bug.cgi?id=164982 5 6 Reviewed by Brent Fulgham. 7 8 * Shared/WebPreferencesDefinitions.h: 9 * UIProcess/API/C/WKPreferences.cpp: 10 (WKPreferencesSetSubtleCryptoEnabled): 11 (WKPreferencesGetSubtleCryptoEnabled): 12 * UIProcess/API/C/WKPreferencesRefPrivate.h: 13 * WebProcess/InjectedBundle/InjectedBundle.cpp: 14 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): 15 * WebProcess/WebPage/WebPage.cpp: 16 (WebKit::WebPage::updatePreferences): 17 1 18 2016-12-01 Saam Barati <sbarati@apple.com> 2 19 -
trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h
r209159 r209230 318 318 macro(VariationFontsEnabled, variationFontsEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "Variation Fonts", "Enable variation fonts") \ 319 319 macro(InputEventsEnabled, inputEventsEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "Input Events", "Enable InputEvents support") \ 320 macro(SubtleCryptoEnabled, subtleCryptoEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "SubtleCrypto", "Enable SubtleCrypto support") \ 320 321 macro(WebGL2Enabled, webGL2Enabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "WebGL 2.0", "WebGL 2 prototype") \ 321 322 macro(ES6ModulesEnabled, es6ModulesEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "ES6 Modules", "Enable ES6 Modules support") \ -
trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
r209161 r209230 1612 1612 } 1613 1613 1614 void WKPreferencesSetSubtleCryptoEnabled(WKPreferencesRef preferencesRef, bool flag) 1615 { 1616 toImpl(preferencesRef)->setSubtleCryptoEnabled(flag); 1617 } 1618 1619 bool WKPreferencesGetSubtleCryptoEnabled(WKPreferencesRef preferencesRef) 1620 { 1621 return toImpl(preferencesRef)->subtleCryptoEnabled(); 1622 } -
trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h
r209161 r209230 451 451 WK_EXPORT bool WKPreferencesGetIntersectionObserverEnabled(WKPreferencesRef); 452 452 453 // Defaults to true 454 WK_EXPORT void WKPreferencesSetSubtleCryptoEnabled(WKPreferencesRef, bool flag); 455 WK_EXPORT bool WKPreferencesGetSubtleCryptoEnabled(WKPreferencesRef); 456 453 457 #ifdef __cplusplus 454 458 } -
trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
r209159 r209230 222 222 #endif 223 223 224 #if ENABLE(SUBTLE_CRYPTO) 225 if (preference == "WebKitSubtleCryptoEnabled") 226 RuntimeEnabledFeatures::sharedFeatures().setSubtleCryptoEnabled(enabled); 227 #endif 228 224 229 // Map the names used in LayoutTests with the names used in WebCore::Settings and WebPreferencesStore. 225 230 #define FOR_EACH_OVERRIDE_BOOL_PREFERENCE(macro) \ -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r209159 r209230 3210 3210 } 3211 3211 3212 #if ENABLE(SUBTLE_CRYPTO) 3213 RuntimeEnabledFeatures::sharedFeatures().setSubtleCryptoEnabled(store.getBoolValueForKey(WebPreferencesKey::subtleCryptoEnabledKey())); 3214 #endif 3215 3212 3216 platformPreferencesDidChange(store); 3213 3217 -
trunk/Tools/ChangeLog
r209216 r209230 1 2016-12-01 Jiewen Tan <jiewen_tan@apple.com> 2 3 Add a runtime flag for SubtleCrypto 4 https://bugs.webkit.org/show_bug.cgi?id=164982 5 6 Reviewed by Brent Fulgham. 7 8 * DumpRenderTree/mac/DumpRenderTree.mm: 9 (resetWebPreferencesToConsistentValues): 10 * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: 11 (WTR::InjectedBundle::beginTesting): 12 * WebKitTestRunner/InjectedBundle/TestRunner.cpp: 13 (WTR::TestRunner::setSubtleCryptoEnabled): 14 * WebKitTestRunner/InjectedBundle/TestRunner.h: 15 1 16 2016-12-01 Alexey Proskuryakov <ap@apple.com> 2 17 -
trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm
r209161 r209230 1002 1002 preferences.modernMediaControlsEnabled = options.enableModernMediaControls; 1003 1003 1004 [preferences setSubtleCryptoEnabled:YES]; 1005 1004 1006 [WebPreferences _clearNetworkLoaderSession]; 1005 1007 [WebPreferences _setCurrentNetworkLoaderSessionCookieAcceptPolicy:NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain]; -
trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
r209161 r209230 336 336 m_testRunner->clearTestRunnerCallbacks(); 337 337 338 m_testRunner->setSubtleCryptoEnabled(true); 339 338 340 if (m_timeout > 0) 339 341 m_testRunner->setCustomTimeout(m_timeout); -
trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
r209082 r209230 355 355 } 356 356 357 void TestRunner::setSubtleCryptoEnabled(bool enabled) 358 { 359 WKRetainPtr<WKStringRef> key(AdoptWK, WKStringCreateWithUTF8CString("WebKitSubtleCryptoEnabled")); 360 auto& injectedBundle = InjectedBundle::singleton(); 361 WKBundleOverrideBoolPreferenceForTestRunner(injectedBundle.bundle(), injectedBundle.pageGroup(), key.get(), enabled); 362 } 363 357 364 void TestRunner::setDOMIteratorEnabled(bool enabled) 358 365 { -
trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
r209082 r209230 130 130 void setES6ModulesEnabled(bool); 131 131 void setEncryptedMediaAPIEnabled(bool); 132 void setSubtleCryptoEnabled(bool); 132 133 133 134 // Special DOM functions.
Note: See TracChangeset
for help on using the changeset viewer.