WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
183397
Implement customElements.upgrade()
https://bugs.webkit.org/show_bug.cgi?id=183397
Summary
Implement customElements.upgrade()
Domenic Denicola
Reported
2018-03-06 21:27:43 PST
Recently added to the spec:
https://github.com/whatwg/html/pull/3535
Spec:
https://html.spec.whatwg.org/multipage/custom-elements.html#dom-customelementregistry-upgrade
Tests:
https://github.com/w3c/web-platform-tests/pull/9869
Attachments
Implements the feature
(7.85 KB, patch)
2018-08-01 23:37 PDT
,
Ryosuke Niwa
fred.wang
: review+
Details
Formatted Diff
Diff
Added more descriptions to the change log
(8.35 KB, patch)
2018-08-01 23:50 PDT
,
Ryosuke Niwa
fred.wang
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2018-03-08 23:09:19 PST
<
rdar://problem/38292356
>
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
Committed
r234507
: <
https://trac.webkit.org/changeset/234507
>
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.
Top of Page
Format For Printing
XML
Clone This Bug