Adding some IDL files for <track>.
authorannacc@chromium.org <annacc@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Oct 2011 02:53:38 +0000 (02:53 +0000)
committerannacc@chromium.org <annacc@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Oct 2011 02:53:38 +0000 (02:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=62887

Reviewed by Adam Barth.

Tests:
MutableTextTrack.idl and addTrack() in HTMLMediaElement.idl are tested by:
media/track/track-mutable.html

TextTrack.idl is tested by:
media/track/track-text-track.html

TextTrackCue.idl is tested by:
media/track/track-webvtt-tc006-cue-identifiers.html
media/track/track-webvtt-tc007-cue-no-id.html
media/track/track-webvtt-tc008-timings-no-hours.html
media/track/track-webvtt-tc009-timings-hour.html
media/track/track-webvtt-tc013-settings.html
media/track/track-webvtt-tc023-markup.html

TextTrackCueList.idl is tested by:
media/track/track-text-track-cue-list.html

* CMakeLists.txt: Adding files to build systems.
* CodeGenerators.pri: Adding files to build systems.
* DerivedSources.cpp: Adding files to build systems.
* DerivedSources.make: Adding files to build systems.
* GNUmakefile.list.am: Adding files to build systems.
* WebCore.gypi: Adding files to build systems.
* WebCore.pro: Adding files to build systems.
* WebCore.xcodeproj/project.pbxproj: Adding files to build systems.
* bindings/gobject/GNUmakefile.am: Adding files to build systems.
* bindings/gobject/WebKitHTMLElementWrapperFactory.cpp: Adding files to build systems.
* bindings/js/JSBindingsAllInOne.cpp: Adding files to build systems.

* bindings/js/JSTextTrackCustom.cpp: Added.
(WebCore::toJS):

* bindings/scripts/CodeGeneratorV8.pm:
(HasCustomToV8Implementation): Special check for TextTrack since V8 can auto-generate
it, but JS cannot yet.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::addTrack): creates and returns a new MutableTextTrack.
* html/HTMLMediaElement.h: Adding addTrack() function.
* html/HTMLMediaElement.idl: Adding addTrack() function.
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::track): Adding track getter.
* html/HTMLTrackElement.h: Adding track getter.
* html/HTMLTrackElement.idl: Adding track getter.
* html/MutableTextTrack.idl: Added.
* html/TextTrack.idl: Added.
* html/TextTrackCue.idl: Added.
* html/TextTrackCueList.cpp:
(WebCore::TextTrackCueList::length):
(WebCore::TextTrackCueList::item): Used for [] operator.
* html/TextTrackCueList.h: Added item() for [] operator.
* html/TextTrackCueList.idl: Added.
* page/DOMWindow.idl: Adding TextTrackCue new operator.

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

29 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/CodeGenerators.pri
Source/WebCore/DerivedSources.cpp
Source/WebCore/DerivedSources.make
Source/WebCore/GNUmakefile.list.am
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.pro
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/gobject/GNUmakefile.am
Source/WebCore/bindings/gobject/WebKitHTMLElementWrapperFactory.cpp
Source/WebCore/bindings/js/JSBindingsAllInOne.cpp
Source/WebCore/bindings/js/JSTextTrackCustom.cpp [new file with mode: 0644]
Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/html/HTMLMediaElement.idl
Source/WebCore/html/HTMLTrackElement.cpp
Source/WebCore/html/HTMLTrackElement.h
Source/WebCore/html/HTMLTrackElement.idl
Source/WebCore/html/MutableTextTrack.cpp
Source/WebCore/html/MutableTextTrack.h
Source/WebCore/html/MutableTextTrack.idl [new file with mode: 0644]
Source/WebCore/html/TextTrack.idl [new file with mode: 0644]
Source/WebCore/html/TextTrackCue.idl [new file with mode: 0644]
Source/WebCore/html/TextTrackCueList.cpp
Source/WebCore/html/TextTrackCueList.h
Source/WebCore/html/TextTrackCueList.idl [new file with mode: 0644]
Source/WebCore/page/DOMWindow.idl

