Title: [267164] trunk
Revision
267164
Author
wei...@apple.com
Date
2020-09-16 15:04:43 -0700 (Wed, 16 Sep 2020)

Log Message

Remove runtime setting for enabling/disabling the isSecureContext API?
https://bugs.webkit.org/show_bug.cgi?id=216562

Reviewed by Darin Adler.

Remove runtime setting for enabling/disabling the the isSecureContext attribute.
on window and the worker global scope. There is no known reason one would need
to disable it.

Source/WebCore:

* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setIsSecureContextAttributeEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::isSecureContextAttributeEnabled const): Deleted.
* page/WindowOrWorkerGlobalScope.idl:

Source/WebKit:

* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetIsSecureContextAttributeEnabled):
(WKPreferencesGetIsSecureContextAttributeEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

Source/WebKitLegacy/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences setIsSecureContextAttributeEnabled:]):
(-[WebPreferences isSecureContextAttributeEnabled]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKitLegacy/win:

* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings):
(WebPreferences::setIsSecureContextAttributeEnabled):
(WebPreferences::isSecureContextAttributeEnabled):
* WebView.cpp:
(WebView::notifyPreferencesChanged):

Tools:

* DumpRenderTree/TestOptions.cpp:
(TestOptions::TestOptions):
* DumpRenderTree/TestOptions.h:
* DumpRenderTree/mac/DumpRenderTree.mm:
(setWebPreferencesForTestOptions):
* DumpRenderTree/win/DumpRenderTree.cpp:
(setWebPreferencesForTestOptions):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):

LayoutTests:

* platform/win/TestExpectations:
* security/isSecureContext-disabled-expected.txt: Removed.
* security/isSecureContext-disabled.html: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (267163 => 267164)


--- trunk/LayoutTests/ChangeLog	2020-09-16 22:04:34 UTC (rev 267163)
+++ trunk/LayoutTests/ChangeLog	2020-09-16 22:04:43 UTC (rev 267164)
@@ -1,3 +1,18 @@
+2020-09-16  Sam Weinig  <wei...@apple.com>
+
+        Remove runtime setting for enabling/disabling the isSecureContext API?
+        https://bugs.webkit.org/show_bug.cgi?id=216562
+
+        Reviewed by Darin Adler.
+
+        Remove runtime setting for enabling/disabling the the isSecureContext attribute. 
+        on window and the worker global scope. There is no known reason one would need 
+        to disable it.
+
+        * platform/win/TestExpectations:
+        * security/isSecureContext-disabled-expected.txt: Removed.
+        * security/isSecureContext-disabled.html: Removed.
+
 2020-09-16  Jer Noble  <jer.no...@apple.com>
 
         REGRESSION(r266844) [ BigSur ] http/tests/security/webaudio-render-remote-audio-allowed-crossorigin.html is a constant failure

Modified: trunk/LayoutTests/platform/win/TestExpectations (267163 => 267164)


--- trunk/LayoutTests/platform/win/TestExpectations	2020-09-16 22:04:34 UTC (rev 267163)
+++ trunk/LayoutTests/platform/win/TestExpectations	2020-09-16 22:04:43 UTC (rev 267164)
@@ -90,7 +90,6 @@
 ################################################################################
 
 # FIXME: Implement test options parsing (<!-- webkit-test-runner [ ... ] -->).
-webkit.org/b/173281 security/isSecureContext-disabled.html [ Skip ]
 webkit.org/b/173281 http/tests/media/video-auth-with-allowCrossOriginSubresourcesToAskForCredentials.html [ Skip ]
 webkit.org/b/173281 http/tests/security/credentials-iframes-allowCrossOriginSubresourcesToAskForCredentials.html [ Skip ]
 webkit.org/b/173281 http/tests/security/mixedContent/insecure-basic-auth-image-allowCrossOriginSubresourcesToAskForCredentials.https.html [ Skip ]

Deleted: trunk/LayoutTests/security/isSecureContext-disabled-expected.txt (267163 => 267164)


--- trunk/LayoutTests/security/isSecureContext-disabled-expected.txt	2020-09-16 22:04:34 UTC (rev 267163)
+++ trunk/LayoutTests/security/isSecureContext-disabled-expected.txt	2020-09-16 22:04:43 UTC (rev 267164)
@@ -1,12 +0,0 @@
-Tests that global property isSecureContexts is undefined when the Setting isSecureContextAttributeEnabled is disabled.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS window.isSecureContext is undefined.
-Starting worker: resources/worker-isSecureContext-disabled.js
-PASS [Worker] self.isSecureContext is undefined.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/security/isSecureContext-disabled.html (267163 => 267164)


