You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 24, 2022. It is now read-only.
https://bugs.webkit.org/show_bug.cgi?id=158121
<rdar://problem/26012994>
Reviewed by Alex Christensen.
Part 2
Implements the Secure Contexts spec., <https://w3c.github.io/webappsec-secure-contexts/> (Editor's
Draft, 17 November 2016) except for the allow-secure-context sandbox flag and restrictions on window.opener
as the former is at risk of being dropped from the specification and the latter is being discussed in
<w3c/webappsec-secure-contexts#42>. We are not making use of the Secure
Contexts functionality at the moment. We will make use of it in a subsequent commit.
* dom/Document.cpp:
(WebCore::Document::isSecureContext): Added,
* dom/Document.h:
* dom/ScriptExecutionContext.h:
(WebCore::ScriptExecutionContext::isSecureContext): Deleted; moved to class SecurityContext.
* dom/SecurityContext.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::isSecureContext): Added.
* page/DOMWindow.h:
* page/SecurityOrigin.cpp:
(WebCore::isLoopbackIPAddress): Convenience function to determine whether the host portion
of the specified URL is a valid loopback address.
(WebCore::shouldTreatAsPotentionallyTrustworthy): Implements the "Is origin potentially trustworthy?"
algorithm from the Secure Context specification.
(WebCore::SecurityOrigin::SecurityOrigin): Compute whether this origin is potentially trustworthy.
Also, use C++ brace initialization syntax in member initialization list.
* page/SecurityOrigin.h:
(WebCore::SecurityOrigin::isPotentionallyTrustworthy): Added.
* page/WindowOrWorkerGlobalScope.idl: Expose attribute isSecureContext. Fix style nit; remove
period from a comment that is not meant to be a complete sentence.
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::isSecureContext): Added.
* workers/WorkerGlobalScope.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@218028 268f45cc-cd09-0410-ab3c-d52691b4dbfc
0 commit comments