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: https://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 6e3972f..d82fb9f 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 88e4dc9..05bf9d3 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 66eaaa4..1dd7a88 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 7625ba6..64b2be3 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 12ca14a..de2c2fe 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 9870566..2ff50df 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 f2bdd7b..6304947 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 7bdd10e..a082bda 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 026af3a..f1bc523 100644 (file)
@@ -210,7 +210,8 @@ typedef enum {
     WKMediaUIPartSliderThumb,
     WKMediaUIPartRewindButton,
     WKMediaUIPartSeekToRealtimeButton,
-    WKMediaUIPartToggleClosedCaptionsButton,
+    WKMediaUIPartShowClosedCaptionsButton,
+    WKMediaUIPartHideClosedCaptionsButton,
     WKMediaUIPartUnMuteButton,
     WKMediaUIPartPauseButton,
     WKMediaUIPartBackground,
index 17446cc..983fe1e 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceLeopard.a and b/WebKitLibraries/libWebKitSystemInterfaceLeopard.a differ
index 946ddf9..cc32971 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a and b/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a differ
index d717b85..55363bd 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceTiger.a and b/WebKitLibraries/libWebKitSystemInterfaceTiger.a differ