Bug 163110 - [Modern Media Controls] Placards
Summary: [Modern Media Controls] Placards
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari 10
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antoine Quint
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-10-07 06:51 PDT by Antoine Quint
Modified: 2016-10-10 14:20 PDT (History)
3 users (show)

See Also:


Attachments
Patch (64.80 KB, patch)
2016-10-07 06:54 PDT, Antoine Quint
no flags Details | Formatted Diff | Diff
Patch for landing (64.73 KB, patch)
2016-10-10 13:37 PDT, Antoine Quint
no flags Details | Formatted Diff | Diff
Patch for landing (64.58 KB, patch)
2016-10-10 14:06 PDT, Antoine Quint
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Quint 2016-10-07 06:51:06 PDT
Inline media controls need to display placards when the video is no longer playing inline, such as when the video is playing fullscreen or via AirPlay.
Comment 1 Radar WebKit Bug Importer 2016-10-07 06:51:49 PDT
<rdar://problem/28669342>
Comment 2 Antoine Quint 2016-10-07 06:54:58 PDT
Created attachment 290927 [details]
Patch
Comment 3 Dean Jackson 2016-10-10 12:04:56 PDT
Comment on attachment 290927 [details]
Patch

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

> Source/WebCore/ChangeLog:23
> +        * Modules/modern-media-controls/controls/airplay-placard.js: Copied from Source/WebCore/Modules/modern-media-controls/controls/icon-service.js.
> +        (AirplayPlacard):
> +        * Modules/modern-media-controls/controls/icon-service.js:
> +        * Modules/modern-media-controls/controls/pip-placard.js: Copied from Source/WebCore/Modules/modern-media-controls/controls/icon-service.js.
> +        (PiPPlacard):
> +        * Modules/modern-media-controls/controls/placard.css: Copied from Source/WebCore/Modules/modern-media-controls/controls/icon-service.js.

Get rid of Copied from.

> Source/WebCore/Modules/modern-media-controls/controls/placard.css:34
> +    color: rgb(164, 164, 164);

Make this a --var.

> Source/WebCore/Modules/modern-media-controls/controls/placard.css:46
> +.placard .container {
> +    position: absolute;
> +    left: 50%;
> +    top: 50%;
> +    max-width: 402px;
> +
> +    transform: translate(-50%, -50%);
> +}

Use flexbox to do the centering, not transform.

Also, 402px is such a weird number. Where does that come from?

> Source/WebCore/Modules/modern-media-controls/controls/placard.js:41
> +        if (title !== "")

If you just made this !title you'd also check for the case where someone passed in null or undefined.
Comment 4 Antoine Quint 2016-10-10 12:07:56 PDT
(In reply to comment #3)
> Comment on attachment 290927 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=290927&action=review
> 
> > +        * Modules/modern-media-controls/controls/placard.css: Copied from Source/WebCore/Modules/modern-media-controls/controls/icon-service.js.
> 
> Get rid of Copied from.

Will do.

> > Source/WebCore/Modules/modern-media-controls/controls/placard.css:34
> > +    color: rgb(164, 164, 164);
> 
> Make this a --var.

Will do.

> > Source/WebCore/Modules/modern-media-controls/controls/placard.css:46
> > +.placard .container {
> > +    position: absolute;
> > +    left: 50%;
> > +    top: 50%;
> > +    max-width: 402px;
> > +
> > +    transform: translate(-50%, -50%);
> > +}
> 
> Use flexbox to do the centering, not transform.
> 
> Also, 402px is such a weird number. Where does that come from?

This is coming from the specifications I'm working with.

> > Source/WebCore/Modules/modern-media-controls/controls/placard.js:41
> > +        if (title !== "")
> 
> If you just made this !title you'd also check for the case where someone
> passed in null or undefined.

Yes, I'll adjust that.
Comment 5 Antoine Quint 2016-10-10 13:37:41 PDT
Created attachment 291154 [details]
Patch for landing
Comment 6 WebKit Commit Bot 2016-10-10 14:00:14 PDT
Comment on attachment 291154 [details]
Patch for landing

Rejecting attachment 291154 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 291154, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
/git.webkit.org/WebKit
   d0a8f95..c1a7cb2  master     -> origin/master
Partial-rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc ...
Currently at 207017 = d0a8f957c782d3790e9cfcbba1e631676f2e9a8a
r207018 = c1a7cb221ed4c685368094b2b486c3dc9901f88f
Done rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc
First, rewinding head to replay your work on top of it...
Fast-forwarded master to refs/remotes/origin/master.

Full output: http://webkit-queues.webkit.org/results/2257743
Comment 7 Antoine Quint 2016-10-10 14:06:00 PDT
Created attachment 291157 [details]
Patch for landing
Comment 8 WebKit Commit Bot 2016-10-10 14:20:22 PDT
Comment on attachment 291157 [details]
Patch for landing

Clearing flags on attachment: 291157

Committed r207024: <http://trac.webkit.org/changeset/207024>
Comment 9 WebKit Commit Bot 2016-10-10 14:20:25 PDT
All reviewed patches have been landed.  Closing bug.