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

Side by Side Diff: third_party/WebKit/Source/core/dom/custom/CustomElementAttributeChangedCallbackReaction.cpp

Issue 2058823002: Implement callback reactions for Custom Elements V1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@stack-ce
Patch Set: dominicc review Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "core/dom/custom/CustomElementAttributeChangedCallbackReaction.h"
6
7 #include "core/dom/custom/CustomElementDefinition.h"
8
9 namespace blink {
10
11 CustomElementAttributeChangedCallbackReaction::CustomElementAttributeChangedCall backReaction(
12 CustomElementDefinition* definition,
13 const QualifiedName& name,
14 const AtomicString& oldValue, const AtomicString& newValue)
15 : CustomElementReaction(definition)
16 , m_name(name)
17 , m_oldValue(oldValue)
18 , m_newValue(newValue)
19 {
20 DCHECK(definition->hasAttributeChangedCallback(name));
21 }
22
23 void CustomElementAttributeChangedCallbackReaction::invoke(Element* element)
24 {
25 m_definition->runAttributeChangedCallback(element, m_name, m_oldValue, m_new Value);
26 }
27
28 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698