index ec91ab5..f875322 100644 (file)
@@ -277,7 +277,11 @@ SET(WebCore_IDL_FILES
     html/HTMLVideoElement.idl
     html/ImageData.idl
     html/MediaError.idl
+    html/MutableTextTrack.idl
     html/TextMetrics.idl
+    html/TextTrack.idl
+    html/TextTrackCue.idl
+    html/TextTrackCueList.idl
     html/TimeRanges.idl
     html/ValidityState.idl
     html/VoidCallback.idl
index 2936d9f..7da31bf 100644 (file)
@@ -1,3 +1,65 @@
+2011-10-19  Anna Cavender  <annacc@chromium.org>
+
+        Adding some IDL files for <track>.
+        https://bugs.webkit.org/show_bug.cgi?id=62887
+
+        Reviewed by Adam Barth.
+
+        Tests:
+        MutableTextTrack.idl and addTrack() in HTMLMediaElement.idl are tested by:
+        media/track/track-mutable.html
+
+        TextTrack.idl is tested by:
+        media/track/track-text-track.html
+
+        TextTrackCue.idl is tested by:
+        media/track/track-webvtt-tc006-cue-identifiers.html
+        media/track/track-webvtt-tc007-cue-no-id.html
+        media/track/track-webvtt-tc008-timings-no-hours.html
+        media/track/track-webvtt-tc009-timings-hour.html
+        media/track/track-webvtt-tc013-settings.html
+        media/track/track-webvtt-tc023-markup.html
+
+        TextTrackCueList.idl is tested by:
+        media/track/track-text-track-cue-list.html
+
+        * CMakeLists.txt: Adding files to build systems.
+        * CodeGenerators.pri: Adding files to build systems.
+        * DerivedSources.cpp: Adding files to build systems.
+        * DerivedSources.make: Adding files to build systems.
+        * GNUmakefile.list.am: Adding files to build systems.
+        * WebCore.gypi: Adding files to build systems.
+        * WebCore.pro: Adding files to build systems.
+        * WebCore.xcodeproj/project.pbxproj: Adding files to build systems.
+        * bindings/gobject/GNUmakefile.am: Adding files to build systems.
+        * bindings/gobject/WebKitHTMLElementWrapperFactory.cpp: Adding files to build systems.
+        * bindings/js/JSBindingsAllInOne.cpp: Adding files to build systems.
+
+        * bindings/js/JSTextTrackCustom.cpp: Added.
+        (WebCore::toJS):
+
+        * bindings/scripts/CodeGeneratorV8.pm:
+        (HasCustomToV8Implementation): Special check for TextTrack since V8 can auto-generate
+        it, but JS cannot yet.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::addTrack): creates and returns a new MutableTextTrack.
+        * html/HTMLMediaElement.h: Adding addTrack() function.
+        * html/HTMLMediaElement.idl: Adding addTrack() function.
+        * html/HTMLTrackElement.cpp:
+        (WebCore::HTMLTrackElement::track): Adding track getter.
+        * html/HTMLTrackElement.h: Adding track getter.
+        * html/HTMLTrackElement.idl: Adding track getter.
+        * html/MutableTextTrack.idl: Added.
+        * html/TextTrack.idl: Added.
+        * html/TextTrackCue.idl: Added.
+        * html/TextTrackCueList.cpp:
+        (WebCore::TextTrackCueList::length):
+        (WebCore::TextTrackCueList::item): Used for [] operator.
+        * html/TextTrackCueList.h: Added item() for [] operator.
+        * html/TextTrackCueList.idl: Added.
+        * page/DOMWindow.idl: Adding TextTrackCue new operator.
+
 2011-10-19  Shawn Singh  <shawnsingh@chromium.org>
 
         [chromium] Fix webkit style on a few files.
index 3eb694d..eb27125 100644 (file)
@@ -577,6 +577,14 @@ contains(DEFINES, ENABLE_SVG=1) {
     svg/SVGVKernElement.idl
 }
 
+contains(DEFINES, ENABLE_VIDEO_TRACK=1) {
+  IDL_BINDINGS += \
+    html/MutableTextTrack.idl \
+    html/TextTrack.idl \
+    html/TextTrackCue.idl \
+    html/TextTrackCueList.idl \
+}
+
 v8: wrapperFactoryArg = --wrapperFactoryV8
 else: wrapperFactoryArg = --wrapperFactory
 
index ef8bd6b..a5624d7 100644 (file)
 #include "JSMetadata.cpp"
 #include "JSMetadataCallback.cpp"
 #include "JSMouseEvent.cpp"
+#if ENABLE(VIDEO_TRACK)
+#include "JSMutableTextTrack.cpp"
+#endif
 #include "JSMutationCallback.cpp"
 #include "JSMutationEvent.cpp"
 #include "JSMutationRecord.cpp"
 #include "JSText.cpp"
 #include "JSTextEvent.cpp"
 #include "JSTextMetrics.cpp"
+#if ENABLE(VIDEO_TRACK)
+#include "JSTextTrack.cpp"
+#include "JSTextTrackCue.cpp"
+#include "JSTextTrackCueList.cpp"
+#endif
 #include "JSTimeRanges.cpp"
 #include "JSTouch.cpp"
 #include "JSTouchEvent.cpp"
index 496cc27..d26cbe8 100644 (file)
@@ -297,6 +297,7 @@ DOM_CLASSES = \
     Metadata \
     MetadataCallback \
     MouseEvent \
+    MutableTextTrack \
     MutationCallback \
     MutationEvent \
     MutationRecord \
@@ -520,6 +521,9 @@ DOM_CLASSES = \
     Text \
     TextEvent \
     TextMetrics \
+    TextTrack \
+    TextTrackCue \
+    TextTrackCueList \
     TimeRanges \
     Touch \
     TouchEvent \
index 89d9494..7817b1f 100644 (file)
@@ -375,6 +375,8 @@ webcore_built_sources += \
        DerivedSources/WebCore/JSMessagePort.h \
        DerivedSources/WebCore/JSMouseEvent.cpp \
        DerivedSources/WebCore/JSMouseEvent.h \
+       DerivedSources/WebCore/JSMutableTextTrack.cpp \
+       DerivedSources/WebCore/JSMutableTextTrack.h \
        DerivedSources/WebCore/JSMutationEvent.cpp \
        DerivedSources/WebCore/JSMutationEvent.h \
        DerivedSources/WebCore/JSMutationRecord.cpp \
@@ -488,6 +490,12 @@ webcore_built_sources += \
        DerivedSources/WebCore/JSText.h \
        DerivedSources/WebCore/JSTextMetrics.cpp \
        DerivedSources/WebCore/JSTextMetrics.h \
+       DerivedSources/WebCore/JSTextTrack.cpp \
+       DerivedSources/WebCore/JSTextTrack.h \
+       DerivedSources/WebCore/JSTextTrackCue.cpp \
+       DerivedSources/WebCore/JSTextTrackCue.h \
+       DerivedSources/WebCore/JSTextTrackCueList.cpp \
+       DerivedSources/WebCore/JSTextTrackCueList.h \
        DerivedSources/WebCore/JSTimeRanges.cpp \
        DerivedSources/WebCore/JSTimeRanges.h \
        DerivedSources/WebCore/JSTouch.cpp \
