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

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

Issue 2680083002: Initial Implementation of Iframe Attribute for Feature Policy (Part 1) (Closed)
Patch Set: Codereview: nit 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
« no previous file with comments | « third_party/WebKit/Source/core/BUILD.gn ('k') | third_party/WebKit/Source/core/html/BUILD.gn » ('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 4b92e6656517dfb8465fd2dc4dd1456e9e249dd5..34e62da1ba50ddd0f22037045393c081cd60afca 100644
--- a/third_party/WebKit/Source/core/dom/SandboxFlags.cpp
+++ b/third_party/WebKit/Source/core/dom/SandboxFlags.cpp
@@ -26,6 +26,7 @@
#include "core/dom/SandboxFlags.h"
+#include "core/html/HTMLIFrameElement.h"
#include "core/html/parser/HTMLParserIdioms.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "wtf/text/StringBuilder.h"
@@ -72,21 +73,17 @@ SandboxFlags parseSandboxPolicy(const SpaceSplitString& policy,
topNavWithUserActivationInSandboxEnabled()) {
flags &= ~SandboxTopNavigationWithUserActivation;
} else {
- if (numberOfTokenErrors)
- tokenErrors.append(", '");
- else
- tokenErrors.append('\'');
+ tokenErrors.append(tokenErrors.isEmpty() ? "'" : ", '");
tokenErrors.append(sandboxToken);
- tokenErrors.append('\'');
+ tokenErrors.append("'");
numberOfTokenErrors++;
}
}
if (numberOfTokenErrors) {
- if (numberOfTokenErrors > 1)
- tokenErrors.append(" are invalid sandbox flags.");
- else
- tokenErrors.append(" is an invalid sandbox flag.");
+ tokenErrors.append(numberOfTokenErrors > 1
+ ? " are invalid sandbox flags."
+ : " is an invalid sandbox flag.");
invalidTokensErrorMessage = tokenErrors.toString();
}
« no previous file with comments | « third_party/WebKit/Source/core/BUILD.gn ('k') | third_party/WebKit/Source/core/html/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698