Enable video caption controls on Windows.
authorroger_fong@apple.com <roger_fong@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Dec 2012 22:18:23 +0000 (22:18 +0000)
committerroger_fong@apple.com <roger_fong@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Dec 2012 22:18:23 +0000 (22:18 +0000)
https://bugs.webkit.org/show_bug.cgi?id=105045.

Reviewed by Eric Carlson.

Now that video tracks have been enabled on Windows, enable controls as well.

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
(WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler):
* html/shadow/MediaControlElements.h:
* rendering/RenderThemeWin.h:

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

Source/WebCore/ChangeLog
Source/WebCore/html/shadow/MediaControlElements.cpp
Source/WebCore/html/shadow/MediaControlElements.h
Source/WebCore/rendering/RenderThemeWin.h

index 1189262..03545de 100644 (file)
@@ -1,3 +1,18 @@
+2012-12-14  Roger Fong  <roger_fong@apple.com>
+
+        Enable video caption controls on Windows.
+        https://bugs.webkit.org/show_bug.cgi?id=105045.
+
+        Reviewed by Eric Carlson.
+
+        Now that video tracks have been enabled on Windows, enable controls as well.
+
+        * html/shadow/MediaControlElements.cpp:
+        (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
+        (WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler):
+        * html/shadow/MediaControlElements.h:
+        * rendering/RenderThemeWin.h:
+
 2012-12-14  Mark Lam  <mark.lam@apple.com>
 
         Introducing the DatabaseStrategy and database servers.
index 8b8e73f..82d2b16 100644 (file)
@@ -649,11 +649,11 @@ const AtomicString& MediaControlReturnToRealtimeButtonElement::shadowPseudoId()
 
 MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement(Document* document, MediaControls* controls)
     : MediaControlInputElement(document, MediaShowClosedCaptionsButton)
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) || PLATFORM(WIN)
     , m_controls(controls)
 #endif
 {
-#if !PLATFORM(MAC)
+#if !PLATFORM(MAC) && !PLATFORM(WIN)
     UNUSED_PARAM(controls);
 #endif
 }
@@ -683,7 +683,7 @@ void MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler(Event* e
         // UI. Not all ports may want the closed captions button to toggle a list of tracks, so
         // we have to use #if.
         // https://bugs.webkit.org/show_bug.cgi?id=101877
-#if !PLATFORM(MAC)
+#if !PLATFORM(MAC) && !PLATFORM(WIN)
         mediaController()->setClosedCaptionsVisible(!mediaController()->closedCaptionsVisible());
         setChecked(mediaController()->closedCaptionsVisible());
         updateDisplayType();
index 89c9a02..cb59627 100644 (file)
@@ -275,7 +275,7 @@ private:
     virtual const AtomicString& shadowPseudoId() const OVERRIDE;
     virtual void defaultEventHandler(Event*) OVERRIDE;
 
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) || PLATFORM(WIN)
     MediaControls* m_controls;
 #endif
 };
index b97f300..921b587 100644 (file)
@@ -25,6 +25,7 @@
 #define RenderThemeWin_h
 
 #include "RenderTheme.h"
+#include <SafariTheme/SafariThemeConstants.h>
 
 #if WIN32
 typedef void* HANDLE;