Title: [141840] trunk/Source/WebCore
Revision
141840
Author
[email protected]
Date
2013-02-04 18:01:20 -0800 (Mon, 04 Feb 2013)

Log Message

Allow TextTracks to be marked as closed captions
https://bugs.webkit.org/show_bug.cgi?id=108856

Reviewed by Darin Adler.

While this isn't exposed directly in markup, some platform media frameworks can
provide indication that a caption track is a closed caption. Expose such a flag
on TextTrack and platforms can show a different UI if they want to.

No tests - this isn't used elsewhere yet, nor exposed to the DOM.

* html/track/TextTrack.cpp:
(WebCore::TextTrack::TextTrack): Initialise new member.
* html/track/TextTrack.h:
(WebCore::TextTrack::isClosedCaptions): New member variable.
(WebCore::TextTrack::setIsClosedCaptions):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (141839 => 141840)


--- trunk/Source/WebCore/ChangeLog	2013-02-05 01:46:43 UTC (rev 141839)
+++ trunk/Source/WebCore/ChangeLog	2013-02-05 02:01:20 UTC (rev 141840)
@@ -1,3 +1,22 @@
+2013-02-04  Dean Jackson  <[email protected]>
+
+        Allow TextTracks to be marked as closed captions
+        https://bugs.webkit.org/show_bug.cgi?id=108856
+
+        Reviewed by Darin Adler.
+
+        While this isn't exposed directly in markup, some platform media frameworks can
+        provide indication that a caption track is a closed caption. Expose such a flag
+        on TextTrack and platforms can show a different UI if they want to.
+
+        No tests - this isn't used elsewhere yet, nor exposed to the DOM.
+
+        * html/track/TextTrack.cpp:
+        (WebCore::TextTrack::TextTrack): Initialise new member.
+        * html/track/TextTrack.h:
+        (WebCore::TextTrack::isClosedCaptions): New member variable.
+        (WebCore::TextTrack::setIsClosedCaptions):
+
 2013-02-04  Chris Hopman  <[email protected]>
 
         Make moveCaretTowardsWindowPoint not snap to the beginning/end when moved above/below editable

Modified: trunk/Source/WebCore/html/track/TextTrack.cpp (141839 => 141840)


--- trunk/Source/WebCore/html/track/TextTrack.cpp	2013-02-05 01:46:43 UTC (rev 141839)
+++ trunk/Source/WebCore/html/track/TextTrack.cpp	2013-02-05 02:01:20 UTC (rev 141840)
@@ -107,6 +107,7 @@
     , m_trackIndex(invalidTrackIndex)
     , m_renderedTrackIndex(invalidTrackIndex)
     , m_hasBeenConfigured(false)
+    , m_isClosedCaptions(false)
 {
     setKind(kind);
 }

Modified: trunk/Source/WebCore/html/track/TextTrack.h (141839 => 141840)


--- trunk/Source/WebCore/html/track/TextTrack.h	2013-02-05 01:46:43 UTC (rev 141839)
+++ trunk/Source/WebCore/html/track/TextTrack.h	2013-02-05 02:01:20 UTC (rev 141840)
@@ -109,6 +109,9 @@
     enum TextTrackType { TrackElement, AddTrack, InBand };
     TextTrackType trackType() const { return m_trackType; }
 
+    bool isClosedCaptions() const { return m_isClosedCaptions; }
+    void setIsClosedCaptions(bool isClosedCaptions) { m_isClosedCaptions = isClosedCaptions; }
+
     int trackIndex();
     void invalidateTrackIndex();
 
@@ -141,6 +144,7 @@
     int m_trackIndex;
     int m_renderedTrackIndex;
     bool m_hasBeenConfigured;
+    bool m_isClosedCaptions;
 };
 
 } // namespace WebCore
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to