Bug 163840 - Upgrading custom element should enqueue attributeChanged and connected callbacks
Summary: Upgrading custom element should enqueue attributeChanged and connected callbacks
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords: InRadar
Depends on:
Blocks: 154907
  Show dependency treegraph
 
Reported: 2016-10-21 22:47 PDT by Ryosuke Niwa
Modified: 2016-10-23 19:00 PDT (History)
11 users (show)

See Also:


Attachments
Fixes the bug (19.31 KB, patch)
2016-10-21 22:54 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews107 for mac-yosemite-wk2 (1.58 MB, application/zip)
2016-10-22 00:33 PDT, Build Bot
no flags Details
Patch for landing (19.29 KB, patch)
2016-10-22 00:43 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2016-10-21 22:47:31 PDT
When upgrading custom elements, we should enqueue attributeChangedCallback and connectedCallback as needed.
Comment 1 Ryosuke Niwa 2016-10-21 22:54:43 PDT
Created attachment 292473 [details]
Fixes the bug
Comment 2 Darin Adler 2016-10-21 23:11:18 PDT
Comment on attachment 292473 [details]
Fixes the bug

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

> Source/WebCore/dom/CustomElementReactionQueue.cpp:218
> +        Vector<CustomElementReactionQueueItem> items;
> +        items.swap(m_items);

We could use WTFMove instead of swap. Seems like a clearer idiom:

    auto items = WTFMove(m_items);
Comment 3 Build Bot 2016-10-22 00:33:35 PDT
Comment on attachment 292473 [details]
Fixes the bug

Attachment 292473 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/2343237

New failing tests:
svg/wicd/test-rightsizing-b.xhtml
Comment 4 Build Bot 2016-10-22 00:33:39 PDT
Created attachment 292483 [details]
Archive of layout-test-results from ews107 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 5 Ryosuke Niwa 2016-10-22 00:43:59 PDT
Created attachment 292486 [details]
Patch for landing
Comment 6 Ryosuke Niwa 2016-10-22 00:44:12 PDT
(In reply to comment #2)
> Comment on attachment 292473 [details]
> Fixes the bug
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=292473&action=review
> 
> > Source/WebCore/dom/CustomElementReactionQueue.cpp:218
> > +        Vector<CustomElementReactionQueueItem> items;
> > +        items.swap(m_items);
> 
> We could use WTFMove instead of swap. Seems like a clearer idiom:
> 
>     auto items = WTFMove(m_items);

Done that. Thanks for the review!
Comment 7 WebKit Commit Bot 2016-10-22 01:18:38 PDT
Comment on attachment 292486 [details]
Patch for landing

Clearing flags on attachment: 292486

Committed r207710: <http://trac.webkit.org/changeset/207710>
Comment 8 WebKit Commit Bot 2016-10-22 01:18:43 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Radar WebKit Bug Importer 2016-10-23 19:00:00 PDT
<rdar://problem/28909787>