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

Side by Side Diff: third_party/WebKit/Source/core/dom/SandboxFlags.cpp

Issue 2239303003: Remove SandboxBlocksModals runtime flag (status=stable) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 } else if (equalIgnoringCase(sandboxToken, "allow-top-navigation")) { 54 } else if (equalIgnoringCase(sandboxToken, "allow-top-navigation")) {
55 flags &= ~SandboxTopNavigation; 55 flags &= ~SandboxTopNavigation;
56 } else if (equalIgnoringCase(sandboxToken, "allow-popups")) { 56 } else if (equalIgnoringCase(sandboxToken, "allow-popups")) {
57 flags &= ~SandboxPopups; 57 flags &= ~SandboxPopups;
58 } else if (equalIgnoringCase(sandboxToken, "allow-pointer-lock")) { 58 } else if (equalIgnoringCase(sandboxToken, "allow-pointer-lock")) {
59 flags &= ~SandboxPointerLock; 59 flags &= ~SandboxPointerLock;
60 } else if (equalIgnoringCase(sandboxToken, "allow-orientation-lock")) { 60 } else if (equalIgnoringCase(sandboxToken, "allow-orientation-lock")) {
61 flags &= ~SandboxOrientationLock; 61 flags &= ~SandboxOrientationLock;
62 } else if (equalIgnoringCase(sandboxToken, "allow-popups-to-escape-sandb ox") && RuntimeEnabledFeatures::unsandboxedAuxiliaryEnabled()) { 62 } else if (equalIgnoringCase(sandboxToken, "allow-popups-to-escape-sandb ox") && RuntimeEnabledFeatures::unsandboxedAuxiliaryEnabled()) {
63 flags &= ~SandboxPropagatesToAuxiliaryBrowsingContexts; 63 flags &= ~SandboxPropagatesToAuxiliaryBrowsingContexts;
64 } else if (equalIgnoringCase(sandboxToken, "allow-modals") && RuntimeEna bledFeatures::sandboxBlocksModalsEnabled()) { 64 } else if (equalIgnoringCase(sandboxToken, "allow-modals")) {
65 flags &= ~SandboxModals; 65 flags &= ~SandboxModals;
66 } else if (equalIgnoringCase(sandboxToken, "allow-presentation")) { 66 } else if (equalIgnoringCase(sandboxToken, "allow-presentation")) {
67 flags &= ~SandboxPresentation; 67 flags &= ~SandboxPresentation;
68 } else { 68 } else {
69 if (numberOfTokenErrors) 69 if (numberOfTokenErrors)
70 tokenErrors.append(", '"); 70 tokenErrors.append(", '");
71 else 71 else
72 tokenErrors.append('\''); 72 tokenErrors.append('\'');
73 tokenErrors.append(sandboxToken); 73 tokenErrors.append(sandboxToken);
74 tokenErrors.append('\''); 74 tokenErrors.append('\'');
75 numberOfTokenErrors++; 75 numberOfTokenErrors++;
76 } 76 }
77 } 77 }
78 78
79 if (numberOfTokenErrors) { 79 if (numberOfTokenErrors) {
80 if (numberOfTokenErrors > 1) 80 if (numberOfTokenErrors > 1)
81 tokenErrors.append(" are invalid sandbox flags."); 81 tokenErrors.append(" are invalid sandbox flags.");
82 else 82 else
83 tokenErrors.append(" is an invalid sandbox flag."); 83 tokenErrors.append(" is an invalid sandbox flag.");
84 invalidTokensErrorMessage = tokenErrors.toString(); 84 invalidTokensErrorMessage = tokenErrors.toString();
85 } 85 }
86 86
87 return flags; 87 return flags;
88 } 88 }
89 89
90 } // namespace blink 90 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698