--- trunk/LayoutTests/security/isSecureContext-disabled.html	2020-09-16 22:04:34 UTC (rev 267163)
+++ trunk/LayoutTests/security/isSecureContext-disabled.html	2020-09-16 22:04:43 UTC (rev 267164)
@@ -1,16 +0,0 @@
-<!DOCTYPE html><!-- webkit-test-runner [ enableIsSecureContextAttribute=false ] -->
-<html>
-<head>
-<script src=""
-</head>
-<body>
-<script>
-window.jsTestIsAsync = true;
-
-description("Tests that global property isSecureContexts is undefined when the Setting isSecureContextAttributeEnabled is disabled.");
-
-shouldBeUndefined("window.isSecureContext");
-startWorker("resources/worker-isSecureContext-disabled.js");
-</script>
-</body>
-</html>

Modified: trunk/Source/WebCore/ChangeLog (267163 => 267164)


--- trunk/Source/WebCore/ChangeLog	2020-09-16 22:04:34 UTC (rev 267163)
+++ trunk/Source/WebCore/ChangeLog	2020-09-16 22:04:43 UTC (rev 267164)
@@ -1,3 +1,19 @@
+2020-09-16  Sam Weinig  <wei...@apple.com>
+
+        Remove runtime setting for enabling/disabling the isSecureContext API?
+        https://bugs.webkit.org/show_bug.cgi?id=216562
+
+        Reviewed by Darin Adler.
+
+        Remove runtime setting for enabling/disabling the the isSecureContext attribute. 
+        on window and the worker global scope. There is no known reason one would need 
+        to disable it.
+
+        * page/RuntimeEnabledFeatures.h:
+        (WebCore::RuntimeEnabledFeatures::setIsSecureContextAttributeEnabled): Deleted.
+        (WebCore::RuntimeEnabledFeatures::isSecureContextAttributeEnabled const): Deleted.
+        * page/WindowOrWorkerGlobalScope.idl:
+
 2020-09-16  Zalan Bujtas  <za...@apple.com>
 
         [LFC] Box geometry is all logical

Modified: trunk/Source/WebCore/page/RuntimeEnabledFeatures.h (267163 => 267164)


--- trunk/Source/WebCore/page/RuntimeEnabledFeatures.h	2020-09-16 22:04:34 UTC (rev 267163)
+++ trunk/Source/WebCore/page/RuntimeEnabledFeatures.h	2020-09-16 22:04:43 UTC (rev 267164)
@@ -67,9 +67,6 @@
     void setModernMediaControlsEnabled(bool areEnabled) { m_areModernMediaControlsEnabled = areEnabled; }
     bool modernMediaControlsEnabled() const { return m_areModernMediaControlsEnabled; }
 
-    void setIsSecureContextAttributeEnabled(bool isEnabled) { m_isSecureContextAttributeEnabled = isEnabled; }
-    bool isSecureContextAttributeEnabled() const { return m_isSecureContextAttributeEnabled; }
-
     void setWebAnimationsEnabled(bool areEnabled) { m_areWebAnimationsEnabled = areEnabled; }
     bool webAnimationsEnabled() const { return m_areWebAnimationsEnabled; }
 
@@ -296,7 +293,6 @@
     bool m_isPaintTimingEnabled { false };
     bool m_isResourceTimingEnabled { false };
     bool m_isUserTimingEnabled { false };
-    bool m_isSecureContextAttributeEnabled { false };
     bool m_isMenuItemElementEnabled { false };
     bool m_isDirectoryUploadEnabled { false };
     bool m_isCustomPasteboardDataEnabled { false };

Modified: trunk/Source/WebCore/page/WindowOrWorkerGlobalScope.idl (267163 => 267164)