@@ -830,6 +838,7 @@ webcore_sources += \
        Source/WebCore/bindings/js/JSStyleSheetCustom.cpp \
        Source/WebCore/bindings/js/JSStyleSheetListCustom.cpp \
        Source/WebCore/bindings/js/JSTextCustom.cpp \
+       Source/WebCore/bindings/js/JSTextTrackCustom.cpp \
        Source/WebCore/bindings/js/JSTouchCustom.cpp \
        Source/WebCore/bindings/js/JSTouchListCustom.cpp \
        Source/WebCore/bindings/js/JSTreeWalkerCustom.cpp \
index 6603f66..cda043c 100644 (file)
             'html/HTMLVideoElement.idl',
             'html/ImageData.idl',
             'html/MediaError.idl',
+            'html/MutableTextTrack.idl',
             'html/TextMetrics.idl',
+            'html/TextTrack.idl',
+            'html/TextTrackCue.idl',
+            'html/TextTrackCueList.idl',
             'html/TimeRanges.idl',
             'html/ValidityState.idl',
             'html/VoidCallback.idl',
             'bindings/js/JSStyleSheetCustom.cpp',
             'bindings/js/JSStyleSheetListCustom.cpp',
             'bindings/js/JSTextCustom.cpp',
+            'bindings/js/JSTextTrackCustom.cpp',
             'bindings/js/JSTouchCustom.cpp',
             'bindings/js/JSTouchListCustom.cpp',
             'bindings/js/JSTreeWalkerCustom.cpp',
index 1a96c41..6c9d49a 100644 (file)
@@ -3568,6 +3568,14 @@ contains(DEFINES, ENABLE_JAVASCRIPT_DEBUGGER=1) {
     }
 }
 
+contains(DEFINES, ENABLE_VIDEO_TRACK=1) {
+
+    !v8 {
+        SOURCES += \
+            bindings/js/JSTextTrackCustom.cpp
+    }
+}
+
 contains(DEFINES, ENABLE_WEB_SOCKETS=1) {
     HEADERS += \
         websockets/CloseEvent.h \
index 846c6be..69b5484 100644 (file)
                066C77310AB603FD00238CC4 /* RenderFileUploadControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 066C772F0AB603FD00238CC4 /* RenderFileUploadControl.h */; };
                06E81ED70AB5D5E900C87837 /* LocalCurrentGraphicsContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 06E81ED60AB5D5E900C87837 /* LocalCurrentGraphicsContext.h */; };
                06E81EEC0AB5DA9700C87837 /* LocalCurrentGraphicsContext.mm in Sources */ = {isa = PBXBuildFile; fileRef = 06E81EEB0AB5DA9700C87837 /* LocalCurrentGraphicsContext.mm */; };
+               0707568B142262D600414161 /* HTMLTrackElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07075688142262D600414161 /* HTMLTrackElement.cpp */; };
+               0707568C142262D600414161 /* HTMLTrackElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 07075689142262D600414161 /* HTMLTrackElement.h */; };
+               070756941422668D00414161 /* JSTextTrack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0707568E1422668C00414161 /* JSTextTrack.cpp */; };
+               070756951422668D00414161 /* JSTextTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = 0707568F1422668C00414161 /* JSTextTrack.h */; };
+               070756D314239A4E00414161 /* JSHTMLTrackElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 070756D114239A4E00414161 /* JSHTMLTrackElement.cpp */; };
+               070756D414239A4F00414161 /* JSHTMLTrackElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 070756D214239A4E00414161 /* JSHTMLTrackElement.h */; };
+               070756DD14239B4E00414161 /* JSTextTrackCue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 070756D714239B4B00414161 /* JSTextTrackCue.cpp */; };
+               070756DE14239B4E00414161 /* JSTextTrackCue.h in Headers */ = {isa = PBXBuildFile; fileRef = 070756D814239B4B00414161 /* JSTextTrackCue.h */; };
+               070756DF14239B4E00414161 /* JSTextTrackCueList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 070756D914239B4C00414161 /* JSTextTrackCueList.cpp */; };
+               070756E014239B4E00414161 /* JSTextTrackCueList.h in Headers */ = {isa = PBXBuildFile; fileRef = 070756DA14239B4E00414161 /* JSTextTrackCueList.h */; };
+               070756E61423C96A00414161 /* JSMutableTextTrack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 070756E41423C96500414161 /* JSMutableTextTrack.cpp */; };
+               070756E71423C96A00414161 /* JSMutableTextTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = 070756E51423C96700414161 /* JSMutableTextTrack.h */; };
                0709FC4E1025DEE30059CDBA /* AccessibilitySlider.h in Headers */ = {isa = PBXBuildFile; fileRef = 0709FC4D1025DEE30059CDBA /* AccessibilitySlider.h */; };
                072C8B11131C518600A4FCE9 /* MediaPlayerPrivateAVFoundation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 076F0D0912B8192700C26AA4 /* MediaPlayerPrivateAVFoundation.cpp */; };
                0735EE6A0F40C5E4004A2604 /* MediaPlayerProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 0735EE690F40C5E4004A2604 /* MediaPlayerProxy.h */; settings = {ATTRIBUTES = (Private, ); }; };
                0753860214489E9800B78452 /* CachedCues.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0753860014489E9800B78452 /* CachedCues.cpp */; };
                0753860314489E9800B78452 /* CachedCues.h in Headers */ = {isa = PBXBuildFile; fileRef = 0753860114489E9800B78452 /* CachedCues.h */; };
                076F0D0E12B8192700C26AA4 /* MediaPlayerPrivateAVFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 076F0D0A12B8192700C26AA4 /* MediaPlayerPrivateAVFoundation.h */; };
