Delay detaching plugin frames to when plugin can be disposed #11172
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.
CL 996314 introduced a new change in behavior of plugin elements and
that is unless in fallback() mode (questionably buggy condition), the
content frame is always cleaned up during DetachLayoutTree. This is fine
and desired given that plugins are design around layout and not removing
the content frame led to various bugs (as explained in more detail in CL
996314).
The new behavior has a small caveat and that is we might end up calling
DetachLayoutTree unexpectedly, i.e., during style recalc. This CL avoid
such problems by trying to detach the content frame both in the call to
DetachLayoutTree and in UpdatePlugin calls. Any remote frame will be
detached in the former call but LocalFrames might not, but will be in
the latter call which is post style recalc.
Bug: 846708
Change-Id: If651a78365f136d36702ebba56e5482154c8cdd1
Reviewed-on: https://chromium-review.googlesource.com/1073204
WPT-Export-Revision: 29d6bac9df05fd256668cdec2575de4fe1af1d07