--- trunk/Source/WebCore/page/WindowOrWorkerGlobalScope.idl	2020-09-16 22:04:34 UTC (rev 267163)
+++ trunk/Source/WebCore/page/WindowOrWorkerGlobalScope.idl	2020-09-16 22:04:43 UTC (rev 267164)
@@ -45,8 +45,15 @@
 // https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope-mixin
 interface mixin WindowOrWorkerGlobalScope {
     [Replaceable] readonly attribute USVString origin;
+    readonly attribute boolean isSecureContext;
+    // FIXME: Implement 'crossOriginIsolated'.
+    // readonly attribute boolean crossOriginIsolated;
+ 
+    // Base64 utility methods.
+    [MayThrowException] DOMString atob(DOMString string);
+    [MayThrowException] DOMString btoa(DOMString string);
 
-    // Timers
+    // Timers.
     // FIXME: This should take a TimerHandler (a.k.a. (DOMString or Function)) rather than a ScheduledAction.
     [CallWith=GlobalObject, MayThrowException] long setTimeout(ScheduledAction handler, optional long timeout = 0, any... arguments);
     undefined clearTimeout(optional long handle = 0);
@@ -54,15 +61,9 @@
     [CallWith=GlobalObject, MayThrowException] long setInterval(ScheduledAction handler, optional long timeout = 0, any... arguments);
     undefined clearInterval(optional long handle = 0);
 
+    // microtask queuing.
     [Custom] undefined queueMicrotask(VoidCallback callback);
 
-    // Base64 utility methods.
-    [MayThrowException] DOMString atob(DOMString string);
-    [MayThrowException] DOMString btoa(DOMString string);
-
-    // Secure Contexts
-    [EnabledAtRuntime=IsSecureContextAttribute] readonly attribute boolean isSecureContext;
-
     // ImageBitmap.
     [EnabledAtRuntime=ImageBitmap] Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, optional ImageBitmapOptions options);
     [EnabledAtRuntime=ImageBitmap] Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, long sx, long sy, long sw, long sh, optional ImageBitmapOptions options);

Modified: trunk/Source/WebKit/ChangeLog (267163 => 267164)


--- trunk/Source/WebKit/ChangeLog	2020-09-16 22:04:34 UTC (rev 267163)
+++ trunk/Source/WebKit/ChangeLog	2020-09-16 22:04:43 UTC (rev 267164)
@@ -1,3 +1,22 @@
+2020-09-16  Sam Weinig  <wei...@apple.com>
+
+        Remove runtime setting for enabling/disabling the isSecureContext API?
+        https://bugs.webkit.org/show_bug.cgi?id=216562
+
+        Reviewed by Darin Adler.
+
+        Remove runtime setting for enabling/disabling the the isSecureContext attribute. 
+        on window and the worker global scope. There is no known reason one would need 
+        to disable it.
+
+        * Shared/WebPreferences.yaml:
+        * UIProcess/API/C/WKPreferences.cpp:
+        (WKPreferencesSetIsSecureContextAttributeEnabled):
+        (WKPreferencesGetIsSecureContextAttributeEnabled):
+        * UIProcess/API/C/WKPreferencesRefPrivate.h:
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
+
 2020-09-16  Youenn Fablet  <you...@apple.com>
 
         RemoteSampleBufferDisplayLayer should process its IPC messages from a background thread

Modified: trunk/Source/WebKit/Shared/WebPreferences.yaml (267163 => 267164)


--- trunk/Source/WebKit/Shared/WebPreferences.yaml	2020-09-16 22:04:34 UTC (rev 267163)
+++ trunk/Source/WebKit/Shared/WebPreferences.yaml	2020-09-16 22:04:43 UTC (rev 267164)
@@ -1265,11 +1265,6 @@
   type: bool
   defaultValue: true
 
-IsSecureContextAttributeEnabled:
-  type: bool
-  defaultValue: true
-  webcoreBinding: RuntimeEnabledFeatures
-
 SourceBufferChangeTypeEnabled:
   type: bool
   defaultValue: true

Modified: trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp (267163 => 267164)


--- trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp	2020-09-16 22:04:34 UTC (rev 267163)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp	2020-09-16 22:04:43 UTC (rev 267164)
@@ -1889,16 +1889,6 @@
     return toCopiedAPI(toImpl(preferencesRef)->mediaContentTypesRequiringHardwareSupport());
 }
 
