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

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

Issue 2166213002: Fire attributeChangedCallback on style changes for Custom Elements V1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dominicc review Created 4 years, 5 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/CustomElementDefinition.cpp
diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp b/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
index e0567a9029abf1241defa983378311411da865fd..b5666d53ed97670c8d1a7ee19172d42d9e5f42c1 100644
--- a/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
@@ -24,8 +24,10 @@ CustomElementDefinition::CustomElementDefinition(
CustomElementDefinition::CustomElementDefinition(
const CustomElementDescriptor& descriptor,
const HashSet<AtomicString>& observedAttributes)
- : m_observedAttributes(observedAttributes)
- , m_descriptor(descriptor)
+ : m_descriptor(descriptor)
+ , m_observedAttributes(observedAttributes)
+ , m_hasStyleAttributeChangedCallback(
+ observedAttributes.contains(HTMLNames::styleAttr.localName()))
{
}
@@ -127,11 +129,16 @@ void CustomElementDefinition::upgrade(Element* element)
}
bool CustomElementDefinition::hasAttributeChangedCallback(
- const QualifiedName& name)
+ const QualifiedName& name) const
{
return m_observedAttributes.contains(name.localName());
}
+bool CustomElementDefinition::hasStyleAttributeChangedCallback() const
+{
+ return m_hasStyleAttributeChangedCallback;
+}
+
void CustomElementDefinition::enqueueUpgradeReaction(Element* element)
{
CustomElement::enqueue(element,

Powered by Google App Engine
This is Rietveld 408576698