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

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

Issue 2645733002: Add an 'allow-top-navigation-with-user-interaction' sandbox flag. (Closed)
Patch Set: Fix the tests finally! Created 3 years, 11 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/SandboxFlags.h ('k') | third_party/WebKit/Source/core/frame/Frame.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/SandboxFlags.cpp
diff --git a/third_party/WebKit/Source/core/dom/SandboxFlags.cpp b/third_party/WebKit/Source/core/dom/SandboxFlags.cpp
index c4b7c8b893075946853aa0ce0dd1e7f571d2af4a..4b92e6656517dfb8465fd2dc4dd1456e9e249dd5 100644
--- a/third_party/WebKit/Source/core/dom/SandboxFlags.cpp
+++ b/third_party/WebKit/Source/core/dom/SandboxFlags.cpp
@@ -27,6 +27,7 @@
#include "core/dom/SandboxFlags.h"
#include "core/html/parser/HTMLParserIdioms.h"
+#include "platform/RuntimeEnabledFeatures.h"
#include "wtf/text/StringBuilder.h"
namespace blink {
@@ -65,6 +66,11 @@ SandboxFlags parseSandboxPolicy(const SpaceSplitString& policy,
flags &= ~SandboxModals;
} else if (equalIgnoringCase(sandboxToken, "allow-presentation")) {
flags &= ~SandboxPresentation;
+ } else if (equalIgnoringCase(sandboxToken,
+ "allow-top-navigation-with-user-activation") &&
+ RuntimeEnabledFeatures::
+ topNavWithUserActivationInSandboxEnabled()) {
+ flags &= ~SandboxTopNavigationWithUserActivation;
} else {
if (numberOfTokenErrors)
tokenErrors.append(", '");
« no previous file with comments | « third_party/WebKit/Source/core/dom/SandboxFlags.h ('k') | third_party/WebKit/Source/core/frame/Frame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698