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.
<rdar://problem/28669342>
Created attachment 290927 [details] Patch
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.
(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.
Created attachment 291154 [details] Patch for landing
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
Created attachment 291157 [details] Patch for landing
Comment on attachment 291157 [details] Patch for landing Clearing flags on attachment: 291157 Committed r207024: <http://trac.webkit.org/changeset/207024>
All reviewed patches have been landed. Closing bug.