2009-11-20 Eric Carlson <eric.carlson@apple.com>
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 Nov 2009 01:44:04 +0000 (01:44 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 Nov 2009 01:44:04 +0000 (01:44 +0000)
        Reviewed by Simon Fraser.

        <rdar://problem/7414396> Leopard & Tiger: Support closed caption in <video> element

        * css/mediaControls.css:
            Define closed caption toggle button.

        * rendering/RenderMedia.cpp:
        (WebCore::RenderMedia::updateControls):
            Create closed caption toggle button in display order.

        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::shouldRenderMediaControlPart):
            Don't require MediaControllerThemeQuickTime theme for captions toggle button.
            No need to check if the movie has video, a closed captions track is a video
            track.

2009-11-20  Eric Carlson  <eric.carlson@apple.com>

        Reviewed by Simon Fraser.

        <rdar://problem/7414396> Leopard & Tiger: Support closed caption in <video> element

        * WebKitSystemInterface.h:
        * libWebKitSystemInterfaceLeopard.a:
        * libWebKitSystemInterfaceSnowLeopard.a:
        * libWebKitSystemInterfaceTiger.a:

2009-11-20  Eric Carlson  <eric.carlson@apple.com>

        Reviewed by Simon Fraser.

        <rdar://problem/7414396> Leopard & Tiger: Support closed caption in <video> element

        Remove closed captions test from skipped list.

        * platform/mac-leopard/Skipped:
        * platform/mac-tiger/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51270 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac-leopard/Skipped
LayoutTests/platform/mac-tiger/Skipped
WebCore/ChangeLog
WebCore/css/mediaControls.css
WebCore/rendering/RenderMedia.cpp
WebCore/rendering/RenderThemeMac.mm
WebKitLibraries/ChangeLog
WebKitLibraries/WebKitSystemInterface.h
WebKitLibraries/libWebKitSystemInterfaceLeopard.a
WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a
WebKitLibraries/libWebKitSystemInterfaceTiger.a

index 6e3972f55137f7a90e7e36ac9243d5684eca4a28..d82fb9f019541848650caab4b3881c2f882d7e34 100644 (file)
@@ -1,3 +1,14 @@
+2009-11-20  Eric Carlson  <eric.carlson@apple.com>
+
+        Reviewed by Simon Fraser.
+
+        <rdar://problem/7414396> Leopard & Tiger: Support closed caption in <video> element
+
+        Remove closed captions test from skipped list.
+
+        * platform/mac-leopard/Skipped:
+        * platform/mac-tiger/Skipped:
+
 2009-11-20  Chris Fleizach  <cfleizach@apple.com>
 
         Reviewed by Beth Dakin.
index 88e4dc9c055dae83f8e2b989e23b0deb34915669..05bf9d37183ddfba6ce15a917808457ea3fe8b7d 100644 (file)
@@ -25,8 +25,5 @@ transforms/3d
 media/media-fullscreen-inline.html
 media/media-fullscreen-not-in-document.html
 
-# Requires media engine closed caption support
-media/media-captions.html
-
 # Tests of accessibility functionality not supported on Leopard
 accessibility/aria-list-and-listitem.html
index 66eaaa407ca02b03f002b62e5963c55a1466596c..1dd7a88d16eb65eb3726ce42577e79fef1fdac2f 100644 (file)
@@ -67,9 +67,6 @@ http/tests/loading/redirect-with-no-location-crash.html
 media/media-fullscreen-inline.html
 media/media-fullscreen-not-in-document.html
 
-# Requires media engine closed caption support
-media/media-captions.html
-
 # Tests of accessibility functionality not supported on Tiger
 accessibility/aria-list-and-listitem.html
 
index 7625ba695cf418528127c9e5c451cbce3e2e7b61..64b2be35d68141afdf0eb12d65306e7a44d6f574 100644 (file)
@@ -1,3 +1,22 @@
+2009-11-20  Eric Carlson  <eric.carlson@apple.com>
+
+        Reviewed by Simon Fraser.
+
+        <rdar://problem/7414396> Leopard & Tiger: Support closed caption in <video> element
+
+        * css/mediaControls.css:
+            Define closed caption toggle button.
+
+        * rendering/RenderMedia.cpp:
+        (WebCore::RenderMedia::updateControls):
+            Create closed caption toggle button in display order.
+
+        * rendering/RenderThemeMac.mm:
+        (WebCore::RenderThemeMac::shouldRenderMediaControlPart):
+            Don't require MediaControllerThemeQuickTime theme for captions toggle button.
+            No need to check if the movie has video, a closed captions track is a video
+            track.
+
 2009-11-20  Joseph Pecoraro  <joepeck@webkit.org>
 
         Reviewed by Timothy Hatcher.
