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

Unified Diff: Source/core/dom/Element.h

Issue 1171223004: Sanitize SVG animation attributes which could set JavaScript URL values. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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: Source/core/dom/Element.h
diff --git a/Source/core/dom/Element.h b/Source/core/dom/Element.h
index 24d598b0cfc59925326958217178c91404f84d75..a4bea2bd703d5a39f3cd92740b7977277a8ec6ae 100644
--- a/Source/core/dom/Element.h
+++ b/Source/core/dom/Element.h
@@ -354,6 +354,7 @@ public:
virtual bool isURLAttribute(const Attribute&) const { return false; }
virtual bool isHTMLContentAttribute(const Attribute&) const { return false; }
+ virtual bool isSVGAnimationAttributeSettingJavaScriptURL(const Attribute&) const { return false; }
virtual bool isLiveLink() const { return false; }
KURL hrefURL() const;
@@ -539,6 +540,8 @@ protected:
// svgAttributeChanged (called when element.className.baseValue is set)
void classAttributeChanged(const AtomicString& newClassString);
+ static bool attributeValueIsJavaScriptURL(const Attribute&);
+
PassRefPtr<ComputedStyle> originalStyleForLayoutObject();
Node* insertAdjacent(const String& where, Node* newChild, ExceptionState&);

Powered by Google App Engine
This is Rietveld 408576698