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

Unified Diff: third_party/WebKit/Source/core/svg/SVGScriptElement.h

Issue 2628733005: Experiment with hiding <script>'s 'nonce' content attribute. (Closed)
Patch Set: Ugh. Created 3 years, 11 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
Index: third_party/WebKit/Source/core/svg/SVGScriptElement.h
diff --git a/third_party/WebKit/Source/core/svg/SVGScriptElement.h b/third_party/WebKit/Source/core/svg/SVGScriptElement.h
index f1679b5330c70943cf15d3fa5484cf228d3dff02..ebb36066214c8d5d6c672695a48c00125d8d4310 100644
--- a/third_party/WebKit/Source/core/svg/SVGScriptElement.h
+++ b/third_party/WebKit/Source/core/svg/SVGScriptElement.h
@@ -46,6 +46,11 @@ class SVGScriptElement final : public SVGElement,
bool isAnimatableAttribute(const QualifiedName&) const override;
#endif
+ // ScriptLoaderClient
+ AtomicString nonce() const override { return m_nonce; }
+ void setNonce(const String& nonce) override { m_nonce = AtomicString(nonce); }
+ void clearNonce() override { m_nonce = nullAtom; }
+
DECLARE_VIRTUAL_TRACE();
private:
@@ -80,6 +85,7 @@ class SVGScriptElement final : public SVGElement,
bool layoutObjectIsNeeded(const ComputedStyle&) override { return false; }
Member<ScriptLoader> m_loader;
+ AtomicString m_nonce;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698