[Modern Media Controls] Add a MediaControlsHost API to retrieve images as base64
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Oct 2016 19:54:04 +0000 (19:54 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Oct 2016 19:54:04 +0000 (19:54 +0000)
commitef3700abb117aa66cf2c68d3226c88f400b7299c
tree9a29d7f4cea307c5ddbb99c4606423855c68573f
parentd83f45173901e0031480a2185de069eec42bb71e
[Modern Media Controls] Add a MediaControlsHost API to retrieve images as base64
https://bugs.webkit.org/show_bug.cgi?id=163502
<rdar://problem/28792017>

Patch by Antoine Quint <graouts@apple.com> on 2016-10-17
Reviewed by Darin Adler.

Add a new `base64StringForIconAndPlatform()` method to MediaControlsHost such that we
may load images from the modern-media-controls directory in the WebCore.framework bundle.
We use this new method in the iconService singleton when a `mediaControlsHost` is set,
which will be set in a later patch.

* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::base64StringForIconAndPlatform):
* Modules/mediacontrols/MediaControlsHost.h:
* Modules/mediacontrols/MediaControlsHost.idl:
* Modules/modern-media-controls/controls/icon-service.js:
(const.iconService.new.IconService.prototype.urlForIconNameAndLayoutTraits):
(const.iconService.new.IconService):
* rendering/RenderTheme.h:
(WebCore::RenderTheme::mediaControlsBase64StringForIconAndPlatform):
(WebCore::RenderTheme::mediaControlsScript): Deleted.
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::mediaControlsBase64StringForIconAndPlatform):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207423 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/media/modern-media-controls/icon-service/icon-service-expected.txt
LayoutTests/media/modern-media-controls/icon-service/icon-service.html
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp
Source/WebCore/Modules/mediacontrols/MediaControlsHost.h
Source/WebCore/Modules/mediacontrols/MediaControlsHost.idl
Source/WebCore/Modules/modern-media-controls/controls/icon-service.js
Source/WebCore/Modules/modern-media-controls/controls/start-button.js
Source/WebCore/rendering/RenderTheme.h
Source/WebCore/rendering/RenderThemeMac.h
Source/WebCore/rendering/RenderThemeMac.mm