[Picture-in-Picture] Resize callback should not be called after window is closed |
||
Issue description
Chrome Version: 69.0.3480.0 (Official Build) canary (64-bit)
OS: Chrome OS
What steps will reproduce the problem?
(1) The chrome://flags/#enable-surfaces-for-videos flag must be enabled.
(2) Go to The chrome://flags/#enable-surfaces-for-videos flag must be enabled.
(3) Click the "Toggle Picture-in-Picture" 3 times to enter, exit, and enter.
What is the expected result?
"> Window size changed to [xxx]" message should not appear as previous window was closed.
What happens instead?
"> Window size changed to [xxx]" shows up.
I believe we should unregister previous pipWindowResizeCallback when PictureInPictureWindow::OnClose() is called.
In third_party/blink/renderer/modules/picture_in_picture/picture_in_picture_controller_impl.cc
element->GetWebMediaPlayer()->RegisterPictureInPictureWindowResizeCallback(
WTF::BindRepeating(&PictureInPictureWindow::OnResize,
WrapPersistent(picture_in_picture_window_.Get())));
,
Jul 5
I couldn't reproduce this. Is it possible it was fixed by the recent change to PictureInPictureWindowControllerImpl::UpdateLayerBounds? It no longer notifies the renderer process if the window isn't visible.
,
Jul 5
Oops! Test page: https://googlechrome.github.io/samples/picture-in-picture/
,
Jul 5
I ended up testing there. It works for me.
,
Jul 5
BTW, a "window size changed" appears after the window shows up on my side. It's not related to closing the window though.
,
Jul 5
Indeed https://chromium-review.googlesource.com/c/chromium/src/+/1102894 fixes this. Thanks for proactively addressing this ;) |
||
►
Sign in to add a comment |
||
Comment 1 by mlamouri@chromium.org
, Jul 5