Bug 160991

Summary: Rename LifecycleCallback to CustomElementReaction
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: DOMAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, kling, koivisto, ryanhaddad, sam, webkit-bug-importer
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 154907    
Attachments:
Description Flags
Renamed classes
none
Fixed CMake builds cdumez: review+

Description Ryosuke Niwa 2016-08-18 20:42:56 PDT
Rename LifecycleCallbackQueue and CustomElementLifecycleProcessingStack
to CustomElementReactionQueue and CustomElementReactionStack per the latest spec:
https://html.spec.whatwg.org/#custom-element-reactions
Comment 1 Ryosuke Niwa 2016-08-18 20:50:24 PDT
Created attachment 286434 [details]
Renamed classes
Comment 2 Ryosuke Niwa 2016-08-18 21:01:22 PDT
Created attachment 286436 [details]
Fixed CMake builds
Comment 3 Ryosuke Niwa 2016-08-18 21:02:20 PDT
It’s kind of annoying that we have CustomElement*s*Registry and then CustomElementReactionQueue but I guess that matches the spec.  I hate plural/singular difference in English so much :(
Comment 4 Chris Dumez 2016-08-19 09:21:44 PDT
Comment on attachment 286436 [details]
Fixed CMake builds

View in context: https://bugs.webkit.org/attachment.cgi?id=286436&action=review

r=me

> Source/WebCore/bindings/js/JSCustomElementsRegistryCustom.cpp:42
> +static JSObject* getCallback(ExecState& state, JSObject& prototype, const Identifier& id)

maybe getCustomElementCallback() ? I don't feel strongly, land either way.

> Source/WebCore/dom/CustomElementReactionQueue.cpp:43
> +class CustomElementReactionQueueItem {

In a follow up, it could be nice to move this class under CustomElementReactionQueue and rename it to "Item".
Comment 5 Ryosuke Niwa 2016-08-19 13:59:29 PDT
Comment on attachment 286436 [details]
Fixed CMake builds

View in context: https://bugs.webkit.org/attachment.cgi?id=286436&action=review

>> Source/WebCore/bindings/js/JSCustomElementsRegistryCustom.cpp:42
>> +static JSObject* getCallback(ExecState& state, JSObject& prototype, const Identifier& id)
> 
> maybe getCustomElementCallback() ? I don't feel strongly, land either way.

Sure, I was initially using that name and I thought it was too long. Fixed.

>> Source/WebCore/dom/CustomElementReactionQueue.cpp:43
>> +class CustomElementReactionQueueItem {
> 
> In a follow up, it could be nice to move this class under CustomElementReactionQueue and rename it to "Item".

I don’t want to do that because then I have to pull in a whole bunch of headers in CustomElementReactionQueue.h
Comment 6 Ryosuke Niwa 2016-08-19 14:04:10 PDT
Committed r204652: <http://trac.webkit.org/changeset/204652>
Comment 7 Ryan Haddad 2016-08-19 15:06:04 PDT
Windows build fix in http://trac.webkit.org/projects/webkit/changeset/204655