+               073A3AE3142BAFE100977A4C /* JSTextTrackCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 073A3AE2142BAFE100977A4C /* JSTextTrackCustom.cpp */; };
                07B0113F1032242200FBDC33 /* AccessibilityMediaControls.h in Headers */ = {isa = PBXBuildFile; fileRef = 07B0113E1032242200FBDC33 /* AccessibilityMediaControls.h */; };
                0806E57A12893045007CED32 /* SVGMatrix.h in Headers */ = {isa = PBXBuildFile; fileRef = 0806E57912893045007CED32 /* SVGMatrix.h */; settings = {ATTRIBUTES = (Private, ); }; };
                080E49261255F3BD00EFCA27 /* SVGTextLayoutEngineBaseline.h in Headers */ = {isa = PBXBuildFile; fileRef = 080E49221255F3BD00EFCA27 /* SVGTextLayoutEngineBaseline.h */; };
                066C772F0AB603FD00238CC4 /* RenderFileUploadControl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RenderFileUploadControl.h; sourceTree = "<group>"; };
                06E81ED60AB5D5E900C87837 /* LocalCurrentGraphicsContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalCurrentGraphicsContext.h; sourceTree = "<group>"; };
                06E81EEB0AB5DA9700C87837 /* LocalCurrentGraphicsContext.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = LocalCurrentGraphicsContext.mm; sourceTree = "<group>"; };
+               07075688142262D600414161 /* HTMLTrackElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLTrackElement.cpp; sourceTree = "<group>"; };
+               07075689142262D600414161 /* HTMLTrackElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLTrackElement.h; sourceTree = "<group>"; };
+               0707568A142262D600414161 /* HTMLTrackElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLTrackElement.idl; sourceTree = "<group>"; };
+               0707568E1422668C00414161 /* JSTextTrack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTextTrack.cpp; sourceTree = "<group>"; };
+               0707568F1422668C00414161 /* JSTextTrack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSTextTrack.h; sourceTree = "<group>"; };
+               0707569C1422979800414161 /* TextTrack.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TextTrack.idl; sourceTree = "<group>"; };
+               0707569D1422979800414161 /* TextTrackCue.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TextTrackCue.idl; sourceTree = "<group>"; };
+               0707569E1422979800414161 /* TextTrackCueList.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TextTrackCueList.idl; sourceTree = "<group>"; };
+               070756D114239A4E00414161 /* JSHTMLTrackElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLTrackElement.cpp; sourceTree = "<group>"; };
+               070756D214239A4E00414161 /* JSHTMLTrackElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHTMLTrackElement.h; sourceTree = "<group>"; };
+               070756D714239B4B00414161 /* JSTextTrackCue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTextTrackCue.cpp; sourceTree = "<group>"; };
+               070756D814239B4B00414161 /* JSTextTrackCue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSTextTrackCue.h; sourceTree = "<group>"; };
+               070756D914239B4C00414161 /* JSTextTrackCueList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTextTrackCueList.cpp; sourceTree = "<group>"; };
+               070756DA14239B4E00414161 /* JSTextTrackCueList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSTextTrackCueList.h; sourceTree = "<group>"; };
+               070756E31423C7DF00414161 /* MutableTextTrack.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = MutableTextTrack.idl; sourceTree = "<group>"; };
+               070756E41423C96500414161 /* JSMutableTextTrack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMutableTextTrack.cpp; sourceTree = "<group>"; };
+               070756E51423C96700414161 /* JSMutableTextTrack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMutableTextTrack.h; sourceTree = "<group>"; };
                0709FC4D1025DEE30059CDBA /* AccessibilitySlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilitySlider.h; sourceTree = "<group>"; };
                070DD8F50F01868000727DEB /* mediaControls.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = mediaControls.css; sourceTree = "<group>"; };
                0735EE690F40C5E4004A2604 /* MediaPlayerProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaPlayerProxy.h; sourceTree = "<group>"; };
                076F0D0912B8192700C26AA4 /* MediaPlayerPrivateAVFoundation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaPlayerPrivateAVFoundation.cpp; sourceTree = "<group>"; };
                076F0D0A12B8192700C26AA4 /* MediaPlayerPrivateAVFoundation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaPlayerPrivateAVFoundation.h; sourceTree = "<group>"; };
                079F5E4B0F3BEBEA005E0782 /* MediaPlayerPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaPlayerPrivate.h; sourceTree = "<group>"; };
+               073A3AE2142BAFE100977A4C /* JSTextTrackCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTextTrackCustom.cpp; sourceTree = "<group>"; };
                07AFE5900F1446BD00841617 /* mediaControlsQuickTime.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = mediaControlsQuickTime.css; sourceTree = "<group>"; };
                07B0113E1032242200FBDC33 /* AccessibilityMediaControls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilityMediaControls.h; sourceTree = "<group>"; };
                0806E57912893045007CED32 /* SVGMatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGMatrix.h; sourceTree = "<group>"; };
                                A871DC1D0A15205700B12A68 /* HTMLTitleElement.cpp */,
                                A871DC1C0A15205700B12A68 /* HTMLTitleElement.h */,
                                A80E7AAE0A19D1F1007FB8C5 /* HTMLTitleElement.idl */,
