[Modern Media Controls] Allow non-PNG resources
authorgraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Apr 2017 14:57:52 +0000 (14:57 +0000)
committergraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Apr 2017 14:57:52 +0000 (14:57 +0000)
commit07841c5a190442fb4750c6d5a88c3c4262a82a67
tree949f80f69cf4ba2bfa302fc82fa94ce5c4ed076c
parent4687c723ce42600627b422c3feed6a6ca8f60067
[Modern Media Controls] Allow non-PNG resources
https://bugs.webkit.org/show_bug.cgi?id=170992
<rdar://problem/31706590>

Reviewed by Dean Jackson.

Instead of passing in a name and a platform to MediaControlsHost::base64StringForIconAndPlatform(),
we now pass in a name and a type to MediaControlsHost::base64StringForIconNameAndType(). We've removed
the need to provide a platform by copying the resources directly under "Resources/modern-media-controls"
insted of "Resources/modern-media-controls/platform-name-here", and now we provide a type so that it
may be passed down to -[NSBundle pathForResource:ofType:inDirectory:].

* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::base64StringForIconNameAndType):
(WebCore::MediaControlsHost::base64StringForIconAndPlatform): Deleted.
* Modules/mediacontrols/MediaControlsHost.h:
* Modules/mediacontrols/MediaControlsHost.idl:
* Modules/modern-media-controls/controls/icon-service.js:
(const.iconService.new.IconService.prototype.imageForIconNameAndLayoutTraits):
* WebCore.xcodeproj/project.pbxproj:
* rendering/RenderTheme.h:
(WebCore::RenderTheme::mediaControlsBase64StringForIconNameAndType):
(WebCore::RenderTheme::mediaControlsBase64StringForIconAndPlatform): Deleted.
* rendering/RenderThemeIOS.h:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::mediaControlsBase64StringForIconNameAndType):
(WebCore::RenderThemeIOS::mediaControlsBase64StringForIconAndPlatform): Deleted.
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::mediaControlsBase64StringForIconNameAndType):
(WebCore::RenderThemeMac::mediaControlsBase64StringForIconAndPlatform): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215509 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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/WebCore.xcodeproj/project.pbxproj
Source/WebCore/rendering/RenderTheme.h
Source/WebCore/rendering/RenderThemeIOS.h
Source/WebCore/rendering/RenderThemeIOS.mm
Source/WebCore/rendering/RenderThemeMac.h
Source/WebCore/rendering/RenderThemeMac.mm