WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
212191
Fix issues of the Picture-in-Picture API under stress tests
https://bugs.webkit.org/show_bug.cgi?id=212191
Summary
Fix issues of the Picture-in-Picture API under stress tests
Peng Liu
Reported
2020-05-21 00:35:07 PDT
Fix issues of the Picture-in-Picture API under stress test
Attachments
Patch
(42.08 KB, patch)
2020-05-21 01:04 PDT
,
Peng Liu
eric.carlson
: review+
Details
Formatted Diff
Diff
Patch for landing
(42.45 KB, patch)
2020-05-21 16:02 PDT
,
Peng Liu
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Peng Liu
Comment 1
2020-05-21 00:37:09 PDT
Also, we need to refactor the layout tests for the Picture-in-Picture API with the Mock VideoPresentation Mode.
Peng Liu
Comment 2
2020-05-21 01:04:24 PDT
Created
attachment 399941
[details]
Patch
Radar WebKit Bug Importer
Comment 3
2020-05-21 01:05:01 PDT
<
rdar://problem/63483308
>
Eric Carlson
Comment 4
2020-05-21 10:01:30 PDT
Comment on
attachment 399941
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=399941&action=review
> Source/WebCore/html/HTMLVideoElement.cpp:458 > +static inline HTMLVideoElement::VideoPresentationMode toPresentationMode(HTMLMediaElementEnums::VideoFullscreenMode mode) > +{ > + if (mode == HTMLMediaElementEnums::VideoFullscreenModeStandard) > + return HTMLVideoElement::VideoPresentationMode::Fullscreen; > + > + if (mode & HTMLMediaElementEnums::VideoFullscreenModePictureInPicture) > + return HTMLVideoElement::VideoPresentationMode::PictureInPicture; > + > + if (mode == HTMLMediaElementEnums::VideoFullscreenModeNone) > + return HTMLVideoElement::VideoPresentationMode::Inline; > + > + ASSERT_NOT_REACHED(); > + return HTMLVideoElement::VideoPresentationMode::Inline; > +}
Do we need both enums? VideoFullscreenMode is a bitfield, but it doesn't look like it needs to be so it would be nice to just use VideoPresentationMode if possible. If that works, it is likely to be a big change so another patch is fine.
> Source/WebCore/html/HTMLVideoElement.cpp:472 > +#if ENABLE(PICTURE_IN_PICTURE_API)
Do we still need ENABLE_PICTURE_IN_PICTURE_API?
> Source/WebCore/html/HTMLVideoElement.cpp:474 > + m_exitingPictureInPicture = true;
Since you can't be entering and exiting PiP at the same time (I hope!), can you replace m_enteringPictureInPicture and m_exitingPictureInPicture with a single enum?
Peng Liu
Comment 5
2020-05-21 14:16:53 PDT
Comment on
attachment 399941
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=399941&action=review
>> Source/WebCore/html/HTMLVideoElement.cpp:458 >> +} > > Do we need both enums? VideoFullscreenMode is a bitfield, but it doesn't look like it needs to be so it would be nice to just use VideoPresentationMode if possible. > > If that works, it is likely to be a big change so another patch is fine.
Filed a bug
webkit.org/b/212229
for it.
>> Source/WebCore/html/HTMLVideoElement.cpp:472 >> +#if ENABLE(PICTURE_IN_PICTURE_API) > > Do we still need ENABLE_PICTURE_IN_PICTURE_API?
No, the change is for the Picture-in-Picture feature in general, not only for the API. So I will remove it.
>> Source/WebCore/html/HTMLVideoElement.cpp:474 >> + m_exitingPictureInPicture = true; > > Since you can't be entering and exiting PiP at the same time (I hope!), can you replace m_enteringPictureInPicture and m_exitingPictureInPicture with a single enum?
Make sense! Will fix it.
Peng Liu
Comment 6
2020-05-21 16:02:46 PDT
Created
attachment 399991
[details]
Patch for landing
EWS
Comment 7
2020-05-21 17:20:36 PDT
Committed
r262038
: <
https://trac.webkit.org/changeset/262038
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 399991
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug