-
Notifications
You must be signed in to change notification settings - Fork 6k
[web] Reassign content to temporary slot so Safari can delete it. #27154
[web] Reassign content to temporary slot so Safari can delete it. #27154
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
mdebbar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
The current unit tests should already cover this new code. Here's the test, and here's the test running in Safari (I think?). |
…te it from the DOM.
yjbanov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.

This small tweak is required to workaround a Safari issue that will make a Flutter web app's flt-glass-pane lose its layout after removing slotted content after its slot has been removed.
This code just creates a slot at the moment that some slotted content needs to be removed, reassigns said content to that new "tombstone" slot, and then deletes BOTH from the DOM in the same tick.
This seems to not trigger the Safari bug.
Issues
Pre-launch Checklist
writing and running engine tests.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.