-void WKPreferencesSetIsSecureContextAttributeEnabled(WKPreferencesRef preferencesRef, bool flag)
-{
-    toImpl(preferencesRef)->setIsSecureContextAttributeEnabled(flag);
-}
-
-bool WKPreferencesGetIsSecureContextAttributeEnabled(WKPreferencesRef preferencesRef)
-{
-    return toImpl(preferencesRef)->isSecureContextAttributeEnabled();
-}
-
 bool WKPreferencesGetLegacyEncryptedMediaAPIEnabled(WKPreferencesRef preferencesRef)
 {
     return toImpl(preferencesRef)->legacyEncryptedMediaAPIEnabled();
@@ -2245,3 +2235,12 @@
 {
     return true;
 }
+
+void WKPreferencesSetIsSecureContextAttributeEnabled(WKPreferencesRef, bool)
+{
+}
+
+bool WKPreferencesGetIsSecureContextAttributeEnabled(WKPreferencesRef)
+{
+    return true;
+}

Modified: trunk/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h (267163 => 267164)


--- trunk/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h	2020-09-16 22:04:34 UTC (rev 267163)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h	2020-09-16 22:04:43 UTC (rev 267164)
@@ -537,10 +537,6 @@
 WK_EXPORT WKStringRef WKPreferencesCopyMediaContentTypesRequiringHardwareSupport(WKPreferencesRef);
 
 // Defaults to false.
-WK_EXPORT void WKPreferencesSetIsSecureContextAttributeEnabled(WKPreferencesRef, bool flag);
-WK_EXPORT bool WKPreferencesGetIsSecureContextAttributeEnabled(WKPreferencesRef);
-
-// Defaults to false.
 WK_EXPORT void WKPreferencesSetInspectorAdditionsEnabled(WKPreferencesRef, bool flag);
 WK_EXPORT bool WKPreferencesGetInspectorAdditionsEnabled(WKPreferencesRef);
 
@@ -605,6 +601,8 @@
 WK_EXPORT bool WKPreferencesGetHixie76WebSocketProtocolEnabled(WKPreferencesRef) WK_C_API_DEPRECATED;
 WK_EXPORT void WKPreferencesSetFetchAPIEnabled(WKPreferencesRef, bool) WK_C_API_DEPRECATED;
 WK_EXPORT bool WKPreferencesGetFetchAPIEnabled(WKPreferencesRef) WK_C_API_DEPRECATED;
+WK_EXPORT void WKPreferencesSetIsSecureContextAttributeEnabled(WKPreferencesRef, bool) WK_C_API_DEPRECATED;
+WK_EXPORT bool WKPreferencesGetIsSecureContextAttributeEnabled(WKPreferencesRef) WK_C_API_DEPRECATED;
 
 #ifdef __cplusplus
 }

Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp (267163 => 267164)


--- trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp	2020-09-16 22:04:34 UTC (rev 267163)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp	2020-09-16 22:04:43 UTC (rev 267164)
@@ -237,11 +237,6 @@
     }
 #endif
 
-    if (preference == "WebKitIsSecureContextAttributeEnabled") {
-        WebPreferencesStore::overrideBoolValueForKey(WebPreferencesKey::isSecureContextAttributeEnabledKey(), enabled);
-        RuntimeEnabledFeatures::sharedFeatures().setIsSecureContextAttributeEnabled(enabled);
-    }
-
     if (preference == "WebKitWebAPIStatisticsEnabled")
         RuntimeEnabledFeatures::sharedFeatures().setWebAPIStatisticsEnabled(enabled);
 

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (267163 => 267164)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2020-09-16 22:04:34 UTC (rev 267163)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2020-09-16 22:04:43 UTC (rev 267164)
@@ -1,3 +1,23 @@
+2020-09-16  Sam Weinig  <wei...@apple.com>
+
+        Remove runtime setting for enabling/disabling the isSecureContext API?
+        https://bugs.webkit.org/show_bug.cgi?id=216562
+
+        Reviewed by Darin Adler.
+
+        Remove runtime setting for enabling/disabling the the isSecureContext attribute. 
+        on window and the worker global scope. There is no known reason one would need 
+        to disable it.
+
+        * WebView/WebPreferenceKeysPrivate.h:
+        * WebView/WebPreferences.mm:
+        (+[WebPreferences initialize]):
+        (-[WebPreferences setIsSecureContextAttributeEnabled:]):
+        (-[WebPreferences isSecureContextAttributeEnabled]):
+        * WebView/WebPreferencesPrivate.h:
+        * WebView/WebView.mm:
+        (-[WebView _preferencesChanged:]):
+
 2020-09-15  Sam Weinig  <wei...@apple.com>
 
         Remove runtime setting for enabling/disabling the fetch API

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h (267163 => 267164)


