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

Unified Diff: third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.cpp

Issue 2954843002: Fix upgrading built-in custom elements
Patch Set: Created 3 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: 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 ea2454774c2b87e9ac443db58d284cb2dde73364..c7b1d7490315e9a26c1f69190785897656871bfb 100644
--- a/third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.cpp
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.cpp
@@ -270,7 +270,10 @@ CustomElementDefinition* CustomElementRegistry::DefinitionForId(
}
void CustomElementRegistry::AddCandidate(Element* candidate) {
- const AtomicString& name = candidate->localName();
dominicc (has gone to gerrit) 2017/06/26 03:03:19 I think you should structure this differently, bec
Anton Obzhirov 2017/06/27 19:19:00 Yes, will do, haven’t realized you could mix both.
Anton Obzhirov 2017/06/28 14:09:07 BTW according to https://html.spec.whatwg.org/mult
+ const AtomicString& isAttribute = candidate->getAttribute(HTMLNames::isAttr);
+ const AtomicString& name =
+ isAttribute.IsNull() ? candidate->localName() : isAttribute;
+
if (NameIsDefined(name) || V0NameIsDefined(name))
return;
UpgradeCandidateMap::iterator it = upgrade_candidates_->find(name);

Powered by Google App Engine
This is Rietveld 408576698