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

Unified Diff: third_party/WebKit/Source/core/dom/Element.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/Element.cpp
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
index 6468370fc3edd92e486b70d643012424f9a4c0d2..6ec1f3374caada57a8c90bc99c71b06ec496affa 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -1447,8 +1447,14 @@ inline void Element::AttributeChangedFromParserOrByCloning(
const QualifiedName& name,
const AtomicString& new_value,
AttributeModificationReason reason) {
- if (name == isAttr)
+ if (name == isAttr) {
V0CustomElementRegistrationContext::SetTypeExtension(this, new_value);
+ if (RuntimeEnabledFeatures::CustomElementsBuiltinEnabled() &&
dominicc (has gone to gerrit) 2017/06/26 03:03:19 I thought the timing of processing these was diffe
Anton Obzhirov 2017/06/27 19:19:00 Well it is wrong place to set the state, you are r
+ GetCustomElementState() == CustomElementState::kUncustomized) {
+ SetCustomElementState(CustomElementState::kUndefined);
+ }
+ }
+
AttributeChanged(
AttributeModificationParams(name, g_null_atom, new_value, reason));
}

Powered by Google App Engine
This is Rietveld 408576698