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

Side by Side Diff: third_party/WebKit/Source/core/dom/SandboxFlags.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, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All Rights Reserved. 2 * Copyright (C) 2013 Google Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 } else if (equalIgnoringCase(sandboxToken, "allow-orientation-lock")) { 61 } else if (equalIgnoringCase(sandboxToken, "allow-orientation-lock")) {
62 flags &= ~SandboxOrientationLock; 62 flags &= ~SandboxOrientationLock;
63 } else if (equalIgnoringCase(sandboxToken, 63 } else if (equalIgnoringCase(sandboxToken,
64 "allow-popups-to-escape-sandbox")) { 64 "allow-popups-to-escape-sandbox")) {
65 flags &= ~SandboxPropagatesToAuxiliaryBrowsingContexts; 65 flags &= ~SandboxPropagatesToAuxiliaryBrowsingContexts;
66 } else if (equalIgnoringCase(sandboxToken, "allow-modals")) { 66 } else if (equalIgnoringCase(sandboxToken, "allow-modals")) {
67 flags &= ~SandboxModals; 67 flags &= ~SandboxModals;
68 } else if (equalIgnoringCase(sandboxToken, "allow-presentation")) { 68 } else if (equalIgnoringCase(sandboxToken, "allow-presentation")) {
69 flags &= ~SandboxPresentation; 69 flags &= ~SandboxPresentation;
70 } else if (equalIgnoringCase(sandboxToken, 70 } else if (equalIgnoringCase(sandboxToken,
71 "allow-top-navigation-with-user-activation") && 71 "allow-top-navigation-by-user-activation") &&
72 RuntimeEnabledFeatures:: 72 RuntimeEnabledFeatures::
73 topNavWithUserActivationInSandboxEnabled()) { 73 topNavByUserActivationInSandboxEnabled()) {
74 flags &= ~SandboxTopNavigationWithUserActivation; 74 flags &= ~SandboxTopNavigationByUserActivation;
75 } else { 75 } else {
76 tokenErrors.append(tokenErrors.isEmpty() ? "'" : ", '"); 76 tokenErrors.append(tokenErrors.isEmpty() ? "'" : ", '");
77 tokenErrors.append(sandboxToken); 77 tokenErrors.append(sandboxToken);
78 tokenErrors.append("'"); 78 tokenErrors.append("'");
79 numberOfTokenErrors++; 79 numberOfTokenErrors++;
80 } 80 }
81 } 81 }
82 82
83 if (numberOfTokenErrors) { 83 if (numberOfTokenErrors) {
84 tokenErrors.append(numberOfTokenErrors > 1 84 tokenErrors.append(numberOfTokenErrors > 1
85 ? " are invalid sandbox flags." 85 ? " are invalid sandbox flags."
86 : " is an invalid sandbox flag."); 86 : " is an invalid sandbox flag.");
87 invalidTokensErrorMessage = tokenErrors.toString(); 87 invalidTokensErrorMessage = tokenErrors.toString();
88 } 88 }
89 89
90 return flags; 90 return flags;
91 } 91 }
92 92
93 } // namespace blink 93 } // namespace blink
OLDNEW
« 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