| 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();
|
| }
|
|
|
|
|