| Index: third_party/WebKit/Source/core/html/HTMLScriptElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLScriptElement.cpp b/third_party/WebKit/Source/core/html/HTMLScriptElement.cpp
|
| index 4834fe74a4c4f7c0bb9fe8c55748e486b7d62398..8ec9ceb9d9ac573ef81b83c8972a61103062e66f 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLScriptElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLScriptElement.cpp
|
| @@ -89,14 +89,6 @@ void HTMLScriptElement::ParseAttribute(
|
| LogUpdateAttributeIfIsolatedWorldAndInDocument("script", params);
|
| } else if (params.name == asyncAttr) {
|
| loader_->HandleAsyncAttribute();
|
| - } else if (params.name == nonceAttr) {
|
| - if (params.new_value == ContentSecurityPolicy::GetNonceReplacementString())
|
| - return;
|
| - setNonce(params.new_value);
|
| - if (RuntimeEnabledFeatures::hideNonceContentAttributeEnabled()) {
|
| - setAttribute(nonceAttr,
|
| - ContentSecurityPolicy::GetNonceReplacementString());
|
| - }
|
| } else {
|
| HTMLElement::ParseAttribute(params);
|
| }
|
| @@ -111,6 +103,7 @@ Node::InsertionNotificationRequest HTMLScriptElement::InsertedInto(
|
| UseCounter::kScriptElementWithInvalidTypeHasSrc);
|
| HTMLElement::InsertedInto(insertion_point);
|
| LogAddElementIfIsolatedWorldAndInDocument("script", srcAttr);
|
| +
|
| return kInsertionShouldCallDidNotifySubtreeInsertions;
|
| }
|
|
|
| @@ -195,8 +188,9 @@ bool HTMLScriptElement::HasChildren() const {
|
| return Node::hasChildren();
|
| }
|
|
|
| -bool HTMLScriptElement::IsNonceableElement() const {
|
| - return ContentSecurityPolicy::IsNonceableElement(this);
|
| +const AtomicString& HTMLScriptElement::GetNonceForElement() const {
|
| + return ContentSecurityPolicy::IsNonceableElement(this) ? nonce()
|
| + : g_null_atom;
|
| }
|
|
|
| bool HTMLScriptElement::AllowInlineScriptForCSP(
|
|
|