Closed Bug 1466260 Opened 2 years ago Closed Last year

[wpt-sync] Sync PR 11309 - Revert "Cleanup plugin element frames when the layout tree is detached"

Categories

(Testing :: web-platform-tests, enhancement, P4)

enhancement

Tracking

(firefox63 fixed)

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: wptsync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 11309 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/11309
Details from upstream follow.

Ehsan Karamad <ekaramad@chromium.org> wrote:
>  Revert "Cleanup plugin element frames when the layout tree is detached"
>  
>  This reverts commit 596e6b3281a8cc2c4b646553e4cde169a29a1d1d.
>  
>  Reason for revert: DetachLayoutTree could be called at inopportune times
>  such as style recalc or during layout. This caused several crashes.
>  
>  Original change's description:
>  > Cleanup plugin element frames when the layout tree is detached
>  >
>  > Unlike frames, plugin elements (<embed> and <object>) are updated
>  > when their layout tree is rebuilt. However, due to an oversight,
>  > <embed> or <object> elements displaying subframes would only have
>  > the associated content view (FrameView) torn down, leaving a
>  > dangling content frame.
>  >
>  > This led to some interesting side effects:
>  > - When transitioning from a local frame to a plugin, the content
>  >   frame would remain live, with JS still happily running.
>  > - When transitioning from a remote frame to a plugin,
>  > - When navigating a remote frame from one URL to another, the
>  >   element would stop updating since the FrameView would be torn
>  >   down but a new one would never be created. Note that this was
>  >   not (as much of) a problem for local frames, since local frames
>  >   re-create the LocalFrameView on every navigation.
>  > With this CL, if a plugin element has an associated content frame,
>  > use that to clean up the state associated with the element when the
>  > layout tree is detached. This can cause the browser context to be
>  > re-created: this matches the behavior of Edge and Firefox.
>  >
>  > Note that there is still one edge case where Blink behaves oddly:
>  > if the navigation fails and should display fallback content, the
>  > content frame still remains attached. This will be addressed in
>  > followups.
>  >
>  > Link to whatwg issue: https://github.com/whatwg/html/issues/3576
>  >
>  > Bug: 776510, 781880
>  > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
>  > Change-Id: Id18605fbe602ea6c0076c1d579345cdcf28cc984
>  > Reviewed-on: https://chromium-review.googlesource.com/996314
>  > Commit-Queue: Ehsan Karamad <ekaramad@chromium.org>
>  > Reviewed-by: Daniel Cheng <dcheng@chromium.org>
>  > Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
>  > Cr-Commit-Position: refs/heads/master@{#561768}
>  
>  TBR=dcheng@chromium.org,creis@chromium.org,alexmos@chromium.org,ekaramad@chromium.org
>  
>  # Not skipping CQ checks because original CL landed > 1 day ago.
>  
>  Bug: 776510, 781880, 847216, 846708
>  Change-Id: I762631b92463352bea9bf3102d90a13b72776786
>  Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
>  
>  Reviewed-on: https://chromium-review.googlesource.com/1083500
>  WPT-Export-Revision: e2ed817039d8e7c7fce1f47fbe3222e776a541d3
PR 11309 applied with additional changes from upstream: 3391fa43ca730a80b6939476086fafd9ec884ff1
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/dcebab7e152c
[wpt PR 11309] - Revert "Cleanup plugin element frames when the layout tree is detached", a=testonly
Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f585ab570e26
[wpt PR 11309] - Revert "Cleanup plugin element frames when the layout tree is detached", a=testonly
https://hg.mozilla.org/mozilla-central/rev/f585ab570e26
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Result changes from PR not available.
You need to log in before you can comment on or make changes to this bug.