+                               07075688142262D600414161 /* HTMLTrackElement.cpp */,
+                               07075689142262D600414161 /* HTMLTrackElement.h */,
+                               0707568A142262D600414161 /* HTMLTrackElement.idl */,
                                A8EA79E70A1916DF00A8EF5F /* HTMLUListElement.cpp */,
                                A8EA79E60A1916DF00A8EF5F /* HTMLUListElement.h */,
                                1A85B1D50A1B236C00D8C87C /* HTMLUListElement.idl */,
                                F55B3D921251F12D003EF269 /* MonthInputType.h */,
                                B1AD4E5113A12A0B00846B27 /* MutableTextTrack.cpp */,
                                B1AD4E5213A12A0B00846B27 /* MutableTextTrack.h */,
+                               070756E31423C7DF00414161 /* MutableTextTrack.idl */,
                                F55B3D931251F12D003EF269 /* NumberInputType.cpp */,
                                F55B3D941251F12D003EF269 /* NumberInputType.h */,
                                F55B3D951251F12D003EF269 /* PasswordInputType.cpp */,
                                BCEF453F0E676AC1001C1287 /* TextMetrics.idl */,
                                B1AD4E5513A12A0B00846B27 /* TextTrack.cpp */,
                                B1AD4E5613A12A0B00846B27 /* TextTrack.h */,
+                               0707569C1422979800414161 /* TextTrack.idl */,
                                B1AD4E5713A12A0B00846B27 /* TextTrackCue.cpp */,
                                B1AD4E5813A12A0B00846B27 /* TextTrackCue.h */,
+                               0707569D1422979800414161 /* TextTrackCue.idl */,
                                B1AD4E5913A12A0B00846B27 /* TextTrackCueList.cpp */,
                                B1AD4E5A13A12A0B00846B27 /* TextTrackCueList.h */,
+                               0707569E1422979800414161 /* TextTrackCueList.idl */,
                                F55B3DA71251F12D003EF269 /* TimeInputType.cpp */,
                                F55B3DA81251F12D003EF269 /* TimeInputType.h */,
                                E446139D0CD6331000FADA75 /* TimeRanges.cpp */,
                                A80E7E930A1A83E3007FB8C5 /* JSHTMLTextAreaElement.h */,
                                A80E7B090A19D606007FB8C5 /* JSHTMLTitleElement.cpp */,
                                A80E7B020A19D606007FB8C5 /* JSHTMLTitleElement.h */,
+                               070756D114239A4E00414161 /* JSHTMLTrackElement.cpp */,
+                               070756D214239A4E00414161 /* JSHTMLTrackElement.h */,
                                1A85B20E0A1B258700D8C87C /* JSHTMLUListElement.cpp */,
                                1A85B20F0A1B258700D8C87C /* JSHTMLUListElement.h */,
                                6E4ABCD2138EA0B70071D291 /* JSHTMLUnknownElement.cpp */,
                                49C7B9831042D2D30009D447 /* JSInt8Array.h */,
                                E44614100CD6826900FADA75 /* JSMediaError.cpp */,
                                E44614110CD6826900FADA75 /* JSMediaError.h */,
+                               070756E41423C96500414161 /* JSMutableTextTrack.cpp */,
+                               070756E51423C96700414161 /* JSMutableTextTrack.h */,
                                9001787E12E0370700648462 /* JSOESStandardDerivatives.cpp */,
                                9001787F12E0370700648462 /* JSOESStandardDerivatives.h */,
                                6EBF0E7412A9868800DB1709 /* JSOESTextureFloat.cpp */,
                                77A17AA312F28B2A004E02F6 /* JSOESVertexArrayObject.h */,
                                BCEF45F30E687B5C001C1287 /* JSTextMetrics.cpp */,
                                BCEF45F40E687B5C001C1287 /* JSTextMetrics.h */,
+                               0707568E1422668C00414161 /* JSTextTrack.cpp */,
+                               0707568F1422668C00414161 /* JSTextTrack.h */,
+                               070756D714239B4B00414161 /* JSTextTrackCue.cpp */,
+                               070756D814239B4B00414161 /* JSTextTrackCue.h */,
+                               070756D914239B4C00414161 /* JSTextTrackCueList.cpp */,
+                               070756DA14239B4E00414161 /* JSTextTrackCueList.h */,
                                E44614120CD6826900FADA75 /* JSTimeRanges.cpp */,
                                E44614130CD6826900FADA75 /* JSTimeRanges.h */,
                                49EECEFE105070C400099FAB /* JSUint16Array.cpp */,
                                08E4FE450E2BD41400F4CAE0 /* JSSVGLengthCustom.cpp */,
                                B2C96D8C0B3AF2B7005E80EC /* JSSVGPathSegCustom.cpp */,
                                1A2C40AA0DEB55AA005AF19E /* JSTextCustom.cpp */,
+                               073A3AE2142BAFE100977A4C /* JSTextTrackCustom.cpp */,
                                516BB7920CE91E6800512F79 /* JSTreeWalkerCustom.cpp */,
                                49EECF7710508D9C00099FAB /* JSUint16ArrayCustom.cpp */,
                                49EECF7610508D9C00099FAB /* JSUint32ArrayCustom.cpp */,
                                1A927FD41416A15B003A83C8 /* nptypes.h in Headers */,
                                CECCFC3B141973D5002A0AC1 /* DecodeEscapeSequences.h in Headers */,
                                0FE71406142170B800DB33BA /* ScrollbarThemeMock.h in Headers */,
