2009-11-19 Eric Carlson <eric.carlson@apple.com>
Reviewed by Dan Bernstein.
<rdar://problem/7035231>
Support closed caption in <video> element
Test: media/media-captions.html
* WebCore.base.exp:
* accessibility/AccessibilityMediaControls.cpp:
(WebCore::AccessibilityMediaControl::controlTypeName):
Define ShowClosedCaptionsButton and HideClosedCaptionsButton.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
Add MediaToggleClosedCaptionsButtonPart.
* css/CSSSelector.cpp:
(WebCore::CSSSelector::extractPseudoType):
Define and match mediaControlsToggleClosedCaptionsButton.
* css/CSSSelector.h:
(WebCore::CSSSelector::):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
Define and match PseudoMediaControlsToggleClosedCaptions.
* css/CSSValueKeywords.in:
Define and use media-toggle-closed-captions-button.
* css/mediaControls.css:
* css/mediaControlsQuickTime.css:
Add webkit-media-controls-toggle-closed-captions-button.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
Initialize m_closedCaptionsVisible.
(WebCore::HTMLMediaElement::loadInternal):
Set m_closedCaptionsVisible to false.
(WebCore::HTMLMediaElement::hasClosedCaptions):
(WebCore::HTMLMediaElement::closedCaptionsVisible):
(WebCore::HTMLMediaElement::setClosedCaptionsVisible):
New, captions internal methods.
(WebCore::HTMLMediaElement::setWebkitClosedCaptionsVisible):
(WebCore::HTMLMediaElement::webkitClosedCaptionsVisible):
(WebCore::HTMLMediaElement::webkitHasClosedCaptions):
New, captions DOM API.
* html/HTMLMediaElement.h:
* html/HTMLMediaElement.idl:
Declare methods needed for captions API.
* platform/ThemeTypes.h:
Add MediaToggleClosedCaptionsButtonPart.
* platform/android/LocalizedStringsAndroid.cpp:
(WebCore::localizedMediaControlElementString):
(WebCore::localizedMediaControlElementHelpText):
(WebCore::localizedMediaTimeDescription):
Add empty implmentations.
* platform/graphics/MediaPlayer.cpp:
(WebCore::NullMediaPlayerPrivate::hasClosedCaptions):
(WebCore::NullMediaPlayerPrivate::setClosedCaptionsVisible):
New, empty implementations of media engine closed caption functions.
(WebCore::MediaPlayer::hasClosedCaptions):
(WebCore::MediaPlayer::setClosedCaptionsVisible):
New, call media engine closed caption functions.
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::hasClosedCaptions):
(WebCore::MediaPlayerPrivateInterface::setClosedCaptionsVisible):
Declare new media engine methods.
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivate::hasClosedCaptions):
(WebCore::MediaPlayerPrivate::setClosedCaptionsVisible):
New, QTKit implementation of closed caption methods.
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::localizedMediaControlElementString):
(WebCore::localizedMediaControlElementHelpText):
Add help text for ShowClosedCaptionsButton and HideClosedCaptionsButton.
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
Declare and initialize wkQTMovieHasClosedCaptions and wkQTMovieSetShowClosedCaptions.
* rendering/MediaControlElements.cpp:
(WebCore::MediaControlInputElement::MediaControlInputElement):
Deal with MEDIA_CONTROLS_TOGGLE_CLOSED_CAPTIONS_BUTTON.
(WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
(WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler):
(WebCore::MediaControlToggleClosedCaptionsButtonElement::updateDisplayType):
New, implement the closed caption toggle button,
* rendering/MediaControlElements.h:
Define MediaShowClosedCaptionsButton and MediaHideClosedCaptionsButton,
declare MediaControlToggleClosedCaptionsButtonElement.
* rendering/RenderMedia.cpp:
(WebCore::RenderMedia::styleDidChange):
(WebCore::RenderMedia::createToggleClosedCaptionsButton):
(WebCore::RenderMedia::createStatusDisplay):
(WebCore::RenderMedia::updateControls):
(WebCore::RenderMedia::forwardEvent):
* rendering/RenderMedia.h:
Deal with m_toggleClosedCaptionsButton.
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paint):
Deal with MediaToggleClosedCaptionsButtonPart.
* rendering/RenderTheme.h:
* rendering/RenderThemeMac.h:
Declare paintMediaToggleClosedCaptionsButton.
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMediaToggleClosedCaptionsButton):
New.
(WebCore::RenderThemeMac::shouldRenderMediaControlPart):
Don't render captions toggle button unless we are using the new theme, the
movie has captions, and the movie is in a <video> element since we currently
rely on QTKit to render the captions.
* rendering/style/RenderStyleConstants.h:
Define MEDIA_CONTROLS_TOGGLE_CLOSED_CAPTIONS_BUTTON.
2009-11-19 Eric Carlson <eric.carlson@apple.com>
Reviewed by Dan Bernstein.
<rdar://problem/7035231>
Support closed caption in <video> element
* media/media-captions-expected.txt: Added.
* media/media-captions.html: Added.
* media/content/counting-captioned.mov: Added.
* platform/gtk/Skipped:
* platform/mac-leopard/Skipped:
* platform/mac-tiger/Skipped:
* platform/win/Skipped:
Skipped on platforms that don't support closed captions yet.
2009-11-19 Eric Carlson <eric.carlson@apple.com>
Reviewed by Dan Bernstein.
<rdar://problem/7035231>
Support closed caption in <video> element
* English.lproj/Localizable.strings:
Add strings for toggle captions button.
2009-11-19 Eric Carlson <eric.carlson@apple.com>
Reviewed by Dan Bernstein.
<rdar://problem/7035231>
Support closed caption in <video> element
* WebCoreSupport/WebSystemInterface.m:
(InitWebCoreSystemInterface):
Add QTMovieHasClosedCaptions and QTMovieSetShowClosedCaptions.
* WebCoreSupport/WebViewFactory.mm:
(-[WebViewFactory localizedMediaControlElementString:]):
(-[WebViewFactory localizedMediaControlElementHelpText:]):
Add accessibility help strings for media controller closed caption button.
2009-11-19 Eric Carlson <eric.carlson@apple.com>
Reviewed by Dan Bernstein.
<rdar://problem/7035231>
Support closed caption in <video> element
* WebCoreLocalizedStrings.cpp:
(WebCore::localizedMediaControlElementString):
(WebCore::localizedMediaControlElementHelpText):
Add accessibility help strings for media controller closed caption button.
2009-11-19 Eric Carlson <eric.carlson@apple.com>
Reviewed by Dan Bernstein.
<rdar://problem/7035231>
Support closed caption in <video> element
* WebKitSystemInterface.h:
Add prototypes for WKQTMovieHasClosedCaptions and WKQTMovieSetShowClosedCaptions,
define WKMediaUIPartToggleClosedCaptionsButton.
Canonical link: https://commits.webkit.org/42620@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@51191 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-11-19 18:14:01 +00:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
|
<title>closed caption API test</title>
|
|
|
|
|
2011-02-24 23:10:46 +00:00
|
|
|
<script src=video-test.js></script>
|
2009-11-19 Eric Carlson <eric.carlson@apple.com>
Reviewed by Dan Bernstein.
<rdar://problem/7035231>
Support closed caption in <video> element
Test: media/media-captions.html
* WebCore.base.exp:
* accessibility/AccessibilityMediaControls.cpp:
(WebCore::AccessibilityMediaControl::controlTypeName):
Define ShowClosedCaptionsButton and HideClosedCaptionsButton.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
Add MediaToggleClosedCaptionsButtonPart.
* css/CSSSelector.cpp:
(WebCore::CSSSelector::extractPseudoType):
Define and match mediaControlsToggleClosedCaptionsButton.
* css/CSSSelector.h:
(WebCore::CSSSelector::):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
Define and match PseudoMediaControlsToggleClosedCaptions.
* css/CSSValueKeywords.in:
Define and use media-toggle-closed-captions-button.
* css/mediaControls.css:
* css/mediaControlsQuickTime.css:
Add webkit-media-controls-toggle-closed-captions-button.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
Initialize m_closedCaptionsVisible.
(WebCore::HTMLMediaElement::loadInternal):
Set m_closedCaptionsVisible to false.
(WebCore::HTMLMediaElement::hasClosedCaptions):
(WebCore::HTMLMediaElement::closedCaptionsVisible):
(WebCore::HTMLMediaElement::setClosedCaptionsVisible):
New, captions internal methods.
(WebCore::HTMLMediaElement::setWebkitClosedCaptionsVisible):
(WebCore::HTMLMediaElement::webkitClosedCaptionsVisible):
(WebCore::HTMLMediaElement::webkitHasClosedCaptions):
New, captions DOM API.
* html/HTMLMediaElement.h:
* html/HTMLMediaElement.idl:
Declare methods needed for captions API.
* platform/ThemeTypes.h:
Add MediaToggleClosedCaptionsButtonPart.
* platform/android/LocalizedStringsAndroid.cpp:
(WebCore::localizedMediaControlElementString):
(WebCore::localizedMediaControlElementHelpText):
(WebCore::localizedMediaTimeDescription):
Add empty implmentations.
* platform/graphics/MediaPlayer.cpp:
(WebCore::NullMediaPlayerPrivate::hasClosedCaptions):
(WebCore::NullMediaPlayerPrivate::setClosedCaptionsVisible):
New, empty implementations of media engine closed caption functions.
(WebCore::MediaPlayer::hasClosedCaptions):
(WebCore::MediaPlayer::setClosedCaptionsVisible):
New, call media engine closed caption functions.
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::hasClosedCaptions):
(WebCore::MediaPlayerPrivateInterface::setClosedCaptionsVisible):
Declare new media engine methods.
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivate::hasClosedCaptions):
(WebCore::MediaPlayerPrivate::setClosedCaptionsVisible):
New, QTKit implementation of closed caption methods.
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::localizedMediaControlElementString):
(WebCore::localizedMediaControlElementHelpText):
Add help text for ShowClosedCaptionsButton and HideClosedCaptionsButton.
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
Declare and initialize wkQTMovieHasClosedCaptions and wkQTMovieSetShowClosedCaptions.
* rendering/MediaControlElements.cpp:
(WebCore::MediaControlInputElement::MediaControlInputElement):
Deal with MEDIA_CONTROLS_TOGGLE_CLOSED_CAPTIONS_BUTTON.
(WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
(WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler):
(WebCore::MediaControlToggleClosedCaptionsButtonElement::updateDisplayType):
New, implement the closed caption toggle button,
* rendering/MediaControlElements.h:
Define MediaShowClosedCaptionsButton and MediaHideClosedCaptionsButton,
declare MediaControlToggleClosedCaptionsButtonElement.
* rendering/RenderMedia.cpp:
(WebCore::RenderMedia::styleDidChange):
(WebCore::RenderMedia::createToggleClosedCaptionsButton):
(WebCore::RenderMedia::createStatusDisplay):
(WebCore::RenderMedia::updateControls):
(WebCore::RenderMedia::forwardEvent):
* rendering/RenderMedia.h:
Deal with m_toggleClosedCaptionsButton.
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paint):
Deal with MediaToggleClosedCaptionsButtonPart.
* rendering/RenderTheme.h:
* rendering/RenderThemeMac.h:
Declare paintMediaToggleClosedCaptionsButton.
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMediaToggleClosedCaptionsButton):
New.
(WebCore::RenderThemeMac::shouldRenderMediaControlPart):
Don't render captions toggle button unless we are using the new theme, the
movie has captions, and the movie is in a <video> element since we currently
rely on QTKit to render the captions.
* rendering/style/RenderStyleConstants.h:
Define MEDIA_CONTROLS_TOGGLE_CLOSED_CAPTIONS_BUTTON.
2009-11-19 Eric Carlson <eric.carlson@apple.com>
Reviewed by Dan Bernstein.
<rdar://problem/7035231>
Support closed caption in <video> element
* media/media-captions-expected.txt: Added.
* media/media-captions.html: Added.
* media/content/counting-captioned.mov: Added.
* platform/gtk/Skipped:
* platform/mac-leopard/Skipped:
* platform/mac-tiger/Skipped:
* platform/win/Skipped:
Skipped on platforms that don't support closed captions yet.
2009-11-19 Eric Carlson <eric.carlson@apple.com>
Reviewed by Dan Bernstein.
<rdar://problem/7035231>
Support closed caption in <video> element
* English.lproj/Localizable.strings:
Add strings for toggle captions button.
2009-11-19 Eric Carlson <eric.carlson@apple.com>
Reviewed by Dan Bernstein.
<rdar://problem/7035231>
Support closed caption in <video> element
* WebCoreSupport/WebSystemInterface.m:
(InitWebCoreSystemInterface):
Add QTMovieHasClosedCaptions and QTMovieSetShowClosedCaptions.
* WebCoreSupport/WebViewFactory.mm:
(-[WebViewFactory localizedMediaControlElementString:]):
(-[WebViewFactory localizedMediaControlElementHelpText:]):
Add accessibility help strings for media controller closed caption button.
2009-11-19 Eric Carlson <eric.carlson@apple.com>
Reviewed by Dan Bernstein.
<rdar://problem/7035231>
Support closed caption in <video> element
* WebCoreLocalizedStrings.cpp:
(WebCore::localizedMediaControlElementString):
(WebCore::localizedMediaControlElementHelpText):
Add accessibility help strings for media controller closed caption button.
2009-11-19 Eric Carlson <eric.carlson@apple.com>
Reviewed by Dan Bernstein.
<rdar://problem/7035231>
Support closed caption in <video> element
* WebKitSystemInterface.h:
Add prototypes for WKQTMovieHasClosedCaptions and WKQTMovieSetShowClosedCaptions,
define WKMediaUIPartToggleClosedCaptionsButton.
Canonical link: https://commits.webkit.org/42620@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@51191 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-11-19 18:14:01 +00:00
|
|
|
|
|
|
|
<script>
|
|
|
|
var movieInfo =
|
|
|
|
{
|
|
|
|
current : -1,
|
|
|
|
movies :
|
|
|
|
[
|
|
|
|
{
|
|
|
|
url : "content/test.wav",
|
|
|
|
description : "Audio-only file without captions",
|
|
|
|
hasCaptions : false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
url : "content/counting-captioned.mov",
|
|
|
|
description : "QuickTime movie with captions.",
|
|
|
|
hasCaptions : true,
|
|
|
|
},
|
|
|
|
]
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
function canplaythrough()
|
|
|
|
{
|
|
|
|
var movie = movieInfo.movies[movieInfo.current];
|
|
|
|
|
|
|
|
testExpected("mediaElement.webkitHasClosedCaptions", movie.hasCaptions);
|
|
|
|
testExpected("mediaElement.webkitClosedCaptionsVisible", false);
|
|
|
|
|
|
|
|
// Try to enable captions, they should only be enabled after if the movie has captions.
|
|
|
|
consoleWrite("*** enabling captions");
|
|
|
|
mediaElement.webkitClosedCaptionsVisible = true;
|
|
|
|
testExpected("mediaElement.webkitClosedCaptionsVisible", movie.hasCaptions);
|
|
|
|
|
|
|
|
openNextMovie();
|
|
|
|
}
|
|
|
|
|
|
|
|
function openNextMovie()
|
|
|
|
{
|
|
|
|
consoleWrite("");
|
|
|
|
|
|
|
|
movieInfo.current++;
|
|
|
|
if (movieInfo.current >= movieInfo.movies.length)
|
|
|
|
{
|
|
|
|
endTest();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
var url = movieInfo.movies[movieInfo.current].url;
|
|
|
|
video.src = url;
|
|
|
|
var desc = "<b>Loading</b> <em>\""+ url + "\"</em>" +
|
|
|
|
". " + movieInfo.movies[movieInfo.current].description + ".</em>";
|
|
|
|
consoleWrite(desc);
|
|
|
|
if (movieInfo.current > 0)
|
|
|
|
video.load();
|
|
|
|
}
|
|
|
|
|
|
|
|
function start()
|
|
|
|
{
|
|
|
|
findMediaElement();
|
|
|
|
|
|
|
|
waitForEvent("error");
|
|
|
|
waitForEvent("loadstart");
|
|
|
|
waitForEvent("waiting");
|
|
|
|
waitForEvent("ratechange");
|
|
|
|
waitForEvent("durationchange");
|
|
|
|
waitForEvent("pause");
|
|
|
|
waitForEvent("play");
|
|
|
|
waitForEvent("playing");
|
|
|
|
|
2013-04-04 22:23:47 +00:00
|
|
|
waitForEvent('canplaythrough', canplaythrough);
|
2009-11-19 Eric Carlson <eric.carlson@apple.com>
Reviewed by Dan Bernstein.
<rdar://problem/7035231>
Support closed caption in <video> element
Test: media/media-captions.html
* WebCore.base.exp:
* accessibility/AccessibilityMediaControls.cpp:
(WebCore::AccessibilityMediaControl::controlTypeName):
Define ShowClosedCaptionsButton and HideClosedCaptionsButton.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
Add MediaToggleClosedCaptionsButtonPart.
* css/CSSSelector.cpp:
(WebCore::CSSSelector::extractPseudoType):
Define and match mediaControlsToggleClosedCaptionsButton.
* css/CSSSelector.h:
(WebCore::CSSSelector::):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
Define and match PseudoMediaControlsToggleClosedCaptions.
* css/CSSValueKeywords.in:
Define and use media-toggle-closed-captions-button.
* css/mediaControls.css:
* css/mediaControlsQuickTime.css:
Add webkit-media-controls-toggle-closed-captions-button.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
Initialize m_closedCaptionsVisible.
(WebCore::HTMLMediaElement::loadInternal):
Set m_closedCaptionsVisible to false.
(WebCore::HTMLMediaElement::hasClosedCaptions):
(WebCore::HTMLMediaElement::closedCaptionsVisible):
(WebCore::HTMLMediaElement::setClosedCaptionsVisible):
New, captions internal methods.
(WebCore::HTMLMediaElement::setWebkitClosedCaptionsVisible):
(WebCore::HTMLMediaElement::webkitClosedCaptionsVisible):
(WebCore::HTMLMediaElement::webkitHasClosedCaptions):
New, captions DOM API.
* html/HTMLMediaElement.h:
* html/HTMLMediaElement.idl:
Declare methods needed for captions API.
* platform/ThemeTypes.h:
Add MediaToggleClosedCaptionsButtonPart.
* platform/android/LocalizedStringsAndroid.cpp:
(WebCore::localizedMediaControlElementString):
(WebCore::localizedMediaControlElementHelpText):
(WebCore::localizedMediaTimeDescription):
Add empty implmentations.
* platform/graphics/MediaPlayer.cpp:
(WebCore::NullMediaPlayerPrivate::hasClosedCaptions):
(WebCore::NullMediaPlayerPrivate::setClosedCaptionsVisible):
New, empty implementations of media engine closed caption functions.
(WebCore::MediaPlayer::hasClosedCaptions):
(WebCore::MediaPlayer::setClosedCaptionsVisible):
New, call media engine closed caption functions.
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::hasClosedCaptions):
(WebCore::MediaPlayerPrivateInterface::setClosedCaptionsVisible):
Declare new media engine methods.
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivate::hasClosedCaptions):
(WebCore::MediaPlayerPrivate::setClosedCaptionsVisible):
New, QTKit implementation of closed caption methods.
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::localizedMediaControlElementString):
(WebCore::localizedMediaControlElementHelpText):
Add help text for ShowClosedCaptionsButton and HideClosedCaptionsButton.
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
Declare and initialize wkQTMovieHasClosedCaptions and wkQTMovieSetShowClosedCaptions.
* rendering/MediaControlElements.cpp:
(WebCore::MediaControlInputElement::MediaControlInputElement):
Deal with MEDIA_CONTROLS_TOGGLE_CLOSED_CAPTIONS_BUTTON.
(WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
(WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler):
(WebCore::MediaControlToggleClosedCaptionsButtonElement::updateDisplayType):
New, implement the closed caption toggle button,
* rendering/MediaControlElements.h:
Define MediaShowClosedCaptionsButton and MediaHideClosedCaptionsButton,
declare MediaControlToggleClosedCaptionsButtonElement.
* rendering/RenderMedia.cpp:
(WebCore::RenderMedia::styleDidChange):
(WebCore::RenderMedia::createToggleClosedCaptionsButton):
(WebCore::RenderMedia::createStatusDisplay):
(WebCore::RenderMedia::updateControls):
(WebCore::RenderMedia::forwardEvent):
* rendering/RenderMedia.h:
Deal with m_toggleClosedCaptionsButton.
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paint):
Deal with MediaToggleClosedCaptionsButtonPart.
* rendering/RenderTheme.h:
* rendering/RenderThemeMac.h:
Declare paintMediaToggleClosedCaptionsButton.
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMediaToggleClosedCaptionsButton):
New.
(WebCore::RenderThemeMac::shouldRenderMediaControlPart):
Don't render captions toggle button unless we are using the new theme, the
movie has captions, and the movie is in a <video> element since we currently
rely on QTKit to render the captions.
* rendering/style/RenderStyleConstants.h:
Define MEDIA_CONTROLS_TOGGLE_CLOSED_CAPTIONS_BUTTON.
2009-11-19 Eric Carlson <eric.carlson@apple.com>
Reviewed by Dan Bernstein.
<rdar://problem/7035231>
Support closed caption in <video> element
* media/media-captions-expected.txt: Added.
* media/media-captions.html: Added.
* media/content/counting-captioned.mov: Added.
* platform/gtk/Skipped:
* platform/mac-leopard/Skipped:
* platform/mac-tiger/Skipped:
* platform/win/Skipped:
Skipped on platforms that don't support closed captions yet.
2009-11-19 Eric Carlson <eric.carlson@apple.com>
Reviewed by Dan Bernstein.
<rdar://problem/7035231>
Support closed caption in <video> element
* English.lproj/Localizable.strings:
Add strings for toggle captions button.
2009-11-19 Eric Carlson <eric.carlson@apple.com>
Reviewed by Dan Bernstein.
<rdar://problem/7035231>
Support closed caption in <video> element
* WebCoreSupport/WebSystemInterface.m:
(InitWebCoreSystemInterface):
Add QTMovieHasClosedCaptions and QTMovieSetShowClosedCaptions.
* WebCoreSupport/WebViewFactory.mm:
(-[WebViewFactory localizedMediaControlElementString:]):
(-[WebViewFactory localizedMediaControlElementHelpText:]):
Add accessibility help strings for media controller closed caption button.
2009-11-19 Eric Carlson <eric.carlson@apple.com>
Reviewed by Dan Bernstein.
<rdar://problem/7035231>
Support closed caption in <video> element
* WebCoreLocalizedStrings.cpp:
(WebCore::localizedMediaControlElementString):
(WebCore::localizedMediaControlElementHelpText):
Add accessibility help strings for media controller closed caption button.
2009-11-19 Eric Carlson <eric.carlson@apple.com>
Reviewed by Dan Bernstein.
<rdar://problem/7035231>
Support closed caption in <video> element
* WebKitSystemInterface.h:
Add prototypes for WKQTMovieHasClosedCaptions and WKQTMovieSetShowClosedCaptions,
define WKMediaUIPartToggleClosedCaptionsButton.
Canonical link: https://commits.webkit.org/42620@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@51191 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-11-19 18:14:01 +00:00
|
|
|
|
|
|
|
consoleWrite("<b>Test before movie is open:</b>");
|
|
|
|
testExpected("mediaElement.webkitHasClosedCaptions", false);
|
|
|
|
testExpected("mediaElement.webkitClosedCaptionsVisible", false);
|
|
|
|
|
|
|
|
openNextMovie();
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body onload="start()">
|
|
|
|
|
|
|
|
<video controls></video>
|
|
|
|
|
|
|
|
<p>Test media element close caption API.</p>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|