--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h	2020-09-16 22:04:34 UTC (rev 267163)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h	2020-09-16 22:04:43 UTC (rev 267164)
@@ -199,7 +199,6 @@
 #define WebKitLinkPreloadEnabledPreferenceKey @"WebKitLinkPreloadEnabled"
 #define WebKitMediaPreloadingEnabledPreferenceKey @"WebKitMediaPreloadingEnabled"
 #define WebKitMediaUserGestureInheritsFromDocument @"WebKitMediaUserGestureInheritsFromDocument"
-#define WebKitIsSecureContextAttributeEnabledPreferenceKey @"WebKitIsSecureContextAttributeEnabled"
 #define WebKitViewportFitEnabledPreferenceKey @"WebKitViewportFitEnabled"
 #define WebKitConstantPropertiesEnabledPreferenceKey @"WebKitConstantPropertiesEnabled"
 #define WebKitColorFilterEnabledPreferenceKey @"WebKitColorFilterEnabled"
@@ -295,3 +294,4 @@
 #define WebKitHixie76WebSocketProtocolEnabledKey @"WebKitHixie76WebSocketProtocolEnabled"
 #define WebKitCustomElementsEnabledPreferenceKey @"WebKitCustomElementsEnabled"
 #define WebKitFetchAPIEnabledPreferenceKey @"WebKitFetchAPIEnabled"
+#define WebKitIsSecureContextAttributeEnabledPreferenceKey @"WebKitIsSecureContextAttributeEnabled"

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm (267163 => 267164)


--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm	2020-09-16 22:04:34 UTC (rev 267163)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm	2020-09-16 22:04:43 UTC (rev 267164)
@@ -689,7 +689,6 @@
         @NO, WebKitUserTimingEnabledPreferenceKey,
         @NO, WebKitResourceTimingEnabledPreferenceKey,
         @NO, WebKitMediaUserGestureInheritsFromDocument,
-        @NO, WebKitIsSecureContextAttributeEnabledPreferenceKey,
         @YES, WebKitLegacyEncryptedMediaAPIEnabledKey,
         @NO, WebKitEncryptedMediaAPIEnabledKey,
         @YES, WebKitViewportFitEnabledPreferenceKey,
@@ -3328,16 +3327,6 @@
     [self _setStringValue:value forKey:WebKitMediaContentTypesRequiringHardwareSupportPreferenceKey];
 }
 
-- (BOOL)isSecureContextAttributeEnabled
-{
-    return [self _boolValueForKey:WebKitIsSecureContextAttributeEnabledPreferenceKey];
-}
-
-- (void)setIsSecureContextAttributeEnabled:(BOOL)flag
-{
-    [self _setBoolValue:flag forKey:WebKitIsSecureContextAttributeEnabledPreferenceKey];
-}
-
 - (BOOL)legacyEncryptedMediaAPIEnabled
 {
     return [self _boolValueForKey:WebKitLegacyEncryptedMediaAPIEnabledKey];
@@ -3692,6 +3681,15 @@
 // The preferences in this category are deprecated and have no effect. They should
 // be removed when it is considered safe to do so.
 
+- (void)setIsSecureContextAttributeEnabled:(BOOL)flag
+{
+}
+
+- (BOOL)isSecureContextAttributeEnabled
+{
+    return YES;
+}
+
 - (void)setFetchAPIEnabled:(BOOL)flag
 {
 }
@@ -3701,7 +3699,6 @@
     return YES;
 }
 
-
 - (void)setShadowDOMEnabled:(BOOL)flag
 {
 }

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h (267163 => 267164)


--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h	2020-09-16 22:04:34 UTC (rev 267163)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h	2020-09-16 22:04:43 UTC (rev 267164)
@@ -591,9 +591,6 @@
 - (void)setIntersectionObserverEnabled:(BOOL)flag;
 - (BOOL)intersectionObserverEnabled;
 
-- (void)setIsSecureContextAttributeEnabled:(BOOL)flag;
-- (BOOL)isSecureContextAttributeEnabled;
-
 - (void)setServerTimingEnabled:(BOOL)flag;
 - (BOOL)serverTimingEnabled;
 
@@ -698,6 +695,9 @@
 // The preferences in this category are deprecated and have no effect. They should
 // be removed when it is considered safe to do so.
 
