Modernize frame/iframe insertion and removal #9906
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As noted in #9148 (comment), frame's processing model has not kept up with iframe's. It defined an "active frame element" concept which resulted in action-at-a-distance whenever the browsing context was cleared, which is hard to reason about. Instead, we can have it mimick iframe and have explicit actions on insertion and removal.
Additionally, iframe itself was not using the most-modern techniques for handling insertion and removal. This updates both iframe and frame to use "HTML element insertion steps" and "HTML element removal steps".
Finally, this makes the normative change of processing iframes when they are in shadow DOM. For some reason the specification was only handling them when they were in a document tree. frame elements are left as only handled when in a document tree.
/iframe-embed-object.html ( diff )
/obsolete.html ( diff )