Bug 163840

Summary: Upgrading custom element should enqueue attributeChanged and connected callbacks
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: DOMAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, cdumez, commit-queue, darin, dbates, esprehn+autocc, kangil.han, koivisto, kondapallykalyan, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 154907    
Attachments:
Description Flags
Fixes the bug
none
Archive of layout-test-results from ews107 for mac-yosemite-wk2
none
Patch for landing none

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>