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

Unified Diff: third_party/WebKit/Source/core/frame/Frame.cpp

Issue 2696703010: Rename the flag of 'allow-top-navigation-with-user-activation' to 'allow-top-navigation-by-user-act… (Closed)
Patch Set: Add the *-with-two-flags-expected.txt that I forgot previously. Created 3 years, 10 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/frame/Frame.cpp
diff --git a/third_party/WebKit/Source/core/frame/Frame.cpp b/third_party/WebKit/Source/core/frame/Frame.cpp
index 36729ad46393f405d1d0a128f320b3bc3125a1e4..a140ad24d2af49979f1431f0b8d52d65d4a25101 100644
--- a/third_party/WebKit/Source/core/frame/Frame.cpp
+++ b/third_party/WebKit/Source/core/frame/Frame.cpp
@@ -285,12 +285,12 @@ bool Frame::canNavigateWithoutFramebusting(const Frame& targetFrame,
}
// Top navigation is forbidden unless opted-in. allow-top-navigation or
- // allow-top-navigation-with-user-activation will also skips origin checks.
+ // allow-top-navigation-by-user-activation will also skips origin checks.
if (targetFrame == tree().top()) {
if (securityContext()->isSandboxed(SandboxTopNavigation) &&
securityContext()->isSandboxed(
- SandboxTopNavigationWithUserActivation)) {
- // TODO(binlu): To add "or 'allow-top-navigation-with-user-activation'"
+ SandboxTopNavigationByUserActivation)) {
+ // TODO(binlu): To add "or 'allow-top-navigation-by-user-activation'"
// to the reason below, once the new flag is shipped.
reason =
"The frame attempting navigation of the top-level window is "
@@ -299,13 +299,13 @@ bool Frame::canNavigateWithoutFramebusting(const Frame& targetFrame,
}
if (securityContext()->isSandboxed(SandboxTopNavigation) &&
!securityContext()->isSandboxed(
- SandboxTopNavigationWithUserActivation) &&
+ SandboxTopNavigationByUserActivation) &&
!UserGestureIndicator::processingUserGesture()) {
- // With only 'allow-top-navigation-with-user-activation' (but not
+ // With only 'allow-top-navigation-by-user-activation' (but not
// 'allow-top-navigation'), top navigation requires a user gesture.
reason =
"The frame attempting navigation of the top-level window is "
- "sandboxed with the 'allow-top-navigation-with-user-activation' "
+ "sandboxed with the 'allow-top-navigation-by-user-activation' "
"flag, but has no user activation (aka gesture). See "
"https://www.chromestatus.com/feature/5629582019395584.";
return false;
« no previous file with comments | « third_party/WebKit/Source/core/dom/SandboxFlags.cpp ('k') | third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698