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

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

Issue 272213002: Add support for 'allow-orientation-lock' sandboxing directive (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revert bad local change Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/SandboxFlags.h ('k') | Source/modules/screen_orientation/ScreenOrientation.h » ('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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 flags &= ~SandboxForms; 58 flags &= ~SandboxForms;
59 } else if (equalIgnoringCase(sandboxToken, "allow-scripts")) { 59 } else if (equalIgnoringCase(sandboxToken, "allow-scripts")) {
60 flags &= ~SandboxScripts; 60 flags &= ~SandboxScripts;
61 flags &= ~SandboxAutomaticFeatures; 61 flags &= ~SandboxAutomaticFeatures;
62 } else if (equalIgnoringCase(sandboxToken, "allow-top-navigation")) { 62 } else if (equalIgnoringCase(sandboxToken, "allow-top-navigation")) {
63 flags &= ~SandboxTopNavigation; 63 flags &= ~SandboxTopNavigation;
64 } else if (equalIgnoringCase(sandboxToken, "allow-popups")) { 64 } else if (equalIgnoringCase(sandboxToken, "allow-popups")) {
65 flags &= ~SandboxPopups; 65 flags &= ~SandboxPopups;
66 } else if (equalIgnoringCase(sandboxToken, "allow-pointer-lock")) { 66 } else if (equalIgnoringCase(sandboxToken, "allow-pointer-lock")) {
67 flags &= ~SandboxPointerLock; 67 flags &= ~SandboxPointerLock;
68 } else if (equalIgnoringCase(sandboxToken, "allow-orientation-lock")) {
69 flags &= ~SandboxOrientationLock;
68 } else { 70 } else {
69 if (numberOfTokenErrors) 71 if (numberOfTokenErrors)
70 tokenErrors.appendLiteral(", '"); 72 tokenErrors.appendLiteral(", '");
71 else 73 else
72 tokenErrors.append('\''); 74 tokenErrors.append('\'');
73 tokenErrors.append(sandboxToken); 75 tokenErrors.append(sandboxToken);
74 tokenErrors.append('\''); 76 tokenErrors.append('\'');
75 numberOfTokenErrors++; 77 numberOfTokenErrors++;
76 } 78 }
77 79
78 start = end + 1; 80 start = end + 1;
79 } 81 }
80 82
81 if (numberOfTokenErrors) { 83 if (numberOfTokenErrors) {
82 if (numberOfTokenErrors > 1) 84 if (numberOfTokenErrors > 1)
83 tokenErrors.appendLiteral(" are invalid sandbox flags."); 85 tokenErrors.appendLiteral(" are invalid sandbox flags.");
84 else 86 else
85 tokenErrors.appendLiteral(" is an invalid sandbox flag."); 87 tokenErrors.appendLiteral(" is an invalid sandbox flag.");
86 invalidTokensErrorMessage = tokenErrors.toString(); 88 invalidTokensErrorMessage = tokenErrors.toString();
87 } 89 }
88 90
89 return flags; 91 return flags;
90 } 92 }
91 93
92 } 94 }
OLDNEW
« no previous file with comments | « Source/core/dom/SandboxFlags.h ('k') | Source/modules/screen_orientation/ScreenOrientation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698