+                               0707568C142262D600414161 /* HTMLTrackElement.h in Headers */,
+                               070756951422668D00414161 /* JSTextTrack.h in Headers */,
+                               070756D414239A4F00414161 /* JSHTMLTrackElement.h in Headers */,
+                               070756DE14239B4E00414161 /* JSTextTrackCue.h in Headers */,
+                               070756E014239B4E00414161 /* JSTextTrackCueList.h in Headers */,
+                               070756E71423C96A00414161 /* JSMutableTextTrack.h in Headers */,
                                BCEB179C143379F50052EAE9 /* RenderBoxRegionInfo.h in Headers */,
                                59102FBC14327D3B003C9D04 /* ContentSearchUtils.h in Headers */,
                                1AA84F05143BA7BD0051D153 /* ScrollElasticityController.h in Headers */,
                                9752D38D1413104B003305BD /* JSHTMLSpanElement.cpp in Sources */,
                                0FE71405142170B800DB33BA /* ScrollbarThemeMock.cpp in Sources */,
                                5D8C4DBF1428222C0026CE72 /* DisplaySleepDisabler.cpp in Sources */,
+                               0707568B142262D600414161 /* HTMLTrackElement.cpp in Sources */,
+                               070756941422668D00414161 /* JSTextTrack.cpp in Sources */,
+                               070756D314239A4E00414161 /* JSHTMLTrackElement.cpp in Sources */,
+                               070756DD14239B4E00414161 /* JSTextTrackCue.cpp in Sources */,
+                               070756DF14239B4E00414161 /* JSTextTrackCueList.cpp in Sources */,
+                               070756E61423C96A00414161 /* JSMutableTextTrack.cpp in Sources */,
+                               073A3AE3142BAFE100977A4C /* JSTextTrackCustom.cpp in Sources */,
                                A85F22091430377D007CC884 /* JSPopStateEventCustom.cpp in Sources */,
                                319AE063142D6B24006563A1 /* StyleFilterData.cpp in Sources */,
                                319AE069142D78DD006563A1 /* FilterOperations.cpp in Sources */,
index d0786d5..ddc8eb6 100644 (file)
@@ -406,6 +406,23 @@ webkitgtk_gdom_built_sources += \
        DerivedSources/webkit/WebKitDOMHTMLVideoElementPrivate.h
 endif
 
+if ENABLE_VIDEO_TRACK
+webkitgtk_built_h_api += \
+       $(top_builddir)/DerivedSources/webkit/WebKitDOMMutableTextTrack.h \
+       $(top_builddir)/DerivedSources/webkit/WebKitDOMTextTrack.h \
+       $(top_builddir)/DerivedSources/webkit/WebKitDOMTextTrackCue.h \
+       $(top_builddir)/DerivedSources/webkit/WebKitDOMTextTrackCueList.h
+webkitgtk_gdom_built_sources += \
+       DerivedSources/webkit/WebKitDOMMutableTextTrack.cpp \
+       DerivedSources/webkit/WebKitDOMMutableTextTrackPrivate.h \
+       DerivedSources/webkit/WebKitDOMTextTrack.cpp \
+       DerivedSources/webkit/WebKitDOMTextTrackPrivate.h \
+       DerivedSources/webkit/WebKitDOMTextTrackCue.cpp \
+       DerivedSources/webkit/WebKitDOMTextTrackCuePrivate.h \
+       DerivedSources/webkit/WebKitDOMTextTrackCueList.cpp \
+       DerivedSources/webkit/WebKitDOMTextTrackCueListPrivate.h
+endif
+
 gdom_class_list := $(subst WebKitDOM,, $(filter-out %Private, $(basename $(notdir $(webkitgtk_gdom_built_sources)))))
 gdom_class_list += Custom EventTarget Object
 DerivedSources/webkit/webkitdom.h: $(WebCore)/bindings/scripts/gobject-generate-headers.pl $(WebCore)/bindings/gobject/GNUmakefile.am
index 50c3f13..356723d 100644 (file)
 #include "webkit/WebKitDOMHTMLVideoElementPrivate.h"
 #endif
 