index 12ca14a5b9f7a7809b0a070d0135ef7b58add96d..de2c2fe001096abae401b420c2a12110d1cee789 100644 (file)
@@ -126,5 +126,8 @@ audio::-webkit-media-controls-return-to-realtime-button, video::-webkit-media-co
 }
 
 audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button {
-    display: none;
+    -webkit-appearance: media-toggle-closed-captions-button;
+    display: -webkit-box;
+    width: 16px;
+    height: 16px;
 }
index 987056635e4e23a77f6df98f20f9d0a2d4f71c58..2ff50df72d6d6e8bb917a6aed30fcbde8dfb6256 100644 (file)
@@ -334,7 +334,6 @@ void RenderMedia::updateControls()
             createRewindButton();
             createPlayButton();
             createReturnToRealtimeButton();
-            createToggleClosedCaptionsButton();
             createStatusDisplay();
             createTimelineContainer();
             if (m_timelineContainer) {
@@ -344,6 +343,7 @@ void RenderMedia::updateControls()
             }
             createSeekBackButton();
             createSeekForwardButton();
+            createToggleClosedCaptionsButton();
             createFullscreenButton();
             createMuteButton();
             createVolumeSliderContainer();
index f2bdd7b6a5535e99576e5169b5f118a532690724..6304947c6e881269a7d4507156d22e77f32a7f9f 100644 (file)
@@ -1710,8 +1710,7 @@ bool RenderThemeMac::shouldRenderMediaControlPart(ControlPart part, Element* ele
     if (part == MediaToggleClosedCaptionsButtonPart) {
 
         // We rely on QTKit to render captions so don't enable the button unless it will be able to do so.
-        HTMLMediaElement* mediaElement = static_cast<HTMLMediaElement*>(element);
-        if (mediaControllerTheme() != MediaControllerThemeQuickTime || !element->hasTagName(videoTag) || !mediaElement->hasVideo())
+        if (!element->hasTagName(videoTag))
             return false;
     }
 
index 7bdd10ecbe73d583fce2ffa04d413d30b31772a9..a082bdae4941676c5a888e99e3ecb1e1debd42da 100644 (file)
@@ -1,3 +1,14 @@
+2009-11-20  Eric Carlson  <eric.carlson@apple.com>
+
+        Reviewed by Simon Fraser.
+
+        <rdar://problem/7414396> Leopard & Tiger: Support closed caption in <video> element
+
+        * WebKitSystemInterface.h:
+        * libWebKitSystemInterfaceLeopard.a:
+        * libWebKitSystemInterfaceSnowLeopard.a:
+        * libWebKitSystemInterfaceTiger.a:
+
 2009-11-19  Eric Carlson  <eric.carlson@apple.com>
 
         Reviewed by Dan Bernstein.
index 026af3a91f373d99b833834cc5b3ad9f385d998e..f1bc5231d66ce977edaec41d78651f4ad82c905b 100644 (file)
@@ -210,7 +210,8 @@ typedef enum {
     WKMediaUIPartSliderThumb,
     WKMediaUIPartRewindButton,
     WKMediaUIPartSeekToRealtimeButton,
-    WKMediaUIPartToggleClosedCaptionsButton,
+    WKMediaUIPartShowClosedCaptionsButton,
+    WKMediaUIPartHideClosedCaptionsButton,
     WKMediaUIPartUnMuteButton,
     WKMediaUIPartPauseButton,
     WKMediaUIPartBackground,
index 17446cc617976e7002382f715e654b9dbb089043..983fe1ec3952691487d660b6ad61eb14b2076c0b 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceLeopard.a and b/WebKitLibraries/libWebKitSystemInterfaceLeopard.a differ
index 946ddf929b94aabee83e761e58f783aeb0c4ac5e..cc329713c379ff99887abae23e22b40225bc2b6b 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a and b/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a differ
index d717b8564fd539ee3186020b5966a5eb5055425a..55363bd2e51e99db624b30e2f7da8e3832204fb4 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceTiger.a and b/WebKitLibraries/libWebKitSystemInterfaceTiger.a differ