| Index: third_party/WebKit/Source/core/svg/SVGElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/svg/SVGElement.cpp b/third_party/WebKit/Source/core/svg/SVGElement.cpp
|
| index 452f24e069c1ef0422edca218d0dc3559ba10685..7b4e56a8a23972bcac4f9cb85c3c094d1bd6504e 100644
|
| --- a/third_party/WebKit/Source/core/svg/SVGElement.cpp
|
| +++ b/third_party/WebKit/Source/core/svg/SVGElement.cpp
|
| @@ -40,6 +40,7 @@
|
| #include "core/dom/shadow/ShadowRoot.h"
|
| #include "core/events/Event.h"
|
| #include "core/frame/Settings.h"
|
| +#include "core/frame/csp/ContentSecurityPolicy.h"
|
| #include "core/html/HTMLElement.h"
|
| #include "core/inspector/ConsoleMessage.h"
|
| #include "core/layout/LayoutObject.h"
|
| @@ -407,6 +408,16 @@ Node::InsertionNotificationRequest SVGElement::InsertedInto(
|
| Element::InsertedInto(root_parent);
|
| UpdateRelativeLengthsInformation();
|
| BuildPendingResourcesIfNeeded();
|
| +
|
| + if (hasAttribute(nonceAttr) && getAttribute(nonceAttr) != g_empty_atom) {
|
| + setNonce(getAttribute(nonceAttr));
|
| + if (RuntimeEnabledFeatures::hideNonceContentAttributeEnabled() &&
|
| + InActiveDocument() &&
|
| + GetDocument().GetContentSecurityPolicy()->HasHeaderDeliveredPolicy()) {
|
| + setAttribute(nonceAttr, g_empty_atom);
|
| + }
|
| + }
|
| +
|
| return kInsertionDone;
|
| }
|
|
|
|
|