+#if ENABLE(VIDEO_TRACK)
+#include "webkit/WebKitDOMMutableTextTrackPrivate.h"
+#include "webkit/WebKitDOMTextTrackCueListPrivate.h"
+#include "webkit/WebKitDOMTextTrackCuePrivate.h"
+#include "webkit/WebKitDOMTextTrackPrivate.h"
+#endif
 #include <wtf/text/CString.h>
 
 namespace WebKit {
index 56f7cca..76fd050 100644 (file)
 #include "JSStyleSheetCustom.cpp"
 #include "JSStyleSheetListCustom.cpp"
 #include "JSTextCustom.cpp"
+#include "JSTextTrackCustom.cpp"
 #include "JSTouchCustom.cpp"
 #include "JSTouchListCustom.cpp"
 #include "JSTreeWalkerCustom.cpp"
diff --git a/Source/WebCore/bindings/js/JSTextTrackCustom.cpp b/Source/WebCore/bindings/js/JSTextTrackCustom.cpp
new file mode 100644 (file)
index 0000000..365d027
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if ENABLE(VIDEO_TRACK)
+
+#include "JSTextTrack.h"
+
+#include "JSMutableTextTrack.h"
+
+using namespace JSC;
+
+namespace WebCore {
+
+JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, TextTrack* impl)
+{
+    if (!impl)
+        return jsNull();
+    
+    JSDOMWrapper* wrapper = getCachedWrapper(currentWorld(exec), impl);
+    
+    if (wrapper)
+        return wrapper;
+
+    switch (impl->trackType()) {
+    case TextTrack::LoadableTextTrack:
+    case TextTrack::BaseTextTrack:
+        return CREATE_DOM_WRAPPER(exec, globalObject, TextTrack, impl);
+        break;
+    case TextTrack::MutableTextTrack:
+        return CREATE_DOM_WRAPPER(exec, globalObject, MutableTextTrack, impl);
+        break;
+    }
+    
+    ASSERT_NOT_REACHED();
+    return jsNull();
+}
+
+} // namespace WebCore
+
+#endif
index 7dcaf52..3a6637c 100644 (file)
@@ -2850,6 +2850,7 @@ sub HasCustomToV8Implementation {
     return 0 if $interfaceName eq "DOMImplementation";
     return 0 if $interfaceName eq "DOMStringMap";
     return 0 if $interfaceName eq "DOMTokenList";
+    return 0 if $interfaceName eq "TextTrack";
 
     # For everything else, do what JSC does.
     return $dataNode->extendedAttributes->{"CustomToJS"};
index 67ac0f5..c247cb4 100644 (file)
@@ -88,6 +88,7 @@
 
 #if ENABLE(VIDEO_TRACK)
 #include "HTMLTrackElement.h"
+#include "MutableTextTrack.h"
 #include "RuntimeEnabledFeatures.h"
 #endif
 
@@ -1979,6 +1980,14 @@ float HTMLMediaElement::percentLoaded() const
     return buffered / duration;
 }
 
+#if ENABLE(VIDEO_TRACK)
+PassRefPtr<MutableTextTrack> HTMLMediaElement::addTrack(const String& kind, const String& label, const String& language)
+{
+    RefPtr<MutableTextTrack> mutableTrack = MutableTextTrack::create(this, kind, label, language);
+    return mutableTrack.release();
+}
+#endif
+
 bool HTMLMediaElement::havePotentialSourceChild()
 {
     // Stash the current <source> node and next nodes so we can restore them after checking
index 77488d4..212b6a1 100644 (file)
@@ -57,6 +57,9 @@ class Uint8Array;
 #if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
 class Widget;
 #endif
+#if ENABLE(VIDEO_TRACK)
+class MutableTextTrack;
+#endif
 
 // FIXME: The inheritance from MediaPlayerClient here should be private inheritance.
 // But it can't be until the Chromium WebMediaPlayerClientImpl class is fixed so it
@@ -178,6 +181,10 @@ public:
 
     float percentLoaded() const;
 
+#if ENABLE(VIDEO_TRACK)
+    PassRefPtr<MutableTextTrack> addTrack(const String& kind, const String& label = "", const String& language = "");
+#endif
+
 #if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
     void allocateMediaPlayerIfNecessary();
     void setNeedWidgetUpdate(bool needWidgetUpdate) { m_needWidgetUpdate = needWidgetUpdate; }
index 1ae5e64..f84503c 100644 (file)
@@ -110,5 +110,9 @@ module html {
     const [EnabledAtRuntime=webkitMediaSource] unsigned short SOURCE_ENDED = 2;
     readonly attribute [EnabledAtRuntime=webkitMediaSource] unsigned short webkitSourceState;
 #endif
+
+#if defined(ENABLE_VIDEO_TRACK) && ENABLE_VIDEO_TRACK
+    [EnabledAtRuntime=webkitVideoTrack] MutableTextTrack addTrack(in DOMString kind, in [Optional] DOMString label, in [Optional] DOMString language);
+#endif
 };
 }
index b40bc4f..2bcf8b8 100644 (file)
@@ -125,6 +125,13 @@ void HTMLTrackElement::setIsDefault(bool isDefault)
     setBooleanAttribute(defaultAttr, isDefault);
 }
 
+TextTrack* HTMLTrackElement::track() const
+{
+    if (m_track)
+        return m_track.get();
+    return 0;
+}
+
 bool HTMLTrackElement::isURLAttribute(Attribute* attribute) const
 {
     return attribute->name() == srcAttr;
index 4a9e472..710c985 100644 (file)
@@ -48,6 +48,7 @@ public:
     void setSrclang(const String&);
     void setLabel(const String&);
     void setIsDefault(bool);
+    TextTrack* track() const;
     
     void load(ScriptExecutionContext*, TextTrackClient*);
 
index 55259e0..0782fe9 100644 (file)
@@ -34,6 +34,6 @@ module html {
     attribute DOMString label;
     attribute [Reflect=default] boolean isDefault;
 
-    // readonly attribute TextTrack track;
+    readonly attribute TextTrack track;
 };
 }
index 30a2c51..769b2ea 100644 (file)
@@ -39,12 +39,12 @@ MutableTextTrack::MutableTextTrack(TextTrackClient* trackClient, const String& k
 {
 }
 
-void MutableTextTrack::addCue(PassRefPtr<TextTrackCue>)
+void MutableTextTrack::addCue(PassRefPtr<TextTrackCue>, ExceptionCode&)
 {
     // FIXME(62890): Implement.
 }
 
-void MutableTextTrack::removeCue(PassRefPtr<TextTrackCue>)
+void MutableTextTrack::removeCue(PassRefPtr<TextTrackCue>, ExceptionCode&)
 {
     // FIXME(62890): Implement.
 }
index b05c289..e0f4765 100644 (file)
@@ -45,8 +45,8 @@ public:
     }
     virtual ~MutableTextTrack() { }
 