+- (void)setIsSecureContextAttributeEnabled:(BOOL)flag;
+- (BOOL)isSecureContextAttributeEnabled;
+
 - (void)setFetchAPIEnabled:(BOOL)flag;
 - (BOOL)fetchAPIEnabled;
 

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (267163 => 267164)


--- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm	2020-09-16 22:04:34 UTC (rev 267163)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm	2020-09-16 22:04:43 UTC (rev 267164)
@@ -3372,7 +3372,6 @@
     RuntimeEnabledFeatures::sharedFeatures().setResourceTimingEnabled(preferences.resourceTimingEnabled);
     settings.setLinkPreloadEnabled(preferences.linkPreloadEnabled);
     settings.setMediaPreloadingEnabled(preferences.mediaPreloadingEnabled);
-    RuntimeEnabledFeatures::sharedFeatures().setIsSecureContextAttributeEnabled(preferences.isSecureContextAttributeEnabled);
     RuntimeEnabledFeatures::sharedFeatures().setDirectoryUploadEnabled([preferences directoryUploadEnabled]);
     RuntimeEnabledFeatures::sharedFeatures().setMenuItemElementEnabled([preferences menuItemElementEnabled]);
     RuntimeEnabledFeatures::sharedFeatures().setAccessibilityObjectModelEnabled([preferences accessibilityObjectModelEnabled]);

Modified: trunk/Source/WebKitLegacy/win/ChangeLog (267163 => 267164)


--- trunk/Source/WebKitLegacy/win/ChangeLog	2020-09-16 22:04:34 UTC (rev 267163)
+++ trunk/Source/WebKitLegacy/win/ChangeLog	2020-09-16 22:04:43 UTC (rev 267164)
@@ -1,3 +1,21 @@
+2020-09-16  Sam Weinig  <wei...@apple.com>
+
+        Remove runtime setting for enabling/disabling the isSecureContext API?
+        https://bugs.webkit.org/show_bug.cgi?id=216562
+
+        Reviewed by Darin Adler.
+
+        Remove runtime setting for enabling/disabling the the isSecureContext attribute. 
+        on window and the worker global scope. There is no known reason one would need 
+        to disable it.
+
+        * WebPreferences.cpp:
+        (WebPreferences::initializeDefaultSettings):
+        (WebPreferences::setIsSecureContextAttributeEnabled):
+        (WebPreferences::isSecureContextAttributeEnabled):
+        * WebView.cpp:
+        (WebView::notifyPreferencesChanged):
+
 2020-09-15  Sam Weinig  <wei...@apple.com>
 
         Remove runtime setting for enabling/disabling the fetch API

Modified: trunk/Source/WebKitLegacy/win/WebPreferences.cpp (267163 => 267164)


--- trunk/Source/WebKitLegacy/win/WebPreferences.cpp	2020-09-16 22:04:34 UTC (rev 267163)
+++ trunk/Source/WebKitLegacy/win/WebPreferences.cpp	2020-09-16 22:04:43 UTC (rev 267164)
@@ -329,8 +329,6 @@
 
     CFDictionaryAddValue(defaults, CFSTR(WebKitMediaPreloadingEnabledPreferenceKey), kCFBooleanFalse);
 
-    CFDictionaryAddValue(defaults, CFSTR(WebKitIsSecureContextAttributeEnabledPreferenceKey), kCFBooleanFalse);
-
     CFDictionaryAddValue(defaults, CFSTR(WebKitDataTransferItemsEnabledPreferenceKey), kCFBooleanFalse);
 
     CFDictionaryAddValue(defaults, CFSTR(WebKitInspectorAdditionsEnabledPreferenceKey), kCFBooleanFalse);
@@ -2206,9 +2204,8 @@
     return S_OK;
 }
 
-HRESULT WebPreferences::setIsSecureContextAttributeEnabled(BOOL enabled)
+HRESULT WebPreferences::setIsSecureContextAttributeEnabled(BOOL)
 {
-    setBoolValue(WebKitIsSecureContextAttributeEnabledPreferenceKey, enabled);
     return S_OK;
 }
 
@@ -2216,7 +2213,7 @@
 {
     if (!enabled)
         return E_POINTER;
-    *enabled = boolValueForKey(WebKitIsSecureContextAttributeEnabledPreferenceKey);
+    *enabled = true;
     return S_OK;
 }
 

Modified: trunk/Source/WebKitLegacy/win/WebView.cpp (267163 => 267164)


