| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 return false; | 72 return false; |
| 73 } else { | 73 } else { |
| 74 CustomElementException::throwException(CustomElementException::Prototype
DoesNotExtendHTMLElementSVGElementPrototype, type, es); | 74 CustomElementException::throwException(CustomElementException::Prototype
DoesNotExtendHTMLElementSVGElementPrototype, type, es); |
| 75 return false; | 75 return false; |
| 76 } | 76 } |
| 77 | 77 |
| 78 AtomicString localName; | 78 AtomicString localName; |
| 79 if (!m_extendsTagName.isNull() && !m_extendsTagName.isEmpty()) { | 79 if (!m_extendsTagName.isNull() && !m_extendsTagName.isEmpty()) { |
| 80 localName = m_extendsTagName.lower(); | 80 localName = m_extendsTagName.lower(); |
| 81 | 81 |
| 82 if (!DartUtilities::isTypeSubclassOfTag(m_customType, m_extendsTagName))
{ |
| 83 CustomElementException::throwException(CustomElementException::Proto
typeDoesNotExtendHTMLElementSVGElementPrototype, type, es); |
| 84 return false; |
| 85 } |
| 86 |
| 82 // TODO: enable once we pick up Blink version 31 | 87 // TODO: enable once we pick up Blink version 31 |
| 83 // if (!Document::isValidName(localName)) { | 88 // if (!Document::isValidName(localName)) { |
| 84 // CustomElementException::throwException(CustomElementException::Ex
tendsIsInvalidName, type, es); | 89 // CustomElementException::throwException(CustomElementException::Ex
tendsIsInvalidName, type, es); |
| 85 // return false; | 90 // return false; |
| 86 // } | 91 // } |
| 87 // if (CustomElement::isValidName(localName)) { | 92 // if (CustomElement::isValidName(localName)) { |
| 88 // CustomElementException::throwException(CustomElementException::Ex
tendsIsCustomElementName, type, es); | 93 // CustomElementException::throwException(CustomElementException::Ex
tendsIsCustomElementName, type, es); |
| 89 // return false; | 94 // return false; |
| 90 // } | 95 // } |
| 91 } else { | 96 } else { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 { | 129 { |
| 125 return m_callbacks->setBinding(definition, DartCustomElementBinding::create(
m_customType)); | 130 return m_callbacks->setBinding(definition, DartCustomElementBinding::create(
m_customType)); |
| 126 } | 131 } |
| 127 | 132 |
| 128 ScriptValue DartCustomElementConstructorBuilder::bindingsReturnValue() const | 133 ScriptValue DartCustomElementConstructorBuilder::bindingsReturnValue() const |
| 129 { | 134 { |
| 130 // Dart does not return a constructor. | 135 // Dart does not return a constructor. |
| 131 return ScriptValue(); | 136 return ScriptValue(); |
| 132 } | 137 } |
| 133 } // namespace WebCore | 138 } // namespace WebCore |
| OLD | NEW |