Bug 211464 - Poster set after playback begins should be ignored
Summary: Poster set after playback begins should be ignored
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-05-05 12:44 PDT by Eric Carlson
Modified: 2020-05-13 12:10 PDT (History)
14 users (show)

See Also:


Attachments
Patch (26.13 KB, patch)
2020-05-05 13:27 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff
Patch for landing (26.18 KB, patch)
2020-05-07 10:24 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff
Patch for landing (27.21 KB, patch)
2020-05-07 12:46 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff
Patch (4.73 KB, patch)
2020-05-11 13:39 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff
Patch (7.04 KB, patch)
2020-05-11 15:21 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff
Patch (7.07 KB, patch)
2020-05-11 15:46 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff
Patch (7.04 KB, patch)
2020-05-12 09:11 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff
Patch for landing (6.92 KB, patch)
2020-05-12 11:32 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Carlson 2020-05-05 12:44:22 PDT
Poster set after playback begins should be ignored
Comment 1 Eric Carlson 2020-05-05 13:27:29 PDT
Created attachment 398547 [details]
Patch
Comment 2 Jer Noble 2020-05-05 13:33:30 PDT
Comment on attachment 398547 [details]
Patch

Nice, we got rid of setDisplayMode() entirely.
Comment 3 Eric Carlson 2020-05-07 10:24:56 PDT
Created attachment 398756 [details]
Patch for landing
Comment 4 Eric Carlson 2020-05-07 11:53:17 PDT
<rdar://problem/62605114>
Comment 5 Eric Carlson 2020-05-07 12:46:48 PDT
Created attachment 398782 [details]
Patch for landing
Comment 6 EWS 2020-05-07 16:05:44 PDT
Committed r261341: <https://trac.webkit.org/changeset/261341>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 398782 [details].
Comment 7 Aakash Jain 2020-05-08 05:14:44 PDT
(In reply to EWS from comment #6)
> Committed r261341: <https://trac.webkit.org/changeset/261341>
This seems to have made this test very flaky: imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/intrinsic_sizes.htm
Tracked in Bug 211612.
Comment 8 Ryan Haddad 2020-05-08 13:27:50 PDT
Reverted r261341 and r261392 for reason:

Caused multiple regression test failures

Committed r261409: <https://trac.webkit.org/changeset/261409>
Comment 9 Eric Carlson 2020-05-11 13:39:37 PDT
Created attachment 399051 [details]
Patch
Comment 10 Eric Carlson 2020-05-11 15:21:21 PDT
Created attachment 399059 [details]
Patch
Comment 11 Eric Carlson 2020-05-11 15:46:15 PDT
Created attachment 399061 [details]
Patch
Comment 12 Eric Carlson 2020-05-12 09:11:09 PDT
Created attachment 399133 [details]
Patch
Comment 13 Darin Adler 2020-05-12 10:51:30 PDT
Comment on attachment 399133 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=399133&action=review

Is there code that stops the poster loading once we load the first frame?

> Source/WebCore/ChangeLog:22
> +020-05-11  Antoine Quint  <graouts@apple.com>

Oops, deleted a "2" here.

> Source/WebCore/html/HTMLVideoElement.cpp:136
> +        if (hasAvailableVideoFrame())
> +            return;

Not really about this patch:

I wish we had a more consistent rule about when to call through to the base class in parseAttribute functions. If it was up to me, all parseAttribute functions would call through to the base class always, even when they handle the attribute, except when they are trying to disable some specific work the base class does. But it’s more efficient to *not* call through to the base class if you know it has no work to do, so some might prefer our current status quo where we often don’t call through.

> Source/WebCore/html/HTMLVideoElement.cpp:286
> +    else if (displayMode() < Poster && !hasAvailableVideoFrame())
>          setDisplayMode(Poster);

Is the idea here that if hasAvailableVideoFrame() is true, the display mode will be changing to Video very soon? Why not change it to Video right now?
Comment 14 Eric Carlson 2020-05-12 11:22:26 PDT
Comment on attachment 399133 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=399133&action=review

>> Source/WebCore/ChangeLog:22
>> +020-05-11  Antoine Quint  <graouts@apple.com>
> 
> Oops, deleted a "2" here.

Oops indeed, I wonder how I did that!

>> Source/WebCore/html/HTMLVideoElement.cpp:286
>>          setDisplayMode(Poster);
> 
> Is the idea here that if hasAvailableVideoFrame() is true, the display mode will be changing to Video very soon? Why not change it to Video right now?

That is the idea, but I like your suggestion - there is no reason to wait. 

I'll make that change, thanks!
Comment 15 Eric Carlson 2020-05-12 11:32:23 PDT
Created attachment 399148 [details]
Patch for landing
Comment 16 EWS 2020-05-12 13:44:02 PDT
Committed r261576: <https://trac.webkit.org/changeset/261576>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 399148 [details].