--- trunk/Source/WebKitLegacy/win/WebView.cpp	2020-09-16 22:04:34 UTC (rev 267163)
+++ trunk/Source/WebKitLegacy/win/WebView.cpp	2020-09-16 22:04:43 UTC (rev 267164)
@@ -5294,11 +5294,6 @@
         return hr;
     settings.setMediaPreloadingEnabled(!!enabled);
 
-    hr = prefsPrivate->isSecureContextAttributeEnabled(&enabled);
-    if (FAILED(hr))
-        return hr;
-    RuntimeEnabledFeatures::sharedFeatures().setIsSecureContextAttributeEnabled(!!enabled);
-
     hr = prefsPrivate->dataTransferItemsEnabled(&enabled);
     if (FAILED(hr))
         return hr;

Modified: trunk/Tools/ChangeLog (267163 => 267164)


--- trunk/Tools/ChangeLog	2020-09-16 22:04:34 UTC (rev 267163)
+++ trunk/Tools/ChangeLog	2020-09-16 22:04:43 UTC (rev 267164)
@@ -1,3 +1,27 @@
+2020-09-16  Sam Weinig  <wei...@apple.com>
+
+        Remove runtime setting for enabling/disabling the isSecureContext API?
+        https://bugs.webkit.org/show_bug.cgi?id=216562
+
+        Reviewed by Darin Adler.
+
+        Remove runtime setting for enabling/disabling the the isSecureContext attribute. 
+        on window and the worker global scope. There is no known reason one would need 
+        to disable it.
+
+        * DumpRenderTree/TestOptions.cpp:
+        (TestOptions::TestOptions):
+        * DumpRenderTree/TestOptions.h:
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (setWebPreferencesForTestOptions):
+        * DumpRenderTree/win/DumpRenderTree.cpp:
+        (setWebPreferencesForTestOptions):
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::resetPreferencesToConsistentValues):
+        (WTR::updateTestOptionsFromTestHeader):
+        * WebKitTestRunner/TestOptions.h:
+        (WTR::TestOptions::hasSameInitializationOptions const):
+
 2020-09-16  Jer Noble  <jer.no...@apple.com>
 
         REGRESSION(r266844) [ BigSur ] http/tests/security/webaudio-render-remote-audio-allowed-crossorigin.html is a constant failure

Modified: trunk/Tools/DumpRenderTree/TestOptions.cpp (267163 => 267164)


--- trunk/Tools/DumpRenderTree/TestOptions.cpp	2020-09-16 22:04:34 UTC (rev 267163)
+++ trunk/Tools/DumpRenderTree/TestOptions.cpp	2020-09-16 22:04:43 UTC (rev 267164)
@@ -118,8 +118,6 @@
             enableDragDestinationActionLoad = parseBooleanTestHeaderValue(value);
         else if (key == "layerBackedWebView")
             layerBackedWebView = parseBooleanTestHeaderValue(value);
-        else if (key == "enableIsSecureContextAttribute")
-            enableIsSecureContextAttribute = parseBooleanTestHeaderValue(value);
         else if (key == "enableInspectorAdditions")
             enableInspectorAdditions = parseBooleanTestHeaderValue(value);
         else if (key == "dumpJSConsoleLogInStdErr")

Modified: trunk/Tools/DumpRenderTree/TestOptions.h (267163 => 267164)


--- trunk/Tools/DumpRenderTree/TestOptions.h	2020-09-16 22:04:34 UTC (rev 267163)
+++ trunk/Tools/DumpRenderTree/TestOptions.h	2020-09-16 22:04:43 UTC (rev 267164)
@@ -40,7 +40,6 @@
     bool enablePointerLock { false };
     bool enableDragDestinationActionLoad { false };
     bool layerBackedWebView { false };
-    bool enableIsSecureContextAttribute { true };
     bool enableInspectorAdditions { false };
     bool dumpJSConsoleLogInStdErr { false };
     bool allowCrossOriginSubresourcesToAskForCredentials { false };

Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (267163 => 267164)


--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm	2020-09-16 22:04:34 UTC (rev 267163)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm	2020-09-16 22:04:43 UTC (rev 267164)
@@ -976,7 +976,6 @@
     preferences.menuItemElementEnabled = options.enableMenuItemElement;
     preferences.keygenElementEnabled = options.enableKeygenElement;
     preferences.modernMediaControlsEnabled = options.enableModernMediaControls;
