RESOLVED FIXED 183397
Implement customElements.upgrade()
https://bugs.webkit.org/show_bug.cgi?id=183397
Summary Implement customElements.upgrade()
Attachments
Implements the feature (7.85 KB, patch)
2018-08-01 23:37 PDT, Ryosuke Niwa
fred.wang: review+
Added more descriptions to the change log (8.35 KB, patch)
2018-08-01 23:50 PDT, Ryosuke Niwa
fred.wang: review+
Radar WebKit Bug Importer
Comment 1 2018-03-08 23:09:19 PST
Ryosuke Niwa
Comment 2 2018-08-01 23:37:34 PDT
Created attachment 346361 [details] Implements the feature
Ryosuke Niwa
Comment 3 2018-08-01 23:43:18 PDT
Comment on attachment 346361 [details] Implements the feature View in context: https://bugs.webkit.org/attachment.cgi?id=346361&action=review > Source/WebCore/dom/CustomElementReactionQueue.cpp:-125 > - ASSERT(element.isConnected()); We need to remove this since upgrade can be called on a disconnected tree, and that's sort of the whole point of this API.
Ryosuke Niwa
Comment 4 2018-08-01 23:50:36 PDT
Created attachment 346362 [details] Added more descriptions to the change log
Frédéric Wang (:fredw)
Comment 5 2018-08-02 00:50:30 PDT
Comment on attachment 346361 [details] Implements the feature View in context: https://bugs.webkit.org/attachment.cgi?id=346361&action=review >> Source/WebCore/dom/CustomElementReactionQueue.cpp:-125 >> - ASSERT(element.isConnected()); > > We need to remove this since upgrade can be called on a disconnected tree, and that's sort of the whole point of this API. Right. It seems Element::insertedIntoAncestor is the only place where enqueueElementUpgradeIfDefined was called. > Source/WebCore/dom/CustomElementRegistry.cpp:117 > +static void upgradeElementsInShadowIncludingdescendants(ContainerNode& root) nit: 'D' of descendants should be uppercase. > Source/WebCore/dom/CustomElementRegistry.h:44 > +class DeferredPromise; The DeferredPromise include / forward declaration change seems unrelated to this patch, right? Maybe mention in the ChangeLog whether it is just a fix passing by.
Ryosuke Niwa
Comment 6 2018-08-02 12:23:47 PDT
Thanks for the review! (In reply to Frédéric Wang (:fredw) from comment #5) > Comment on attachment 346361 [details] > Implements the feature > > View in context: > https://bugs.webkit.org/attachment.cgi?id=346361&action=review > > >> Source/WebCore/dom/CustomElementReactionQueue.cpp:-125 > >> - ASSERT(element.isConnected()); > > > > We need to remove this since upgrade can be called on a disconnected tree, and that's sort of the whole point of this API. > > Right. It seems Element::insertedIntoAncestor is the only place where > enqueueElementUpgradeIfDefined was called. > > > Source/WebCore/dom/CustomElementRegistry.cpp:117 > > +static void upgradeElementsInShadowIncludingdescendants(ContainerNode& root) > > nit: 'D' of descendants should be uppercase. Fixed. > > Source/WebCore/dom/CustomElementRegistry.h:44 > > +class DeferredPromise; > > The DeferredPromise include / forward declaration change seems unrelated to > this patch, right? Maybe mention in the ChangeLog whether it is just a fix > passing by. Sure, I'd add a change log comment.
Ryosuke Niwa
Comment 7 2018-08-02 12:25:25 PDT
Ryosuke Niwa
Comment 8 2019-03-23 23:37:36 PDT
*** Bug 196165 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.