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

Unified Diff: Source/bindings/dart/DartCustomElementConstructorBuilder.cpp

Issue 26571005: Enforcing that custom tag extensions have correct super classes. (Closed) Base URL: svn://svn.chromium.org/multivm/trunk/webkit
Patch Set: Created 7 years, 2 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
« no previous file with comments | « no previous file | Source/bindings/dart/DartUtilities.h » ('j') | Source/bindings/dart/DartUtilities.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/dart/DartCustomElementConstructorBuilder.cpp
diff --git a/Source/bindings/dart/DartCustomElementConstructorBuilder.cpp b/Source/bindings/dart/DartCustomElementConstructorBuilder.cpp
index 5d7e4475ec0b8745c1e9ef244bd12e2701a58640..0cec8815076954f7ab5dcb1d7bf64f43f50e0b66 100644
--- a/Source/bindings/dart/DartCustomElementConstructorBuilder.cpp
+++ b/Source/bindings/dart/DartCustomElementConstructorBuilder.cpp
@@ -79,6 +79,11 @@ bool DartCustomElementConstructorBuilder::validateOptions(const AtomicString& ty
if (!m_extendsTagName.isNull() && !m_extendsTagName.isEmpty()) {
localName = m_extendsTagName.lower();
+ if (!DartUtilities::isTypeSubclassOfTag(m_customType, m_extendsTagName)) {
+ CustomElementException::throwException(CustomElementException::PrototypeDoesNotExtendHTMLElementSVGElementPrototype, type, es);
+ return false;
+ }
+
// TODO: enable once we pick up Blink version 31
// if (!Document::isValidName(localName)) {
// CustomElementException::throwException(CustomElementException::ExtendsIsInvalidName, type, es);
« no previous file with comments | « no previous file | Source/bindings/dart/DartUtilities.h » ('j') | Source/bindings/dart/DartUtilities.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698