Closed Bug 1443722 Opened 6 years ago Closed 6 years ago

Implement customElements.upgrade()

Categories

(Core :: DOM: Core & HTML, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: d, Assigned: smaug)

References

Details

Attachments

(3 files, 1 obsolete file)

Priority: -- → P3
Attached patch ce_upgrade.diffSplinter Review
Trying to map rather exactly to what the spec has

remote: View your change here:
remote:   https://hg.mozilla.org/try/rev/36f39fa8d59ae8d07c839c0cd1802fe311c56e58
remote: 
remote: Follow the progress of your build on Treeherder:
remote:   https://treeherder.mozilla.org/#/jobs?repo=try&revision=36f39fa8d59ae8d07c839c0cd1802fe311c56e58
remote: recorded changegroup in replication log in 0.101s
Assignee: nobody → bugs
Attachment #8986286 - Flags: review?(mrbkap)
Comment on attachment 8986286 [details] [diff] [review]
ce_upgrade.diff

Review of attachment 8986286 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/base/CustomElementRegistry.cpp
@@ +981,5 @@
>    return;
>  }
>  
>  void
> +TryUpgrade(nsINode& aNode)

This should probably be `static void`.

@@ +1001,5 @@
> +    }
> +  }
> +
> +  ShadowRoot* root;
> +  if (element && (root = element->GetShadowRoot())) {

This comes right after an `if (element)` block which doesn't assign to `element`, so this can be combined into the previous if statement and the resulting second if statement could then be the more idiomatic:

`if (ShadowRoot* root = element->GetShadowRoot()) {...`
Attachment #8986286 - Flags: review?(mrbkap) → review+
Attached patch ce_upgrade_2.diff (obsolete) — Splinter Review
indeed
aha, there is another unexpected pass
Attachment #8986320 - Attachment is obsolete: true
Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/693b36bb1292
Implement customElements.upgrade() , r=mrbkap
Attached patch static_void.diffSplinter Review
missed static void
Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c14e3d00d740
Implement customElements.upgrade(), static void TryUpgrade , r=mrbkap
https://hg.mozilla.org/mozilla-central/rev/693b36bb1292
https://hg.mozilla.org/mozilla-central/rev/c14e3d00d740
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.