Title: [166927] trunk/Source/WebCore
Revision
166927
Author
bfulg...@apple.com
Date
2014-04-08 09:01:38 -0700 (Tue, 08 Apr 2014)

Log Message

Keep 'webkitClosedCaptionsVisible' API in sync with captions display preferences
https://bugs.webkit.org/show_bug.cgi?id=131344

Reviewed by Eric Carlson.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::configureTextTrackGroup) If we decide that captions should
be active (due to user preferences) make sure the 'webkitClosedCaptionsVisible' state
is turned on.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (166926 => 166927)


--- trunk/Source/WebCore/ChangeLog	2014-04-08 14:52:33 UTC (rev 166926)
+++ trunk/Source/WebCore/ChangeLog	2014-04-08 16:01:38 UTC (rev 166927)
@@ -1,3 +1,15 @@
+2014-04-07  Brent Fulgham  <bfulg...@apple.com>
+
+        Keep 'webkitClosedCaptionsVisible' API in sync with captions display preferences
+        https://bugs.webkit.org/show_bug.cgi?id=131344
+
+        Reviewed by Eric Carlson.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::configureTextTrackGroup) If we decide that captions should
+        be active (due to user preferences) make sure the 'webkitClosedCaptionsVisible' state
+        is turned on.
+
 2014-04-08  Zalan Bujtas  <za...@apple.com>
 
         Subpixel rendering: Paint the filter effect result image on device pixel position.

Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (166926 => 166927)


--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2014-04-08 14:52:33 UTC (rev 166926)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2014-04-08 16:01:38 UTC (rev 166927)
@@ -3672,9 +3672,15 @@
         }
     }
 
-    if (trackToEnable)
+    if (trackToEnable) {
         trackToEnable->setMode(TextTrack::showingKeyword());
 
+        // If user preferences indicate we should always display captions, make sure we reflect the
+        // proper status via the webkitClosedCaptionsVisible API call:
+        if (!webkitClosedCaptionsVisible() && closedCaptionsVisible() && displayMode == CaptionUserPreferences::AlwaysOn)
+            m_webkitLegacyClosedCaptionOverride = true;
+    }
+
     m_processingPreferenceChange = false;
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to