Closed Bug 1532682 Opened 6 years ago Closed 6 years ago

Previous visual clone targets can cause the source to stop cloning to a new target after a cycle collection

Categories

(Core :: Audio/Video, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: mconley, Assigned: mconley)

References

Details

Attachments

(1 file)

STR:

  1. Set media.videocontrols.picture-in-picture.enabled to true
  2. Visit https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video, and right click on the <video> element of the flower.
  3. Choose "Loop" to loop the playback of the video, and then play the video.
  4. Right click on the video again, and choose "Picture in Picture" to open the video in a new Picture in Picture window.
  5. Play the video for a second or two.
  6. Right click on the video again, and choose "Picture in Picture" to close the Picture in Picture window.
  7. Quickly right click on the video again, and choose "Picture in Picture" to re-open the video in a Picture in Picture window.
  8. Wait

ER:

The video should continue to playback on the Picture in Picture window.

AR:

After a few seconds (after a cycle collection in the content process), the video playback will stop in the Picture in Picture window.

What's happening is that the mVisualCloneSource is never being cleared on the original PiP window's <video>, even as the flower video's mVisualCloneTarget is being updated to the new PiP window's <video>. That means that when the old PiP <video> eventually gets cycle collected, it runs UnbindFromTree, sees that it has a mVisualCloneSource, and stops that clone source from cloning.

Patch coming up.

Priority: -- → P3
Assignee: nobody → mconley
Pushed by mconley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9b8ef8d81775 Make HTMLVideoElement::EndCloningVisually completely sever references between source and target video elements. r=jya

(In reply to Cristian Brindusan [:cbrindusan] from comment #3)

:Mike, can you please push this again?

As far as I can tell, this was a one-time infra failure, and I probably shouldn't have been backed out. Oh well, re-landing.

Flags: needinfo?(mconley)

Sorry about this Mike, no tests ran on your push and #ci advised to push this again.

(In reply to Cristian Brindusan [:cbrindusan] from comment #5)

Sorry about this Mike, no tests ran on your push and #ci advised to push this again.

Oh that's quite alright - sorry for moaning about it. :)

Pushed by mconley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b202d2f7c0ce Make HTMLVideoElement::EndCloningVisually completely sever references between source and target video elements. r=jya
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: