Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2838603002: Added [SecureContext] to the subtle attribute (Closed)
Patch Set: Magic test starts doing differnt things out of the blue. Need to handle this properly. Avada Kedavr… Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index e7dd89662dd23e93746204a5a1ad52d3ddb41a5e..4f8d942bcc4da09c0b1055d5d0319c5698a373e9 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -3898,8 +3898,7 @@ void Document::CloneDataFromDocument(const Document& other) {
SetMimeType(other.contentType());
}
-bool Document::IsSecureContextImpl(
- const SecureContextCheck privilege_context_check) const {
+bool Document::IsSecureContextImpl() const {
// There may be exceptions for the secure context check defined for certain
// schemes. The exceptions are applied only to the special scheme and to
// sandboxed URLs from those origins, but *not* to any children.
@@ -3935,17 +3934,15 @@ bool Document::IsSecureContextImpl(
GetSecurityOrigin()->Protocol()))
return true;
- if (privilege_context_check == kStandardSecureContextCheck) {
- if (!frame_)
- return true;
- Frame* parent = frame_->Tree().Parent();
- while (parent) {
- if (!parent->GetSecurityContext()
- ->GetSecurityOrigin()
- ->IsPotentiallyTrustworthy())
- return false;
- parent = parent->Tree().Parent();
- }
+ if (!frame_)
+ return true;
+ Frame* parent = frame_->Tree().Parent();
+ while (parent) {
+ if (!parent->GetSecurityContext()
+ ->GetSecurityOrigin()
+ ->IsPotentiallyTrustworthy())
+ return false;
+ parent = parent->Tree().Parent();
}
return true;
}
@@ -6529,19 +6526,16 @@ void Document::PlatformColorsChanged() {
GetStyleEngine().PlatformColorsChanged();
}
-bool Document::IsSecureContext(
- String& error_message,
- const SecureContextCheck privilege_context_check) const {
- if (!IsSecureContext(privilege_context_check)) {
+bool Document::IsSecureContext(String& error_message) const {
+ if (!IsSecureContext()) {
error_message = SecurityOrigin::IsPotentiallyTrustworthyErrorMessage();
return false;
}
return true;
}
-bool Document::IsSecureContext(
- const SecureContextCheck privilege_context_check) const {
- bool is_secure = IsSecureContextImpl(privilege_context_check);
+bool Document::IsSecureContext() const {
+ bool is_secure = IsSecureContextImpl();
if (GetSandboxFlags() != kSandboxNone) {
UseCounter::Count(
*this, is_secure
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/ExecutionContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698