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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGScriptElement.h

Issue 2644143005: Adjust the <script nonce>-hiding experiment (Closed)
Patch Set: webexposed 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 28 matching lines...) Expand all
39 39
40 public: 40 public:
41 static SVGScriptElement* create(Document&, bool wasInsertedByParser); 41 static SVGScriptElement* create(Document&, bool wasInsertedByParser);
42 42
43 ScriptLoader* loader() const { return m_loader.get(); } 43 ScriptLoader* loader() const { return m_loader.get(); }
44 44
45 #if DCHECK_IS_ON() 45 #if DCHECK_IS_ON()
46 bool isAnimatableAttribute(const QualifiedName&) const override; 46 bool isAnimatableAttribute(const QualifiedName&) const override;
47 #endif 47 #endif
48 48
49 // ScriptLoaderClient
50 AtomicString nonce() const override { return m_nonce; }
51 void setNonce(const String& nonce) override { m_nonce = AtomicString(nonce); }
52 void clearNonce() override { m_nonce = nullAtom; }
53
54 DECLARE_VIRTUAL_TRACE(); 49 DECLARE_VIRTUAL_TRACE();
55 50
56 private: 51 private:
57 SVGScriptElement(Document&, bool wasInsertedByParser, bool alreadyStarted); 52 SVGScriptElement(Document&, bool wasInsertedByParser, bool alreadyStarted);
58 53
59 void parseAttribute(const AttributeModificationParams&) override; 54 void parseAttribute(const AttributeModificationParams&) override;
60 InsertionNotificationRequest insertedInto(ContainerNode*) override; 55 InsertionNotificationRequest insertedInto(ContainerNode*) override;
61 void didNotifySubtreeInsertionsToDocument() override; 56 void didNotifySubtreeInsertionsToDocument() override;
62 void childrenChanged(const ChildrenChange&) override; 57 void childrenChanged(const ChildrenChange&) override;
63 void didMoveToNewDocument(Document& oldDocument) override; 58 void didMoveToNewDocument(Document& oldDocument) override;
(...skipping 14 matching lines...) Expand all
78 bool asyncAttributeValue() const override; 73 bool asyncAttributeValue() const override;
79 bool deferAttributeValue() const override; 74 bool deferAttributeValue() const override;
80 bool hasSourceAttribute() const override; 75 bool hasSourceAttribute() const override;
81 76
82 void dispatchLoadEvent() override; 77 void dispatchLoadEvent() override;
83 78
84 Element* cloneElementWithoutAttributesAndChildren() override; 79 Element* cloneElementWithoutAttributesAndChildren() override;
85 bool layoutObjectIsNeeded(const ComputedStyle&) override { return false; } 80 bool layoutObjectIsNeeded(const ComputedStyle&) override { return false; }
86 81
87 Member<ScriptLoader> m_loader; 82 Member<ScriptLoader> m_loader;
88 AtomicString m_nonce;
89 }; 83 };
90 84
91 } // namespace blink 85 } // namespace blink
92 86
93 #endif // SVGScriptElement_h 87 #endif // SVGScriptElement_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLScriptElement.cpp ('k') | third_party/WebKit/Source/core/svg/SVGScriptElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698