-    void addCue(PassRefPtr<TextTrackCue>);
-    void removeCue(PassRefPtr<TextTrackCue>);
+    void addCue(PassRefPtr<TextTrackCue>, ExceptionCode&);
+    void removeCue(PassRefPtr<TextTrackCue>, ExceptionCode&);
 
     virtual void newCuesLoaded();
     virtual void fetchNewestCues(Vector<TextTrackCue*>&);
diff --git a/Source/WebCore/html/MutableTextTrack.idl b/Source/WebCore/html/MutableTextTrack.idl
new file mode 100644 (file)
index 0000000..1377cfc
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2011 Google Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module html {
+
+    interface [
+        Conditional=VIDEO_TRACK,
+        EnabledAtRuntime=webkitVideoTrack
+    ] MutableTextTrack : TextTrack {
+        void addCue(in TextTrackCue cue)
+            raises (DOMException);
+
+        void removeCue(in TextTrackCue cue)
+            raises (DOMException);
+    };
+}
\ No newline at end of file
diff --git a/Source/WebCore/html/TextTrack.idl b/Source/WebCore/html/TextTrack.idl
new file mode 100644 (file)
index 0000000..65998d2
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2011 Google Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+module html {
+
+    interface [
+        Conditional=VIDEO_TRACK,
+        EnabledAtRuntime=webkitVideoTrack,
+        CustomToJS
+    ] TextTrack {
+        readonly attribute DOMString kind;
+        readonly attribute DOMString label;
+        readonly attribute DOMString language;
+
+        const [Reflect=NONE] unsigned short None = 0;
+        const [Reflect=LOADING] unsigned short Loading = 1;
+        const [Reflect=LOADED] unsigned short Loaded = 2;
+        const [Reflect=ERROR] unsigned short Error = 3;
+        readonly attribute unsigned short readyState;
+
+        const [Reflect=DISABLED] unsigned short Disabled = 0;
+        const [Reflect=HIDDEN] unsigned short Hidden = 1;
+        const [Reflect=SHOWING] unsigned short Showing = 2;
+        attribute unsigned short mode
+            setter raises (DOMException);
+
+        readonly attribute TextTrackCueList cues;
+        readonly attribute TextTrackCueList activeCues;
+    };
+}
\ No newline at end of file
diff --git a/Source/WebCore/html/TextTrackCue.idl b/Source/WebCore/html/TextTrackCue.idl
new file mode 100644 (file)
index 0000000..fce95a6
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2011 Google Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+module html {
+
+    interface [
+        Conditional=VIDEO_TRACK,
+        EnabledAtRuntime=webkitVideoTrack,
+        CanBeConstructed,
+        GenerateNativeConverter,
+        Constructor(in DOMString id, in double startTime, in double endTime, in DOMString text, in [Optional=CallWithDefaultValue] DOMString settings, in [Optional=CallWithDefaultValue] boolean pauseOnExit),
+        CallWith=ScriptExecutionContext
+    ] TextTrackCue {
+        readonly attribute TextTrack track;
+        readonly attribute DOMString id;
+
+        readonly attribute double startTime;
+        readonly attribute double endTime;
+        readonly attribute boolean pauseOnExit;
+
+        readonly attribute DOMString direction;
+        readonly attribute boolean snapToLines;
+        readonly attribute long linePosition;
+        readonly attribute long textPosition;
+        readonly attribute long size;
+        readonly attribute DOMString alignment;
+
+        DOMString getCueAsSource();
+        DocumentFragment getCueAsHTML();
+    };
+
+}
\ No newline at end of file
index 9a06bd5..07740f8 100644 (file)
@@ -36,6 +36,18 @@ TextTrackCueList::TextTrackCueList()
     // FIXME(62883): Implement.
 }
 
+unsigned long TextTrackCueList::length() const
+{
+    // FIXME(62883): Implement.
+    return 0;
+}
+
+TextTrackCue* TextTrackCueList::item(unsigned index) const
+{
+    // FIXME(62883): Implement.
+    return 0;
+}
+
 TextTrackCue* TextTrackCueList::getCueById(const String&) const
 {
     // FIXME(62883): Implement.
index 2548399..051aa52 100644 (file)
@@ -43,6 +43,7 @@ public:
     }
 
     unsigned long length() const;
+    TextTrackCue* item(unsigned index) const;
     TextTrackCue* getCueById(const String&) const;
     PassRefPtr<TextTrackCueList> activeCues();
 
diff --git a/Source/WebCore/html/TextTrackCueList.idl b/Source/WebCore/html/TextTrackCueList.idl
new file mode 100644 (file)
index 0000000..c1b700d
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2011 Google Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+module html {
+
+    interface [
+        Conditional=VIDEO_TRACK,
+        EnabledAtRuntime=webkitVideoTrack,
+        HasIndexGetter
+    ] TextTrackCueList {
+        readonly attribute unsigned long length;
+        TextTrackCue item(in unsigned long index);
+        TextTrackCue getCueById(in DOMString id);
+    };
+
+}
\ No newline at end of file
index c5b8edd..4fa2d07 100644 (file)
@@ -605,6 +605,10 @@ module window {
         attribute [JSCCustomGetter,EnabledAtRuntime] WebSocketConstructor WebSocket; // Usable with the new operator
 #endif
 
+#if defined(ENABLE_VIDEO_TRACK) && ENABLE_VIDEO_TRACK
+        attribute [EnabledAtRuntime=webkitVideoTrack] TextTrackCueConstructor TextTrackCue; // Usable with the new operator
+#endif
+
         attribute DOMPluginConstructor Plugin;
         attribute DOMPluginArrayConstructor PluginArray;