Changeset 204652 in webkit
- Timestamp:
- Aug 19, 2016 2:02:31 PM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 10 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/CMakeLists.txt
r204641 r204652 1439 1439 dom/ContainerNodeAlgorithms.cpp 1440 1440 dom/ContextDestructionObserver.cpp 1441 dom/CustomElementReactionQueue.cpp 1441 1442 dom/CustomElementsRegistry.cpp 1442 1443 dom/CustomEvent.cpp … … 1485 1486 dom/InlineStyleSheetOwner.cpp 1486 1487 dom/KeyboardEvent.cpp 1487 dom/LifecycleCallbackQueue.cpp1488 1488 dom/LiveNodeList.cpp 1489 1489 dom/MessageChannel.cpp -
trunk/Source/WebCore/ChangeLog
r204648 r204652 1 2016-08-18 Ryosuke Niwa <rniwa@webkit.org> 2 3 Rename LifecycleCallback to CustomElementReaction 4 https://bugs.webkit.org/show_bug.cgi?id=160991 5 6 Reviewed by Chris Dumez. 7 8 Renamed LifecycleCallbackQueue and CustomElementLifecycleProcessingStack 9 to CustomElementReactionQueue and CustomElementReactionStack per the latest spec: 10 https://html.spec.whatwg.org/#custom-element-reactions 11 12 No new tests since this is just a rename of classes which are not exposed to the Web. 13 14 * CMakeLists.txt: 15 * WebCore.xcodeproj/project.pbxproj: 16 17 * bindings/js/JSCustomElementsRegistryCustom.cpp: 18 (WebCore::getCallback): Renamed from getLifecycleCallback. 19 (WebCore::JSCustomElementsRegistry::define): 20 (WebCore::getLifecycleCallback): Deleted. 21 22 * bindings/js/JSMainThreadExecState.h: 23 (WebCore::JSMainThreadNullState): 24 25 * bindings/scripts/CodeGeneratorJS.pm: 26 (GenerateImplementation): 27 28 * bindings/scripts/test/JS/JSTestObj.cpp: Rebaselined. 29 * bindings/scripts/test/TestObj.idl: 30 31 * dom/CustomElementReactionQueue.cpp: Moved from Source/WebCore/dom/LifecycleCallbackQueue.cpp. 32 (WebCore::CustomElementReactionQueueItem::CustomElementReactionQueueItem): 33 (WebCore::CustomElementReactionQueue::CustomElementReactionQueue): 34 (WebCore::CustomElementReactionQueue::~CustomElementReactionQueue): 35 (WebCore::CustomElementReactionQueue::enqueueElementUpgrade): 36 (WebCore::CustomElementReactionQueue::enqueueConnectedCallbackIfNeeded): 37 (WebCore::CustomElementReactionQueue::enqueueDisconnectedCallbackIfNeeded): 38 (WebCore::CustomElementReactionQueue::enqueueAttributeChangedCallbackIfNeeded): 39 (WebCore::CustomElementReactionQueue::invokeAll): 40 (WebCore::CustomElementReactionStack::ensureCurrentQueue): 41 (WebCore::CustomElementReactionStack::processQueue): 42 43 * dom/CustomElementReactionQueue.h: Moved from Source/WebCore/dom/LifecycleCallbackQueue.h. 44 (WebCore::CustomElementReactionStack::CustomElementReactionStack): 45 (WebCore::CustomElementReactionStack::~CustomElementReactionStack): 46 (WebCore::CustomElementReactionStack::hasCurrentProcessingStack): 47 48 * dom/Document.cpp: 49 (WebCore::createFallbackHTMLElement): 50 51 * dom/Element.cpp: 52 (WebCore::Element::attributeChanged): 53 (WebCore::Element::insertedInto): 54 (WebCore::Element::removedFrom): 55 1 56 2016-08-19 Chris Dumez <cdumez@apple.com> 2 57 -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r204641 r204652 3931 3931 9B532EA41BA928570038A827 /* SlotAssignment.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B532EA21BA928570038A827 /* SlotAssignment.h */; }; 3932 3932 9B55EEE91B3E8898005342BC /* EditorCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9B55EEE81B3E8898005342BC /* EditorCocoa.mm */; }; 3933 9B56C9AA1C89329A00C456DF /* LifecycleCallbackQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9B56C9A91C89329A00C456DF /* LifecycleCallbackQueue.cpp */; };3933 9B56C9AA1C89329A00C456DF /* CustomElementReactionQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9B56C9A91C89329A00C456DF /* CustomElementReactionQueue.cpp */; }; 3934 3934 9B69D3B41B98FFE900E3512B /* HTMLSlotElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9B69D3B21B98FFE900E3512B /* HTMLSlotElement.cpp */; }; 3935 3935 9B69D3B51B98FFE900E3512B /* HTMLSlotElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B69D3B31B98FFE900E3512B /* HTMLSlotElement.h */; }; … … 11516 11516 9B532EA21BA928570038A827 /* SlotAssignment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlotAssignment.h; sourceTree = "<group>"; }; 11517 11517 9B55EEE81B3E8898005342BC /* EditorCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = EditorCocoa.mm; sourceTree = "<group>"; }; 11518 9B56C9A81C89312800C456DF /* LifecycleCallbackQueue.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LifecycleCallbackQueue.h; sourceTree = "<group>"; };11519 9B56C9A91C89329A00C456DF /* LifecycleCallbackQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LifecycleCallbackQueue.cpp; sourceTree = "<group>"; };11518 9B56C9A81C89312800C456DF /* CustomElementReactionQueue.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CustomElementReactionQueue.h; sourceTree = "<group>"; }; 11519 9B56C9A91C89329A00C456DF /* CustomElementReactionQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomElementReactionQueue.cpp; sourceTree = "<group>"; }; 11520 11520 9B69D3B11B98FF0A00E3512B /* HTMLSlotElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLSlotElement.idl; sourceTree = "<group>"; }; 11521 11521 9B69D3B21B98FFE900E3512B /* HTMLSlotElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLSlotElement.cpp; sourceTree = "<group>"; }; … … 23999 23999 9BD4E9191C462CFC005065BC /* CustomElementsRegistry.h */, 24000 24000 9BC5F9DE1D5AAD5D002B749D /* CustomElementsRegistry.idl */, 24001 9B56C9A91C89329A00C456DF /* CustomElementReactionQueue.cpp */, 24002 9B56C9A81C89312800C456DF /* CustomElementReactionQueue.h */, 24001 24003 62CD32561157E57C0063B0A7 /* CustomEvent.cpp */, 24002 24004 62CD32571157E57C0063B0A7 /* CustomEvent.h */, … … 24138 24140 85031B2E0A44EFC700F992E0 /* KeyboardEvent.h */, 24139 24141 14CF7C2009F7110600EB3665 /* KeyboardEvent.idl */, 24140 9B56C9A91C89329A00C456DF /* LifecycleCallbackQueue.cpp */,24141 9B56C9A81C89312800C456DF /* LifecycleCallbackQueue.h */,24142 24142 BC7FA61E0D1F0CBD00DB22A9 /* LiveNodeList.cpp */, 24143 24143 BC7FA61F0D1F0CBD00DB22A9 /* LiveNodeList.h */, … … 30577 30577 0F87166F1C869D83004FF0DE /* LengthPoint.cpp in Sources */, 30578 30578 0FEF20CE1BD4A24100128E5D /* LengthSize.cpp in Sources */, 30579 9B56C9AA1C89329A00C456DF /* LifecycleCallbackQueue.cpp in Sources */,30579 9B56C9AA1C89329A00C456DF /* CustomElementReactionQueue.cpp in Sources */, 30580 30580 FFB698CC1833EE0D00158A31 /* LineBreaker.cpp in Sources */, 30581 30581 89B5EAA111E8003D00F2367E /* LineEnding.cpp in Sources */, -
trunk/Source/WebCore/bindings/js/JSCustomElementsRegistryCustom.cpp
r204611 r204652 40 40 #if ENABLE(CUSTOM_ELEMENTS) 41 41 42 static JSObject* get LifecycleCallback(ExecState& state, JSObject& prototype, const Identifier& id)42 static JSObject* getCustomElementCallback(ExecState& state, JSObject& prototype, const Identifier& id) 43 43 { 44 44 JSValue callback = prototype.get(&state, id); … … 48 48 return nullptr; 49 49 if (!callback.isFunction()) { 50 throwTypeError(&state, ASCIILiteral("A lifecyclecallback must be a function"));50 throwTypeError(&state, ASCIILiteral("A custom element callback must be a function")); 51 51 return nullptr; 52 52 } … … 108 108 auto elementInterface = JSCustomElementInterface::create(name, constructor, globalObject()); 109 109 110 auto* connectedCallback = get LifecycleCallback(state, prototypeObject, Identifier::fromString(&vm, "connectedCallback"));110 auto* connectedCallback = getCustomElementCallback(state, prototypeObject, Identifier::fromString(&vm, "connectedCallback")); 111 111 if (state.hadException()) 112 112 return jsUndefined(); … … 114 114 elementInterface->setConnectedCallback(connectedCallback); 115 115 116 auto* disconnectedCallback = get LifecycleCallback(state, prototypeObject, Identifier::fromString(&vm, "disconnectedCallback"));116 auto* disconnectedCallback = getCustomElementCallback(state, prototypeObject, Identifier::fromString(&vm, "disconnectedCallback")); 117 117 if (state.hadException()) 118 118 return jsUndefined(); … … 121 121 122 122 // FIXME: Add the support for adoptedCallback. 123 get LifecycleCallback(state, prototypeObject, Identifier::fromString(&vm, "adoptedCallback"));123 getCustomElementCallback(state, prototypeObject, Identifier::fromString(&vm, "adoptedCallback")); 124 124 if (state.hadException()) 125 125 return jsUndefined(); 126 126 127 auto* attributeChangedCallback = get LifecycleCallback(state, prototypeObject, Identifier::fromString(&vm, "attributeChangedCallback"));127 auto* attributeChangedCallback = getCustomElementCallback(state, prototypeObject, Identifier::fromString(&vm, "attributeChangedCallback")); 128 128 if (state.hadException()) 129 129 return jsUndefined(); -
trunk/Source/WebCore/bindings/js/JSMainThreadExecState.h
r197611 r204652 27 27 #define JSMainThreadExecState_h 28 28 29 #include "CustomElementReactionQueue.h" 29 30 #include "JSDOMBinding.h" 30 #include "LifecycleCallbackQueue.h"31 31 #include <runtime/Completion.h> 32 32 #include <runtime/Microtask.h> … … 149 149 JSC::ExecState* m_previousState; 150 150 #if ENABLE(CUSTOM_ELEMENTS) 151 CustomElement LifecycleProcessingStack m_lifecycleProcessingStack;151 CustomElementReactionStack m_customElementReactionStack; 152 152 #endif 153 153 }; -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r204611 r204652 3343 3343 if ($function->signature->extendedAttributes->{"CEReactions"}) { 3344 3344 push(@implContent, "#if ENABLE(CUSTOM_ELEMENTS)\n"); 3345 push(@implContent, " CustomElement LifecycleProcessingStack customElementLifecycleProcessingStack;\n");3345 push(@implContent, " CustomElementReactionStack customElementReactionStack;\n"); 3346 3346 push(@implContent, "#endif\n"); 3347 $implIncludes{" LifecycleCallbackQueue.h"} = 1;3347 $implIncludes{"CustomElementReactionQueue.h"} = 1; 3348 3348 } 3349 3349 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r204589 r204652 23 23 24 24 #include "CallbackFunction.h" 25 #include "CustomElementReactionQueue.h" 25 26 #include "DOMStringList.h" 26 27 #include "Dictionary.h" … … 50 51 #include "JSTestSubObj.h" 51 52 #include "JSXPathNSResolver.h" 52 #include "LifecycleCallbackQueue.h"53 53 #include "RuntimeEnabledFeatures.h" 54 54 #include "SVGDocument.h" … … 725 725 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionTestStaticPromiseFunction(JSC::ExecState*); 726 726 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionTestStaticPromiseFunctionWithException(JSC::ExecState*); 727 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNeeds LifecycleProcessingStack(JSC::ExecState*);727 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNeedsCustomElementReactionStack(JSC::ExecState*); 728 728 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAttachShadowRoot(JSC::ExecState*); 729 729 … … 1312 1312 { "testPromiseFunctionWithOptionalIntArgument", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument), (intptr_t) (0) } }, 1313 1313 { "testPromiseOverloadedFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionTestPromiseOverloadedFunction), (intptr_t) (1) } }, 1314 { "methodWithNeeds LifecycleProcessingStack", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNeedsLifecycleProcessingStack), (intptr_t) (0) } },1314 { "methodWithNeedsCustomElementReactionStack", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNeedsCustomElementReactionStack), (intptr_t) (0) } }, 1315 1315 { "attachShadowRoot", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionAttachShadowRoot), (intptr_t) (1) } }, 1316 1316 #if ENABLE(Condition1) … … 6377 6377 } 6378 6378 6379 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNeeds LifecycleProcessingStack(ExecState* state)6379 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNeedsCustomElementReactionStack(ExecState* state) 6380 6380 { 6381 6381 #if ENABLE(CUSTOM_ELEMENTS) 6382 CustomElement LifecycleProcessingStack customElementLifecycleProcessingStack;6383 #endif 6384 JSValue thisValue = state->thisValue(); 6385 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6386 if (UNLIKELY(!castedThis)) 6387 return throwThisTypeError(*state, "TestObject", "methodWithNeeds LifecycleProcessingStack");6388 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6389 auto& impl = castedThis->wrapped(); 6390 impl.methodWithNeeds LifecycleProcessingStack();6382 CustomElementReactionStack customElementReactionStack; 6383 #endif 6384 JSValue thisValue = state->thisValue(); 6385 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6386 if (UNLIKELY(!castedThis)) 6387 return throwThisTypeError(*state, "TestObject", "methodWithNeedsCustomElementReactionStack"); 6388 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6389 auto& impl = castedThis->wrapped(); 6390 impl.methodWithNeedsCustomElementReactionStack(); 6391 6391 return JSValue::encode(jsUndefined()); 6392 6392 } -
trunk/Source/WebCore/bindings/scripts/test/TestObj.idl
r204615 r204652 391 391 392 392 #if defined(TESTING_JS) 393 [CEReactions] void methodWithNeeds LifecycleProcessingStack();393 [CEReactions] void methodWithNeedsCustomElementReactionStack(); 394 394 #endif 395 395 -
trunk/Source/WebCore/dom/CustomElementReactionQueue.cpp
r204651 r204652 25 25 26 26 #include "config.h" 27 #include " LifecycleCallbackQueue.h"27 #include "CustomElementReactionQueue.h" 28 28 29 29 #if ENABLE(CUSTOM_ELEMENTS) … … 41 41 namespace WebCore { 42 42 43 class LifecycleQueueItem {43 class CustomElementReactionQueueItem { 44 44 public: 45 45 enum class Type { … … 50 50 }; 51 51 52 LifecycleQueueItem(Type type, Element& element, JSCustomElementInterface& elementInterface)52 CustomElementReactionQueueItem(Type type, Element& element, JSCustomElementInterface& elementInterface) 53 53 : m_type(type) 54 54 , m_element(element) … … 56 56 { } 57 57 58 LifecycleQueueItem(Element& element, JSCustomElementInterface& elementInterface, const QualifiedName& attributeName, const AtomicString& oldValue, const AtomicString& newValue)58 CustomElementReactionQueueItem(Element& element, JSCustomElementInterface& elementInterface, const QualifiedName& attributeName, const AtomicString& oldValue, const AtomicString& newValue) 59 59 : m_type(Type::AttributeChanged) 60 60 , m_element(element) … … 93 93 }; 94 94 95 LifecycleCallbackQueue::LifecycleCallbackQueue()95 CustomElementReactionQueue::CustomElementReactionQueue() 96 96 { } 97 97 98 LifecycleCallbackQueue::~LifecycleCallbackQueue()98 CustomElementReactionQueue::~CustomElementReactionQueue() 99 99 { 100 100 ASSERT(m_items.isEmpty()); 101 101 } 102 102 103 void LifecycleCallbackQueue::enqueueElementUpgrade(Element& element, JSCustomElementInterface& elementInterface)103 void CustomElementReactionQueue::enqueueElementUpgrade(Element& element, JSCustomElementInterface& elementInterface) 104 104 { 105 if (auto* queue = CustomElement LifecycleProcessingStack::ensureCurrentQueue())106 queue->m_items.append( LifecycleQueueItem(LifecycleQueueItem::Type::ElementUpgrade, element, elementInterface));105 if (auto* queue = CustomElementReactionStack::ensureCurrentQueue()) 106 queue->m_items.append({CustomElementReactionQueueItem::Type::ElementUpgrade, element, elementInterface}); 107 107 } 108 108 … … 121 121 } 122 122 123 void LifecycleCallbackQueue::enqueueConnectedCallbackIfNeeded(Element& element)123 void CustomElementReactionQueue::enqueueConnectedCallbackIfNeeded(Element& element) 124 124 { 125 125 auto* elementInterface = findInterfaceForCustomElement(element); … … 127 127 return; 128 128 129 if (auto* queue = CustomElement LifecycleProcessingStack::ensureCurrentQueue())130 queue->m_items.append({ LifecycleQueueItem::Type::Connected, element, *elementInterface});129 if (auto* queue = CustomElementReactionStack::ensureCurrentQueue()) 130 queue->m_items.append({CustomElementReactionQueueItem::Type::Connected, element, *elementInterface}); 131 131 } 132 132 133 void LifecycleCallbackQueue::enqueueDisconnectedCallbackIfNeeded(Element& element)133 void CustomElementReactionQueue::enqueueDisconnectedCallbackIfNeeded(Element& element) 134 134 { 135 135 auto* elementInterface = findInterfaceForCustomElement(element); … … 137 137 return; 138 138 139 if (auto* queue = CustomElement LifecycleProcessingStack::ensureCurrentQueue())140 queue->m_items.append({ LifecycleQueueItem::Type::Disconnected, element, *elementInterface});139 if (auto* queue = CustomElementReactionStack::ensureCurrentQueue()) 140 queue->m_items.append({CustomElementReactionQueueItem::Type::Disconnected, element, *elementInterface}); 141 141 } 142 142 143 void LifecycleCallbackQueue::enqueueAttributeChangedCallbackIfNeeded(Element& element, const QualifiedName& attributeName, const AtomicString& oldValue, const AtomicString& newValue)143 void CustomElementReactionQueue::enqueueAttributeChangedCallbackIfNeeded(Element& element, const QualifiedName& attributeName, const AtomicString& oldValue, const AtomicString& newValue) 144 144 { 145 145 auto* elementInterface = findInterfaceForCustomElement(element); … … 147 147 return; 148 148 149 if (auto* queue = CustomElement LifecycleProcessingStack::ensureCurrentQueue())149 if (auto* queue = CustomElementReactionStack::ensureCurrentQueue()) 150 150 queue->m_items.append({element, *elementInterface, attributeName, oldValue, newValue}); 151 151 } 152 152 153 void LifecycleCallbackQueue::invokeAll()153 void CustomElementReactionQueue::invokeAll() 154 154 { 155 Vector< LifecycleQueueItem> items;155 Vector<CustomElementReactionQueueItem> items; 156 156 items.swap(m_items); 157 157 for (auto& item : items) … … 159 159 } 160 160 161 LifecycleCallbackQueue* CustomElementLifecycleProcessingStack::ensureCurrentQueue()161 CustomElementReactionQueue* CustomElementReactionStack::ensureCurrentQueue() 162 162 { 163 163 // FIXME: This early exit indicates a bug that some DOM API is missing CEReactions … … 166 166 167 167 auto*& queue = s_currentProcessingStack->m_queue; 168 if (!queue) // We use a raw pointer to avoid genearing code to delete it in ~CustomElement LifecycleProcessingStack.169 queue = new LifecycleCallbackQueue;168 if (!queue) // We use a raw pointer to avoid genearing code to delete it in ~CustomElementReactionStack. 169 queue = new CustomElementReactionQueue; 170 170 return queue; 171 171 } 172 172 173 CustomElement LifecycleProcessingStack* CustomElementLifecycleProcessingStack::s_currentProcessingStack = nullptr;173 CustomElementReactionStack* CustomElementReactionStack::s_currentProcessingStack = nullptr; 174 174 175 void CustomElement LifecycleProcessingStack::processQueue()175 void CustomElementReactionStack::processQueue() 176 176 { 177 177 ASSERT(m_queue); -
trunk/Source/WebCore/dom/CustomElementReactionQueue.h
r204651 r204652 37 37 class Document; 38 38 class Element; 39 class LifecycleQueueItem;39 class CustomElementReactionQueueItem; 40 40 class QualifiedName; 41 41 42 class LifecycleCallbackQueue {43 WTF_MAKE_NONCOPYABLE( LifecycleCallbackQueue);42 class CustomElementReactionQueue { 43 WTF_MAKE_NONCOPYABLE(CustomElementReactionQueue); 44 44 public: 45 LifecycleCallbackQueue();46 ~ LifecycleCallbackQueue();45 CustomElementReactionQueue(); 46 ~CustomElementReactionQueue(); 47 47 48 48 static void enqueueElementUpgrade(Element&, JSCustomElementInterface&); … … 54 54 55 55 private: 56 Vector< LifecycleQueueItem> m_items;56 Vector<CustomElementReactionQueueItem> m_items; 57 57 }; 58 58 59 class CustomElement LifecycleProcessingStack {59 class CustomElementReactionStack { 60 60 public: 61 CustomElement LifecycleProcessingStack()61 CustomElementReactionStack() 62 62 : m_previousProcessingStack(s_currentProcessingStack) 63 63 { … … 65 65 } 66 66 67 ~CustomElement LifecycleProcessingStack()67 ~CustomElementReactionStack() 68 68 { 69 69 if (UNLIKELY(m_queue)) … … 73 73 74 74 // FIXME: This should be a reference once "ensure" starts to work. 75 static LifecycleCallbackQueue* ensureCurrentQueue();75 static CustomElementReactionQueue* ensureCurrentQueue(); 76 76 77 77 static bool hasCurrentProcessingStack() { return s_currentProcessingStack; } … … 80 80 void processQueue(); 81 81 82 LifecycleCallbackQueue* m_queue { nullptr };83 CustomElement LifecycleProcessingStack* m_previousProcessingStack;82 CustomElementReactionQueue* m_queue { nullptr }; 83 CustomElementReactionStack* m_previousProcessingStack; 84 84 85 static CustomElement LifecycleProcessingStack* s_currentProcessingStack;85 static CustomElementReactionStack* s_currentProcessingStack; 86 86 }; 87 87 -
trunk/Source/WebCore/dom/Document.cpp
r204637 r204652 45 45 #include "ContentSecurityPolicy.h" 46 46 #include "CookieJar.h" 47 #include "CustomElementReactionQueue.h" 47 48 #include "CustomElementsRegistry.h" 48 49 #include "CustomEvent.h" … … 106 107 #include "KeyboardEvent.h" 107 108 #include "Language.h" 108 #include "LifecycleCallbackQueue.h"109 109 #include "LoaderStrategy.h" 110 110 #include "Logging.h" … … 1094 1094 auto element = HTMLElement::create(name, document); 1095 1095 element->setIsUnresolvedCustomElement(); 1096 LifecycleCallbackQueue::enqueueElementUpgrade(element.get(), *elementInterface);1096 CustomElementReactionQueue::enqueueElementUpgrade(element.get(), *elementInterface); 1097 1097 return element; 1098 1098 } -
trunk/Source/WebCore/dom/Element.cpp
r204611 r204652 38 38 #include "ComposedTreeAncestorIterator.h" 39 39 #include "ContainerNodeAlgorithms.h" 40 #include "CustomElementReactionQueue.h" 40 41 #include "CustomElementsRegistry.h" 41 42 #include "DOMTokenList.h" … … 70 71 #include "KeyboardEvent.h" 71 72 #include "KeyframeEffect.h" 72 #include "LifecycleCallbackQueue.h"73 73 #include "MainFrame.h" 74 74 #include "MutationObserverInterestGroup.h" … … 1294 1294 #if ENABLE(CUSTOM_ELEMENTS) 1295 1295 if (UNLIKELY(isCustomElement())) 1296 LifecycleCallbackQueue::enqueueAttributeChangedCallbackIfNeeded(*this, name, oldValue, newValue);1296 CustomElementReactionQueue::enqueueAttributeChangedCallbackIfNeeded(*this, name, oldValue, newValue); 1297 1297 #endif 1298 1298 … … 1599 1599 #if ENABLE(CUSTOM_ELEMENTS) 1600 1600 if (newDocument && UNLIKELY(isCustomElement())) 1601 LifecycleCallbackQueue::enqueueConnectedCallbackIfNeeded(*this);1601 CustomElementReactionQueue::enqueueConnectedCallbackIfNeeded(*this); 1602 1602 #endif 1603 1603 … … 1650 1650 #if ENABLE(CUSTOM_ELEMENTS) 1651 1651 if (oldDocument && UNLIKELY(isCustomElement())) 1652 LifecycleCallbackQueue::enqueueDisconnectedCallbackIfNeeded(*this);1652 CustomElementReactionQueue::enqueueDisconnectedCallbackIfNeeded(*this); 1653 1653 #endif 1654 1654 }
Note: See TracChangeset
for help on using the changeset viewer.