OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 30 matching lines...) Expand all Loading... |
41 #include "core/html/custom/V0CustomElementRegistrationContext.h" | 41 #include "core/html/custom/V0CustomElementRegistrationContext.h" |
42 | 42 |
43 namespace blink { | 43 namespace blink { |
44 | 44 |
45 V0CustomElementDefinition* V0CustomElementRegistry::RegisterElement( | 45 V0CustomElementDefinition* V0CustomElementRegistry::RegisterElement( |
46 Document* document, | 46 Document* document, |
47 V0CustomElementConstructorBuilder* constructor_builder, | 47 V0CustomElementConstructorBuilder* constructor_builder, |
48 const AtomicString& user_supplied_name, | 48 const AtomicString& user_supplied_name, |
49 V0CustomElement::NameSet valid_names, | 49 V0CustomElement::NameSet valid_names, |
50 ExceptionState& exception_state) { | 50 ExceptionState& exception_state) { |
51 AtomicString type = user_supplied_name.DeprecatedLower(); | 51 AtomicString type = user_supplied_name.LowerASCII(); |
52 | 52 |
53 if (!constructor_builder->IsFeatureAllowed()) { | 53 if (!constructor_builder->IsFeatureAllowed()) { |
54 V0CustomElementException::ThrowException( | 54 V0CustomElementException::ThrowException( |
55 V0CustomElementException::kCannotRegisterFromExtension, type, | 55 V0CustomElementException::kCannotRegisterFromExtension, type, |
56 exception_state); | 56 exception_state); |
57 return nullptr; | 57 return nullptr; |
58 } | 58 } |
59 | 59 |
60 if (!V0CustomElement::IsValidName(type, valid_names)) { | 60 if (!V0CustomElement::IsValidName(type, valid_names)) { |
61 V0CustomElementException::ThrowException( | 61 V0CustomElementException::ThrowException( |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 bool V0CustomElementRegistry::V1NameIsDefined(const AtomicString& name) const { | 143 bool V0CustomElementRegistry::V1NameIsDefined(const AtomicString& name) const { |
144 return v1_.Get() && v1_->NameIsDefined(name); | 144 return v1_.Get() && v1_->NameIsDefined(name); |
145 } | 145 } |
146 | 146 |
147 DEFINE_TRACE(V0CustomElementRegistry) { | 147 DEFINE_TRACE(V0CustomElementRegistry) { |
148 visitor->Trace(definitions_); | 148 visitor->Trace(definitions_); |
149 visitor->Trace(v1_); | 149 visitor->Trace(v1_); |
150 } | 150 } |
151 | 151 |
152 } // namespace blink | 152 } // namespace blink |
OLD | NEW |