| Index: third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.cpp b/third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.cpp
|
| index 3e4500166cbf47f1a43ffd76d75844346638b1a7..4d3cc4ae6f05aa9b8a19676f9ee52f0c2c5ebd8a 100644
|
| --- a/third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.cpp
|
| @@ -214,12 +214,16 @@ ScriptValue CustomElementRegistry::get(const AtomicString& name) {
|
| // At this point, what the spec calls 'is' is 'name' from desc
|
| CustomElementDefinition* CustomElementRegistry::definitionFor(
|
| const CustomElementDescriptor& desc) const {
|
| - // 4&5. If there is a definition in registry with name equal to is/localName
|
| - // Autonomous elements have the same name and local name
|
| - CustomElementDefinition* definition = definitionForName(desc.name());
|
| - // 4&5. and name equal to localName, return that definition
|
| - if (definition and definition->descriptor().localName() == desc.localName())
|
| + // desc.name() is 'is' attribute
|
| + // 4. If definition in registry with name equal to local name...
|
| + CustomElementDefinition* definition = definitionForName(desc.localName());
|
| + // 5. If definition in registry with name equal to name...
|
| + if (!definition)
|
| + definition = definitionForName(desc.name());
|
| + // 4&5. ...and local name equal to localName, return that definition
|
| + if (definition and definition->descriptor().localName() == desc.localName()) {
|
| return definition;
|
| + }
|
| // 6. Return null
|
| return nullptr;
|
| }
|
|
|