-    preferences.isSecureContextAttributeEnabled = options.enableIsSecureContextAttribute;
     preferences.inspectorAdditionsEnabled = options.enableInspectorAdditions;
     preferences.allowCrossOriginSubresourcesToAskForCredentials = options.allowCrossOriginSubresourcesToAskForCredentials;
     preferences.webAnimationsCSSIntegrationEnabled = options.enableWebAnimationsCSSIntegration;

Modified: trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp (267163 => 267164)


--- trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp	2020-09-16 22:04:34 UTC (rev 267163)
+++ trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp	2020-09-16 22:04:43 UTC (rev 267164)
@@ -913,7 +913,6 @@
     prefsPrivate->setMenuItemElementEnabled(options.enableMenuItemElement);
     prefsPrivate->setKeygenElementEnabled(options.enableKeygenElement);
     prefsPrivate->setModernMediaControlsEnabled(options.enableModernMediaControls);
-    prefsPrivate->setIsSecureContextAttributeEnabled(options.enableIsSecureContextAttribute);
     prefsPrivate->setInspectorAdditionsEnabled(options.enableInspectorAdditions);
     prefsPrivate->setRequestIdleCallbackEnabled(options.enableRequestIdleCallback);
     prefsPrivate->setAsyncClipboardAPIEnabled(options.enableAsyncClipboardAPI);

Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (267163 => 267164)


--- trunk/Tools/WebKitTestRunner/TestController.cpp	2020-09-16 22:04:34 UTC (rev 267163)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp	2020-09-16 22:04:43 UTC (rev 267164)
@@ -915,7 +915,6 @@
     WKPreferencesSetModernMediaControlsEnabled(preferences, options.enableModernMediaControls);
     WKPreferencesSetWebAuthenticationEnabled(preferences, options.enableWebAuthentication);
     WKPreferencesSetWebAuthenticationLocalAuthenticatorEnabled(preferences, options.enableWebAuthenticationLocalAuthenticator);
-    WKPreferencesSetIsSecureContextAttributeEnabled(preferences, options.enableIsSecureContextAttribute);
     WKPreferencesSetAllowCrossOriginSubresourcesToAskForCredentials(preferences, options.allowCrossOriginSubresourcesToAskForCredentials);
     WKPreferencesSetColorFilterEnabled(preferences, options.enableColorFilter);
     WKPreferencesSetPunchOutWhiteBackgroundsInDarkMode(preferences, options.punchOutWhiteBackgroundsInDarkMode);
@@ -1497,8 +1496,6 @@
             testOptions.enableWebAuthentication = parseBooleanTestHeaderValue(value);
         else if (key == "enableWebAuthenticationLocalAuthenticator")
             testOptions.enableWebAuthenticationLocalAuthenticator = parseBooleanTestHeaderValue(value);
-        else if (key == "enableIsSecureContextAttribute")
-            testOptions.enableIsSecureContextAttribute = parseBooleanTestHeaderValue(value);
         else if (key == "enableInspectorAdditions")
             testOptions.enableInspectorAdditions = parseBooleanTestHeaderValue(value);
         else if (key == "dumpJSConsoleLogInStdErr")

Modified: trunk/Tools/WebKitTestRunner/TestOptions.h (267163 => 267164)


--- trunk/Tools/WebKitTestRunner/TestOptions.h	2020-09-16 22:04:34 UTC (rev 267163)
+++ trunk/Tools/WebKitTestRunner/TestOptions.h	2020-09-16 22:04:43 UTC (rev 267164)
@@ -78,7 +78,6 @@
     bool enablePointerLock { false };
     bool enableWebAuthentication { true };
     bool enableWebAuthenticationLocalAuthenticator { true };
-    bool enableIsSecureContextAttribute { true };
     bool enableInspectorAdditions { false };
     bool shouldShowTouches { false };
     bool dumpJSConsoleLogInStdErr { false };
@@ -141,7 +140,6 @@
             || enablePointerLock != options.enablePointerLock
             || enableWebAuthentication != options.enableWebAuthentication
             || enableWebAuthenticationLocalAuthenticator != options.enableWebAuthenticationLocalAuthenticator
-            || enableIsSecureContextAttribute != options.enableIsSecureContextAttribute
             || enableInspectorAdditions != options.enableInspectorAdditions
             || dumpJSConsoleLogInStdErr != options.dumpJSConsoleLogInStdErr
             || applicationManifest != options.applicationManifest
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to