https://bugs.webkit.org/show_bug.cgi?id=158121
<rdar://problem/
26012994>
Reviewed by Brent Fulgham.
Part 4
Source/JavaScriptCore:
Adds isSecureContext to the list of common identifiers as needed to support
toggling its exposure from a runtime enabled feature flag.
* runtime/CommonIdentifiers.h:
Source/WebCore:
Adds runtime enabled feature flag, isSecureContextAttributeEnabled, to toggle exposing
the global object property isSecureContext (defaults: true - expose the property).
Test: security/isSecureContext-disabled.html
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setIsSecureContextAttributeEnabled):
(WebCore::RuntimeEnabledFeatures::isSecureContextAttributeEnabled):
* page/WindowOrWorkerGlobalScope.idl:
Source/WebKit/mac:
Adds a preference to toggle the runtime enabled feature flag isSecureContextAttributeEnabled.
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences isSecureContextAttributeEnabled]):
(-[WebPreferences setIsSecureContextAttributeEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
Source/WebKit/win:
Adds a preference to toggle the runtime enabled feature flag isSecureContextAttributeEnabled.
* Interfaces/IWebPreferencesPrivate.idl: Bump the version.
* WebPreferenceKeysPrivate.h:
* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings):
(WebPreferences::QueryInterface):
(WebPreferences::setIsSecureContextAttributeEnabled):
(WebPreferences::isSecureContextAttributeEnabled):
* WebPreferences.h:
* WebView.cpp:
(WebView::notifyPreferencesChanged):
Source/WebKit2:
Adds a preference to toggle the runtime enabled feature flag isSecureContextAttributeEnabled.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetIsSecureContextAttributeEnabled):
(WKPreferencesGetIsSecureContextAttributeEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
Tools:
Expose the isSecureContext attribute by default in DumpRenderTree and WebKitTestRunner.
Teach DumpRenderTree for Mac and WebKitTestRunner to parse the test option enableIsSecureContextAttribute
to toggle the runtime enabled feature flag isSecureContextAttributeEnabled.
* DumpRenderTree/TestOptions.h:
* DumpRenderTree/TestOptions.mm:
(TestOptions::TestOptions):
* DumpRenderTree/mac/DumpRenderTree.mm:
(setWebPreferencesForTestOptions):
* DumpRenderTree/win/DumpRenderTree.cpp:
(enableExperimentalFeatures):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions):
LayoutTests:
Adds a test to ensure that the global object property isSecureContext is not
exposed (is undefined) when the runtime enabled feature flag isSecureContextAttributeEnabled
is disabled.
* platform/win/TestExpectations: Skip the test as DumpRenderTree on Windows does not support
parsing of test options. See <https://bugs.webkit.org/show_bug.cgi?id=173281> for more details.
* security/isSecureContext-disabled-expected.txt: Added.
* security/isSecureContext-disabled.html: Added.
* security/resources/worker-isSecureContext-disabled.js: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218196
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2017-06-13 Daniel Bates <dabates@apple.com>
+
+ Implement W3C Secure Contexts Draft Specification
+ https://bugs.webkit.org/show_bug.cgi?id=158121
+ <rdar://problem/26012994>
+
+ Reviewed by Brent Fulgham.
+
+ Part 4
+
+ Adds a test to ensure that the global object property isSecureContext is not
+ exposed (is undefined) when the runtime enabled feature flag isSecureContextAttributeEnabled
+ is disabled.
+
+ * platform/win/TestExpectations: Skip the test as DumpRenderTree on Windows does not support
+ parsing of test options. See <https://bugs.webkit.org/show_bug.cgi?id=173281> for more details.
+ * security/isSecureContext-disabled-expected.txt: Added.
+ * security/isSecureContext-disabled.html: Added.
+ * security/resources/worker-isSecureContext-disabled.js: Added.
+
2017-06-13 Youenn Fablet <youenn@apple.com>
getReceivers() should return transceivers that have only an active receiver
################################################################################
############## Missing Functionality Prevents Testing ################
################################################################################
+
+# FIXME: Implement test options parsing (<!-- webkit-test-runner [ ... ] -->).
+webkit.org/b/173281 security/isSecureContext-disabled.html [ Skip ]
+
# TODO HW filters not yet supported on Windows
webkit.org/b/74716 css3/filters/effect-blur-hw.html [ Skip ]
webkit.org/b/74716 css3/filters/effect-combined-hw.html [ Skip ]
--- /dev/null
+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
+
--- /dev/null
+<!DOCTYPE html><!-- webkit-test-runner [ enableIsSecureContextAttribute=false ] -->
+<html>
+<head>
+<script src="../resources/js-test.js"></script>
+</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>
--- /dev/null
+importScripts("../../resources/js-test.js");
+
+if (typeof(self.isSecureContext) === 'undefined')
+ testPassed("self.isSecureContext is undefined.");
+else
+ testFailed("self.isSecureContext is defined.");
+finishJSTest();
+2017-06-13 Daniel Bates <dabates@apple.com>
+
+ Implement W3C Secure Contexts Draft Specification
+ https://bugs.webkit.org/show_bug.cgi?id=158121
+ <rdar://problem/26012994>
+
+ Reviewed by Brent Fulgham.
+
+ Part 4
+
+ Adds isSecureContext to the list of common identifiers as needed to support
+ toggling its exposure from a runtime enabled feature flag.
+
+ * runtime/CommonIdentifiers.h:
+
2017-06-13 Don Olmstead <don.olmstead@sony.com>
[JSC] Remove redundant includes in config.h
macro(isArray) \
macro(isEnabled) \
macro(isPrototypeOf) \
+ macro(isSecureContext) \
macro(isView) \
macro(isWatchpoint) \
macro(jettisonReason) \
+2017-06-13 Daniel Bates <dabates@apple.com>
+
+ Implement W3C Secure Contexts Draft Specification
+ https://bugs.webkit.org/show_bug.cgi?id=158121
+ <rdar://problem/26012994>
+
+ Reviewed by Brent Fulgham.
+
+ Part 4
+
+ Adds runtime enabled feature flag, isSecureContextAttributeEnabled, to toggle exposing
+ the global object property isSecureContext (defaults: true - expose the property).
+
+ Test: security/isSecureContext-disabled.html
+
+ * page/RuntimeEnabledFeatures.h:
+ (WebCore::RuntimeEnabledFeatures::setIsSecureContextAttributeEnabled):
+ (WebCore::RuntimeEnabledFeatures::isSecureContextAttributeEnabled):
+ * page/WindowOrWorkerGlobalScope.idl:
+
2017-06-13 Jer Noble <jer.noble@apple.com>
Protect lifetime of media element during HTMLMediaElement::notifyAboutPlaying()
void setCredentialManagementEnabled(bool isEnabled) { m_isCredentialManagementEnabled = isEnabled; }
bool credentialManagementEnabled() const { return m_isCredentialManagementEnabled; }
+ void setIsSecureContextAttributeEnabled(bool isEnabled) { m_isSecureContextAttributeEnabled = isEnabled; }
+ bool isSecureContextAttributeEnabled() const { return m_isSecureContextAttributeEnabled; }
+
#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
void setIndexedDBWorkersEnabled(bool isEnabled) { m_isIndexedDBWorkersEnabled = isEnabled; }
bool indexedDBWorkersEnabled() const { return m_isIndexedDBWorkersEnabled; }
bool m_isUserTimingEnabled { false };
bool m_isInteractiveFormValidationEnabled { false };
bool m_isCredentialManagementEnabled { false };
+ bool m_isSecureContextAttributeEnabled { false };
bool m_isDisplayContentsEnabled { false };
bool m_isShadowDOMEnabled { true };
[MayThrowException] DOMString btoa(DOMString string);
// Secure Contexts
- readonly attribute boolean isSecureContext;
+ [EnabledAtRuntime=IsSecureContextAttribute] readonly attribute boolean isSecureContext;
};
+2017-06-13 Daniel Bates <dabates@apple.com>
+
+ Implement W3C Secure Contexts Draft Specification
+ https://bugs.webkit.org/show_bug.cgi?id=158121
+ <rdar://problem/26012994>
+
+ Reviewed by Brent Fulgham.
+
+ Part 4
+
+ Adds a preference to toggle the runtime enabled feature flag isSecureContextAttributeEnabled.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences isSecureContextAttributeEnabled]):
+ (-[WebPreferences setIsSecureContextAttributeEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChanged:]):
+
2017-06-13 Sam Weinig <sam@webkit.org>
Rename JSDOMWindowShell to JSDOMWindowProxy to match the HTML5 spec.
#define WebKitMediaPreloadingEnabledPreferenceKey @"WebKitMediaPreloadingEnabled"
#define WebKitCredentialManagementEnabledPreferenceKey @"WebKitCredentialManagementEnabled"
#define WebKitMediaUserGestureInheritsFromDocument @"WebKitMediaUserGestureInheritsFromDocument"
+#define WebKitIsSecureContextAttributeEnabledPreferenceKey @"WebKitIsSecureContextAttributeEnabled"
#if !TARGET_OS_IPHONE
// These are private both because callers should be using the cover methods and because the
@NO, WebKitResourceTimingEnabledPreferenceKey,
@NO, WebKitCredentialManagementEnabledPreferenceKey,
@NO, WebKitMediaUserGestureInheritsFromDocument,
+ @NO, WebKitIsSecureContextAttributeEnabledPreferenceKey,
(NSString *)Settings::defaultMediaContentTypesRequiringHardwareSupport(), WebKitMediaContentTypesRequiringHardwareSupportPreferenceKey,
nil];
{
[self _setStringValue:value forKey:WebKitMediaContentTypesRequiringHardwareSupportPreferenceKey];
}
+
+- (BOOL)isSecureContextAttributeEnabled
+{
+ return [self _boolValueForKey:WebKitIsSecureContextAttributeEnabledPreferenceKey];
+}
+
+- (void)setIsSecureContextAttributeEnabled:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitIsSecureContextAttributeEnabledPreferenceKey];
+}
+
@end
@implementation WebPreferences (WebInternal)
- (void)setCredentialManagementEnabled:(BOOL)flag;
- (BOOL)credentialManagementEnabled;
+- (void)setIsSecureContextAttributeEnabled:(BOOL)flag;
+- (BOOL)isSecureContextAttributeEnabled;
+
@property (nonatomic) BOOL visualViewportEnabled;
@property (nonatomic) BOOL largeImageAsyncDecodingEnabled;
@property (nonatomic) BOOL animatedImageAsyncDecodingEnabled;
@property (nonatomic) BOOL linkPreloadEnabled;
@property (nonatomic) BOOL credentialManagementEnabled;
@property (nonatomic) BOOL mediaUserGestureInheritsFromDocument;
+@property (nonatomic) BOOL isSecureContextAttributeEnabled;
#if TARGET_OS_IPHONE
@property (nonatomic) BOOL quickLookDocumentSavingEnabled;
RuntimeEnabledFeatures::sharedFeatures().setLinkPreloadEnabled(preferences.linkPreloadEnabled);
RuntimeEnabledFeatures::sharedFeatures().setMediaPreloadingEnabled(preferences.mediaPreloadingEnabled);
RuntimeEnabledFeatures::sharedFeatures().setCredentialManagementEnabled(preferences.credentialManagementEnabled);
+ RuntimeEnabledFeatures::sharedFeatures().setIsSecureContextAttributeEnabled(preferences.isSecureContextAttributeEnabled);
NSTimeInterval timeout = [preferences incrementalRenderingSuppressionTimeoutInSeconds];
if (timeout > 0)
+2017-06-13 Daniel Bates <dabates@apple.com>
+
+ Implement W3C Secure Contexts Draft Specification
+ https://bugs.webkit.org/show_bug.cgi?id=158121
+ <rdar://problem/26012994>
+
+ Reviewed by Brent Fulgham.
+
+ Part 4
+
+ Adds a preference to toggle the runtime enabled feature flag isSecureContextAttributeEnabled.
+
+ * Interfaces/IWebPreferencesPrivate.idl: Bump the version.
+ * WebPreferenceKeysPrivate.h:
+ * WebPreferences.cpp:
+ (WebPreferences::initializeDefaultSettings):
+ (WebPreferences::QueryInterface):
+ (WebPreferences::setIsSecureContextAttributeEnabled):
+ (WebPreferences::isSecureContextAttributeEnabled):
+ * WebPreferences.h:
+ * WebView.cpp:
+ (WebView::notifyPreferencesChanged):
+
2017-06-13 Per Arne Vollan <pvollan@apple.com>
[Win] WebKit fails to paint the bottom lines of the window at 125% scale.
HRESULT clearNetworkLoaderSession();
HRESULT switchNetworkLoaderToNewTestingSession();
}
+
+[uuid(9C4CBF53-19BC-46B3-831E-6A8B88200F20)]
+interface IWebPreferencesPrivate5 : IWebPreferencesPrivate4
+{
+ HRESULT isSecureContextAttributeEnabled([out, retval] BOOL*);
+ HRESULT setIsSecureContextAttributeEnabled([in] BOOL enabled);
+}
#define WebKitLinkPreloadEnabledPreferenceKey "WebKitLinkPreloadEnabled"
#define WebKitMediaPreloadingEnabledPreferenceKey "WebKitMediaPreloadingEnabled"
+
+#define WebKitIsSecureContextAttributeEnabledPreferenceKey "WebKitIsSecureContextAttributeEnabled"
CFDictionaryAddValue(defaults, CFSTR(WebKitMediaPreloadingEnabledPreferenceKey), kCFBooleanFalse);
+ CFDictionaryAddValue(defaults, CFSTR(WebKitIsSecureContextAttributeEnabledPreferenceKey), kCFBooleanFalse);
+
defaultSettings = defaults;
}
*ppvObject = static_cast<IWebPreferencesPrivate3*>(this);
else if (IsEqualGUID(riid, IID_IWebPreferencesPrivate4))
*ppvObject = static_cast<IWebPreferencesPrivate4*>(this);
+ else if (IsEqualGUID(riid, IID_IWebPreferencesPrivate5))
+ *ppvObject = static_cast<IWebPreferencesPrivate5*>(this);
else if (IsEqualGUID(riid, CLSID_WebPreferences))
*ppvObject = this;
else
return S_OK;
}
+HRESULT WebPreferences::setIsSecureContextAttributeEnabled(BOOL enabled)
+{
+ setBoolValue(WebKitIsSecureContextAttributeEnabledPreferenceKey, enabled);
+ return S_OK;
+}
+
+HRESULT WebPreferences::isSecureContextAttributeEnabled(_Out_ BOOL* enabled)
+{
+ if (!enabled)
+ return E_POINTER;
+ *enabled = boolValueForKey(WebKitIsSecureContextAttributeEnabledPreferenceKey);
+ return S_OK;
+}
+
HRESULT WebPreferences::setApplicationId(BSTR applicationId)
{
m_applicationId = String(applicationId).createCFString();
#include <WebCore/BString.h>
#include <wtf/RetainPtr.h>
-class WebPreferences : public IWebPreferences, public IWebPreferencesPrivate4 {
+class WebPreferences : public IWebPreferences, public IWebPreferencesPrivate5 {
public:
static WebPreferences* createInstance();
protected:
virtual HRESULT STDMETHODCALLTYPE clearNetworkLoaderSession();
virtual HRESULT STDMETHODCALLTYPE switchNetworkLoaderToNewTestingSession();
+ // IWebPreferencesPrivate5
+ virtual HRESULT STDMETHODCALLTYPE isSecureContextAttributeEnabled(_Out_ BOOL*);
+ virtual HRESULT STDMETHODCALLTYPE setIsSecureContextAttributeEnabled(BOOL);
+
// WebPreferences
// This method accesses a different preference key than developerExtrasEnabled.
settings.setShouldDisplayTextDescriptions(enabled);
#endif
- COMPtr<IWebPreferencesPrivate4> prefsPrivate(Query, preferences);
+ COMPtr<IWebPreferencesPrivate5> prefsPrivate { Query, preferences };
if (prefsPrivate) {
hr = prefsPrivate->localStorageDatabasePath(&str);
if (FAILED(hr))
return hr;
RuntimeEnabledFeatures::sharedFeatures().setMediaPreloadingEnabled(!!enabled);
+ hr = prefsPrivate->isSecureContextAttributeEnabled(&enabled);
+ if (FAILED(hr))
+ return hr;
+ RuntimeEnabledFeatures::sharedFeatures().setIsSecureContextAttributeEnabled(!!enabled);
+
hr = preferences->privateBrowsingEnabled(&enabled);
if (FAILED(hr))
return hr;
+2017-06-13 Daniel Bates <dabates@apple.com>
+
+ Implement W3C Secure Contexts Draft Specification
+ https://bugs.webkit.org/show_bug.cgi?id=158121
+ <rdar://problem/26012994>
+
+ Reviewed by Brent Fulgham.
+
+ Part 4
+
+ Adds a preference to toggle the runtime enabled feature flag isSecureContextAttributeEnabled.
+
+ * Shared/WebPreferencesDefinitions.h:
+ * UIProcess/API/C/WKPreferences.cpp:
+ (WKPreferencesSetIsSecureContextAttributeEnabled):
+ (WKPreferencesGetIsSecureContextAttributeEnabled):
+ * UIProcess/API/C/WKPreferencesRefPrivate.h:
+ * WebProcess/InjectedBundle/InjectedBundle.cpp:
+ (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::updatePreferences):
+
2017-06-13 Brent Fulgham <bfulgham@apple.com>
[WK2][macOS] Allow AppleEvents in Citrix View Plugin
macro(ConstantPropertiesEnabled, constantPropertiesEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "Constant Properties", "Enable CSS constant() properties") \
macro(DisplayContentsEnabled, displayContentsEnabled, Bool, bool, false, "CSS display: contents", "Enable CSS display: contents support") \
macro(SpringTimingFunctionEnabled, springTimingFunctionEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "CSS Spring Animations", "CSS Spring Animation prototype") \
+ macro(IsSecureContextAttributeEnabled, isSecureContextAttributeEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "isSecureContext attribute", "Enable isSecureContext attribute") \
macro(LinkPreloadEnabled, linkPreloadEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "Link Preload", "Link preload support") \
macro(WebRTCLegacyAPIDisabled, webRTCLegacyAPIDisabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "Remove Legacy WebRTC API", "Remove Legacy WebRTC API") \
macro(SubresourceIntegrityEnabled, subresourceIntegrityEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "SubresourceIntegrity", "Enable SubresourceIntegrity") \
return toCopiedAPI(toImpl(preferencesRef)->mediaContentTypesRequiringHardwareSupport());
}
+void WKPreferencesSetIsSecureContextAttributeEnabled(WKPreferencesRef preferencesRef, bool flag)
+{
+ toImpl(preferencesRef)->setIsSecureContextAttributeEnabled(flag);
+}
+
+bool WKPreferencesGetIsSecureContextAttributeEnabled(WKPreferencesRef preferencesRef)
+{
+ return toImpl(preferencesRef)->isSecureContextAttributeEnabled();
+}
WK_EXPORT void WKPreferencesSetMediaContentTypesRequiringHardwareSupport(WKPreferencesRef, WKStringRef);
WK_EXPORT WKStringRef WKPreferencesCopyMediaContentTypesRequiringHardwareSupport(WKPreferencesRef);
+// Defaults to false.
+WK_EXPORT void WKPreferencesSetIsSecureContextAttributeEnabled(WKPreferencesRef, bool flag);
+WK_EXPORT bool WKPreferencesGetIsSecureContextAttributeEnabled(WKPreferencesRef);
+
#ifdef __cplusplus
}
#endif
RuntimeEnabledFeatures::sharedFeatures().setWebRTCLegacyAPIEnabled(enabled);
#endif
+ if (preference == "WebKitIsSecureContextAttributeEnabled") {
+ WebPreferencesStore::overrideBoolValueForKey(WebPreferencesKey::isSecureContextAttributeEnabledKey(), enabled);
+ RuntimeEnabledFeatures::sharedFeatures().setIsSecureContextAttributeEnabled(enabled);
+ }
+
// Map the names used in LayoutTests with the names used in WebCore::Settings and WebPreferencesStore.
#define FOR_EACH_OVERRIDE_BOOL_PREFERENCE(macro) \
macro(WebKitAcceleratedCompositingEnabled, AcceleratedCompositingEnabled, acceleratedCompositingEnabled) \
RuntimeEnabledFeatures::sharedFeatures().setLinkPreloadEnabled(store.getBoolValueForKey(WebPreferencesKey::linkPreloadEnabledKey()));
RuntimeEnabledFeatures::sharedFeatures().setMediaPreloadingEnabled(store.getBoolValueForKey(WebPreferencesKey::mediaPreloadingEnabledKey()));
RuntimeEnabledFeatures::sharedFeatures().setCredentialManagementEnabled(store.getBoolValueForKey(WebPreferencesKey::credentialManagementEnabledKey()));
+ RuntimeEnabledFeatures::sharedFeatures().setIsSecureContextAttributeEnabled(store.getBoolValueForKey(WebPreferencesKey::isSecureContextAttributeEnabledKey()));
bool processSuppressionEnabled = store.getBoolValueForKey(WebPreferencesKey::pageVisibilityBasedProcessSuppressionEnabledKey());
if (m_processSuppressionEnabled != processSuppressionEnabled) {
+2017-06-13 Daniel Bates <dabates@apple.com>
+
+ Implement W3C Secure Contexts Draft Specification
+ https://bugs.webkit.org/show_bug.cgi?id=158121
+ <rdar://problem/26012994>
+
+ Reviewed by Brent Fulgham.
+
+ Part 4
+
+ Expose the isSecureContext attribute by default in DumpRenderTree and WebKitTestRunner.
+ Teach DumpRenderTree for Mac and WebKitTestRunner to parse the test option enableIsSecureContextAttribute
+ to toggle the runtime enabled feature flag isSecureContextAttributeEnabled.
+
+ * DumpRenderTree/TestOptions.h:
+ * DumpRenderTree/TestOptions.mm:
+ (TestOptions::TestOptions):
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (setWebPreferencesForTestOptions):
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (enableExperimentalFeatures):
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::resetPreferencesToConsistentValues):
+ (WTR::updateTestOptionsFromTestHeader):
+ * WebKitTestRunner/TestOptions.h:
+ (WTR::TestOptions::hasSameInitializationOptions):
+
2017-06-13 Alex Christensen <achristensen@webkit.org>
Test persistent WKHTTPCookieStorages on iOS
bool enableCredentialManagement { false };
bool enableDragDestinationActionLoad { false };
bool layerBackedWebView { false };
+ bool enableIsSecureContextAttribute { true };
TestOptions(NSURL*, const TestCommand&);
bool webViewIsCompatibleWithOptions(const TestOptions&) const;
this->enableDragDestinationActionLoad = parseBooleanTestHeaderValue(value);
else if (key == "layerBackedWebView")
this->layerBackedWebView = parseBooleanTestHeaderValue(value);
+ else if (key == "enableIsSecureContextAttribute")
+ this->enableIsSecureContextAttribute = parseBooleanTestHeaderValue(value);
pairStart = pairEnd + 1;
}
}
preferences.intersectionObserverEnabled = options.enableIntersectionObserver;
preferences.modernMediaControlsEnabled = options.enableModernMediaControls;
preferences.credentialManagementEnabled = options.enableCredentialManagement;
+ preferences.isSecureContextAttributeEnabled = options.enableIsSecureContextAttribute;
}
// Called once on DumpRenderTree startup.
static void enableExperimentalFeatures(IWebPreferences* preferences)
{
- COMPtr<IWebPreferencesPrivate4> prefsPrivate4(Query, preferences);
+ COMPtr<IWebPreferencesPrivate5> prefsPrivate { Query, preferences };
// FIXME: CSSGridLayout
// FIXME: SpringTimingFunction
// FIXME: Gamepads
- prefsPrivate4->setLinkPreloadEnabled(TRUE);
- prefsPrivate4->setMediaPreloadingEnabled(TRUE);
+ prefsPrivate->setLinkPreloadEnabled(TRUE);
+ prefsPrivate->setMediaPreloadingEnabled(TRUE);
// FIXME: ModernMediaControls
// FIXME: InputEvents
// FIXME: SubtleCrypto
- prefsPrivate4->setWebAnimationsEnabled(TRUE);
+ prefsPrivate->setWebAnimationsEnabled(TRUE);
// FIXME: WebGL2
// FIXME: WebRTC
+ prefsPrivate->setIsSecureContextAttributeEnabled(TRUE);
}
static void resetWebPreferencesToConsistentValues(IWebPreferences* preferences)
WKPreferencesSetIntersectionObserverEnabled(preferences, options.enableIntersectionObserver);
WKPreferencesSetModernMediaControlsEnabled(preferences, options.enableModernMediaControls);
WKPreferencesSetCredentialManagementEnabled(preferences, options.enableCredentialManagement);
+ WKPreferencesSetIsSecureContextAttributeEnabled(preferences, options.enableIsSecureContextAttribute);
static WKStringRef defaultTextEncoding = WKStringCreateWithUTF8CString("ISO-8859-1");
WKPreferencesSetDefaultTextEncodingName(preferences, defaultTextEncoding);
testOptions.enablePointerLock = parseBooleanTestHeaderValue(value);
if (key == "enableCredentialManagement")
testOptions.enableCredentialManagement = parseBooleanTestHeaderValue(value);
+ if (key == "enableIsSecureContextAttribute")
+ testOptions.enableIsSecureContextAttribute = parseBooleanTestHeaderValue(value);
pairStart = pairEnd + 1;
}
}
bool enableModernMediaControls { true };
bool enablePointerLock { false };
bool enableCredentialManagement { false };
+ bool enableIsSecureContextAttribute { true };
float deviceScaleFactor { 1 };
Vector<String> overrideLanguages;
|| enableIntersectionObserver != options.enableIntersectionObserver
|| enableModernMediaControls != options.enableModernMediaControls
|| enablePointerLock != options.enablePointerLock
- || enableCredentialManagement != options.enableCredentialManagement)
+ || enableCredentialManagement != options.enableCredentialManagement
+ || enableIsSecureContextAttribute != options.enableIsSecureContextAttribute)
return false;
return true;