Changeset 163974 in webkit
- Timestamp:
- Feb 12, 2014 12:39:24 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 23 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r163968 r163974 1 2014-02-12 Brendan Long <b.long@cablelabs.com> 2 3 Implement DataCue for metadata cues 4 https://bugs.webkit.org/show_bug.cgi?id=128402 5 6 Reviewed by Eric Carlson. 7 8 * js/dom/global-constructors-attributes-expected.txt: Add DataCue. 9 * media/track/track-datacue-expected.txt: Added. 10 * media/track/track-datacue.html: Added. 11 * platform/efl/js/dom/global-constructors-attributes-expected.txt: Add DataCue. 12 * platform/gtk-wk2/js/dom/global-constructors-attributes-expected.txt: Same. 13 * platform/gtk/js/dom/global-constructors-attributes-expected.txt: Same. 14 * platform/mac/js/dom/global-constructors-attributes-expected.txt: Same. 15 * platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt: Same. 16 * platform/win/js/dom/global-constructors-attributes-expected.txt: Same. 17 1 18 2014-02-12 Brady Eidson <beidson@apple.com> 2 19 -
trunk/LayoutTests/js/dom/global-constructors-attributes-expected.txt
r163649 r163974 259 259 PASS Object.getOwnPropertyDescriptor(global, 'DOMTokenList').enumerable is false 260 260 PASS Object.getOwnPropertyDescriptor(global, 'DOMTokenList').configurable is true 261 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').value is DataCue 262 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').hasOwnProperty('get') is false 263 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').hasOwnProperty('set') is false 264 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').enumerable is false 265 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').configurable is true 261 266 PASS Object.getOwnPropertyDescriptor(global, 'DelayNode').value is DelayNode 262 267 PASS Object.getOwnPropertyDescriptor(global, 'DelayNode').hasOwnProperty('get') is false -
trunk/LayoutTests/platform/efl/js/dom/global-constructors-attributes-expected.txt
r163649 r163974 259 259 PASS Object.getOwnPropertyDescriptor(global, 'DOMTokenList').enumerable is false 260 260 PASS Object.getOwnPropertyDescriptor(global, 'DOMTokenList').configurable is true 261 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').value is DataCue 262 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').hasOwnProperty('get') is false 263 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').hasOwnProperty('set') is false 264 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').enumerable is false 265 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').configurable is true 261 266 PASS Object.getOwnPropertyDescriptor(global, 'DelayNode').value is DelayNode 262 267 PASS Object.getOwnPropertyDescriptor(global, 'DelayNode').hasOwnProperty('get') is false -
trunk/LayoutTests/platform/gtk-wk2/js/dom/global-constructors-attributes-expected.txt
r163649 r163974 264 264 PASS Object.getOwnPropertyDescriptor(global, 'DOMTokenList').enumerable is false 265 265 PASS Object.getOwnPropertyDescriptor(global, 'DOMTokenList').configurable is true 266 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').value is DataCue 267 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').hasOwnProperty('get') is false 268 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').hasOwnProperty('set') is false 269 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').enumerable is false 270 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').configurable is true 266 271 PASS Object.getOwnPropertyDescriptor(global, 'DelayNode').value is DelayNode 267 272 PASS Object.getOwnPropertyDescriptor(global, 'DelayNode').hasOwnProperty('get') is false -
trunk/LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt
r163649 r163974 264 264 PASS Object.getOwnPropertyDescriptor(global, 'DOMTokenList').enumerable is false 265 265 PASS Object.getOwnPropertyDescriptor(global, 'DOMTokenList').configurable is true 266 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').value is DataCue 267 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').hasOwnProperty('get') is false 268 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').hasOwnProperty('set') is false 269 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').enumerable is false 270 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').configurable is true 266 271 PASS Object.getOwnPropertyDescriptor(global, 'DelayNode').value is DelayNode 267 272 PASS Object.getOwnPropertyDescriptor(global, 'DelayNode').hasOwnProperty('get') is false -
trunk/LayoutTests/platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt
r163649 r163974 259 259 PASS Object.getOwnPropertyDescriptor(global, 'DOMTokenList').enumerable is false 260 260 PASS Object.getOwnPropertyDescriptor(global, 'DOMTokenList').configurable is true 261 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').value is DataCue 262 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').hasOwnProperty('get') is false 263 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').hasOwnProperty('set') is false 264 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').enumerable is false 265 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').configurable is true 261 266 PASS Object.getOwnPropertyDescriptor(global, 'DelayNode').value is DelayNode 262 267 PASS Object.getOwnPropertyDescriptor(global, 'DelayNode').hasOwnProperty('get') is false -
trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt
r163649 r163974 259 259 PASS Object.getOwnPropertyDescriptor(global, 'DOMTokenList').enumerable is false 260 260 PASS Object.getOwnPropertyDescriptor(global, 'DOMTokenList').configurable is true 261 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').value is DataCue 262 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').hasOwnProperty('get') is false 263 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').hasOwnProperty('set') is false 264 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').enumerable is false 265 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').configurable is true 261 266 PASS Object.getOwnPropertyDescriptor(global, 'DelayNode').value is DelayNode 262 267 PASS Object.getOwnPropertyDescriptor(global, 'DelayNode').hasOwnProperty('get') is false -
trunk/LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt
r163649 r163974 199 199 PASS Object.getOwnPropertyDescriptor(global, 'DOMTokenList').enumerable is false 200 200 PASS Object.getOwnPropertyDescriptor(global, 'DOMTokenList').configurable is true 201 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').value is DataCue 202 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').hasOwnProperty('get') is false 203 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').hasOwnProperty('set') is false 204 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').enumerable is false 205 PASS Object.getOwnPropertyDescriptor(global, 'DataCue').configurable is true 201 206 PASS Object.getOwnPropertyDescriptor(global, 'Document').value is Document 202 207 PASS Object.getOwnPropertyDescriptor(global, 'Document').hasOwnProperty('get') is false -
trunk/Source/WebCore/CMakeLists.txt
r163826 r163974 2691 2691 html/track/AudioTrack.idl 2692 2692 html/track/AudioTrackList.idl 2693 html/track/DataCue.idl 2693 2694 html/track/TextTrack.idl 2694 2695 html/track/TextTrackCue.idl … … 2704 2705 html/track/AudioTrack.cpp 2705 2706 html/track/AudioTrackList.cpp 2707 html/track/DataCue.cpp 2706 2708 html/track/InbandGenericTextTrack.cpp 2707 2709 html/track/InbandTextTrack.cpp -
trunk/Source/WebCore/ChangeLog
r163973 r163974 1 2014-02-12 Brendan Long <b.long@cablelabs.com> 2 3 Implement DataCue for metadata cues 4 https://bugs.webkit.org/show_bug.cgi?id=128402 5 6 Reviewed by Eric Carlson. 7 8 Test: media/track/track-datacue.html 9 10 * CMakeLists.txt: Add DataCue. 11 * DerivedSources.cpp: Add JSDataCue. 12 * DerivedSources.make: Same. 13 * GNUmakefile.list.am: Add DataCue and JSDataCue. 14 * WebCore.vcxproj/WebCore.vcxproj: Add DataCue. 15 * WebCore.vcxproj/WebCore.vcxproj.filters: Same. 16 * WebCore.xcodeproj/project.pbxproj: Add DataCue and JSDataCue. 17 * bindings/js/JSTextTrackCueCustom.cpp: 18 (WebCore::toJS): Add DataCue wrapper. 19 * html/track/DataCue.cpp: Copied from Source/WebCore/html/track/TextTrack.idl. 20 * html/track/DataCue.h: Copied from Source/WebCore/html/track/TextTrack.idl. 21 * html/track/DataCue.idl: Copied from Source/WebCore/html/track/TextTrack.idl. 22 * html/track/InbandGenericTextTrack.cpp: 23 (WebCore::InbandGenericTextTrack::addGenericCue): Pass ASSERT_NO_EXCEPTION to addCue(). 24 * html/track/InbandWebVTTTextTrack.cpp: 25 (WebCore::InbandWebVTTTextTrack::newCuesParsed): Same. 26 * html/track/TextTrack.cpp: 27 (WebCore::TextTrack::addCue): Throw an exception if DataCue is added to a track that isn't kind="metadata". 28 * html/track/TextTrack.h: Add exception code parameter to addCue(). 29 * html/track/TextTrack.idl: Add [RaisesException] to addCue(). 30 * html/track/TextTrackCue.h: Add Data CueType. 31 1 32 2014-02-12 Zalan Bujtas <zalan@apple.com> 2 33 -
trunk/Source/WebCore/DerivedSources.cpp
r163649 r163974 464 464 #include "JSAudioTrack.cpp" 465 465 #include "JSAudioTrackList.cpp" 466 #include "JSDataCue.cpp" 466 467 #include "JSHTMLTrackElement.cpp" 467 468 #include "JSTextTrack.cpp" -
trunk/Source/WebCore/DerivedSources.make
r163906 r163974 445 445 $(WebCore)/html/track/AudioTrack.idl \ 446 446 $(WebCore)/html/track/AudioTrackList.idl \ 447 $(WebCore)/html/track/DataCue.idl \ 447 448 $(WebCore)/html/track/TextTrack.idl \ 448 449 $(WebCore)/html/track/TextTrackCue.idl \ -
trunk/Source/WebCore/GNUmakefile.list.am
r163853 r163974 165 165 DerivedSources/WebCore/JSDatabaseSync.cpp \ 166 166 DerivedSources/WebCore/JSDatabaseSync.h \ 167 DerivedSources/WebCore/JSDataCue.cpp \ 168 DerivedSources/WebCore/JSDataCue.h \ 167 169 DerivedSources/WebCore/JSDataTransferItem.cpp \ 168 170 DerivedSources/WebCore/JSDataTransferItem.h \ … … 1539 1541 $(WebCore)/html/track/AudioTrack.idl \ 1540 1542 $(WebCore)/html/track/AudioTrackList.idl \ 1543 $(WebCore)/html/track/DataCue.idl \ 1541 1544 $(WebCore)/html/track/TextTrack.idl \ 1542 1545 $(WebCore)/html/track/TextTrackCue.idl \ … … 3668 3671 Source/WebCore/html/track/AudioTrackList.cpp \ 3669 3672 Source/WebCore/html/track/AudioTrackList.h \ 3673 Source/WebCore/html/track/DataCue.cpp \ 3674 Source/WebCore/html/track/DataCue.h \ 3670 3675 Source/WebCore/html/track/InbandGenericTextTrack.cpp \ 3671 3676 Source/WebCore/html/track/InbandGenericTextTrack.h \ -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
r163853 r163974 15662 15662 <ClCompile Include="..\html\shadow\SpinButtonElement.cpp" /> 15663 15663 <ClCompile Include="..\html\shadow\TextControlInnerElements.cpp" /> 15664 <ClCompile Include="..\html\track\DataCue.cpp" /> 15664 15665 <ClCompile Include="..\html\track\InbandGenericTextTrack.cpp" /> 15665 15666 <ClCompile Include="..\html\track\InbandTextTrack.cpp" /> … … 20419 20420 <ClInclude Include="..\html\shadow\SpinButtonElement.h" /> 20420 20421 <ClInclude Include="..\html\shadow\TextControlInnerElements.h" /> 20422 <ClInclude Include="..\html\track\DataCue.h" /> 20421 20423 <ClInclude Include="..\html\track\InbandGenericTextTrack.h" /> 20422 20424 <ClInclude Include="..\html\track\InbandTextTrack.h" /> -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
r163853 r163974 4171 4171 <Filter>html\shadow</Filter> 4172 4172 </ClCompile> 4173 <ClCompile Include="..\html\track\DataCue.cpp"> 4174 <Filter>html\track</Filter> 4175 </ClCompile> 4173 4176 <ClCompile Include="..\html\track\InbandGenericTextTrack.cpp"> 4174 4177 <Filter>html\track</Filter> … … 11198 11201 <ClInclude Include="..\html\shadow\TextControlInnerElements.h"> 11199 11202 <Filter>html\shadow</Filter> 11203 </ClInclude> 11204 <ClInclude Include="..\html\track\DataCue.h"> 11205 <Filter>html\track</Filter> 11200 11206 </ClInclude> 11201 11207 <ClInclude Include="..\html\track\InbandGenericTextTrack.h"> -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r163853 r163974 5323 5323 BE20508118A460BC0080647E /* JSVTTCue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE20507F18A460AA0080647E /* JSVTTCue.cpp */; }; 5324 5324 BE20508218A460C30080647E /* JSVTTCue.h in Headers */ = {isa = PBXBuildFile; fileRef = BE20508018A460AA0080647E /* JSVTTCue.h */; }; 5325 BE23480C18A9870B00E4B6E8 /* DataCue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE23480918A9870300E4B6E8 /* DataCue.cpp */; }; 5326 BE23480D18A9871400E4B6E8 /* DataCue.h in Headers */ = {isa = PBXBuildFile; fileRef = BE23480A18A9870300E4B6E8 /* DataCue.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5327 BE61039D18A9D65200DD50D7 /* JSDataCue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE61039B18A9D61200DD50D7 /* JSDataCue.cpp */; }; 5328 BE61039E18A9D65A00DD50D7 /* JSDataCue.h in Headers */ = {isa = PBXBuildFile; fileRef = BE61039C18A9D61200DD50D7 /* JSDataCue.h */; }; 5325 5329 BE6DF70B171CA2C500DD52B8 /* JSVideoTrackCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE6DF708171CA2C500DD52B8 /* JSVideoTrackCustom.cpp */; }; 5326 5330 BE6DF70D171CA2C500DD52B8 /* JSVideoTrackListCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE6DF70A171CA2C500DD52B8 /* JSVideoTrackListCustom.cpp */; }; … … 12527 12531 BE20507F18A460AA0080647E /* JSVTTCue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSVTTCue.cpp; sourceTree = "<group>"; }; 12528 12532 BE20508018A460AA0080647E /* JSVTTCue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSVTTCue.h; sourceTree = "<group>"; }; 12533 BE23480918A9870300E4B6E8 /* DataCue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DataCue.cpp; sourceTree = "<group>"; }; 12534 BE23480A18A9870300E4B6E8 /* DataCue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataCue.h; sourceTree = "<group>"; }; 12535 BE23480B18A9870300E4B6E8 /* DataCue.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DataCue.idl; sourceTree = "<group>"; }; 12536 BE61039B18A9D61200DD50D7 /* JSDataCue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDataCue.cpp; sourceTree = "<group>"; }; 12537 BE61039C18A9D61200DD50D7 /* JSDataCue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDataCue.h; sourceTree = "<group>"; }; 12529 12538 BE6DF708171CA2C500DD52B8 /* JSVideoTrackCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSVideoTrackCustom.cpp; sourceTree = "<group>"; }; 12530 12539 BE6DF70A171CA2C500DD52B8 /* JSVideoTrackListCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSVideoTrackListCustom.cpp; sourceTree = "<group>"; }; … … 18043 18052 49EED13E1051969400099FAB /* JSCanvasRenderingContext2D.cpp */, 18044 18053 49EED13F1051969400099FAB /* JSCanvasRenderingContext2D.h */, 18054 BE61039B18A9D61200DD50D7 /* JSDataCue.cpp */, 18055 BE61039C18A9D61200DD50D7 /* JSDataCue.h */, 18045 18056 2E0888D21148848A00AF4265 /* JSDOMFormData.cpp */, 18046 18057 2E0888D31148848A00AF4265 /* JSDOMFormData.h */, … … 19084 19095 BE88E0D01715D2A200658D98 /* AudioTrackList.h */, 19085 19096 BE88E0D11715D2A200658D98 /* AudioTrackList.idl */, 19097 BE23480918A9870300E4B6E8 /* DataCue.cpp */, 19098 BE23480A18A9870300E4B6E8 /* DataCue.h */, 19099 BE23480B18A9870300E4B6E8 /* DataCue.idl */, 19086 19100 BE16C58E17CFE17200852C04 /* InbandGenericTextTrack.cpp */, 19087 19101 BE16C58F17CFE17200852C04 /* InbandGenericTextTrack.h */, … … 23979 23993 1449E24C107D4A8400B5793F /* JSCallbackData.h in Headers */, 23980 23994 65DF323A09D1DE65000BE325 /* JSCanvasGradient.h in Headers */, 23995 BE23480D18A9871400E4B6E8 /* DataCue.h in Headers */, 23981 23996 51EAC5681815ED3E004F1BA4 /* IDBTransactionCoordinator.h in Headers */, 23982 23997 65DF323C09D1DE65000BE325 /* JSCanvasPattern.h in Headers */, … … 25797 25812 3106037014327D2E00ABF4BA /* WebKitCSSFilterValue.h in Headers */, 25798 25813 31288E730E3005D6003619AE /* WebKitCSSKeyframeRule.h in Headers */, 25814 BE61039E18A9D65A00DD50D7 /* JSDataCue.h in Headers */, 25799 25815 31288E750E3005D6003619AE /* WebKitCSSKeyframesRule.h in Headers */, 25800 25816 498391590F1E776900C23782 /* WebKitCSSMatrix.h in Headers */, … … 27438 27454 BC60D9BF0D2A269A00B9918F /* JSEventException.cpp in Sources */, 27439 27455 93B70D6909EB0C7C009D8468 /* JSEventListener.cpp in Sources */, 27456 BE23480C18A9870B00E4B6E8 /* DataCue.cpp in Sources */, 27440 27457 E0FEF372B47C53EAC1C1FBEE /* JSEventSource.cpp in Sources */, 27441 27458 C6A703325C9D0B6CDCBC4D77 /* JSEventTarget.cpp in Sources */, … … 28435 28452 0F605AEC15F94848004DF0C0 /* ScrollingConstraints.cpp in Sources */, 28436 28453 1AF62EE714DA22A70041556C /* ScrollingCoordinator.cpp in Sources */, 28454 BE61039D18A9D65200DD50D7 /* JSDataCue.cpp in Sources */, 28437 28455 1AF62EE614DA22A70041556C /* ScrollingCoordinatorMac.mm in Sources */, 28438 28456 CD5596911475B678001D0BD0 /* AudioFileReaderIOS.cpp in Sources */, -
trunk/Source/WebCore/bindings/js/JSTextTrackCueCustom.cpp
r163649 r163974 28 28 #if ENABLE(VIDEO_TRACK) 29 29 30 #include "JSDataCue.h" 30 31 #include "JSTextTrackCue.h" 31 32 #include "JSTrackCustom.h" … … 70 71 // This switch will make more sense once we support DataCue 71 72 switch (cue->cueType()) { 73 case TextTrackCue::Data: 74 return CREATE_DOM_WRAPPER(exec, globalObject, DataCue, cue); 72 75 case TextTrackCue::WebVTT: 73 76 case TextTrackCue::Generic: … … 86 89 ASSERT(jsTextTrackCue->structure()->typeInfo().overridesVisitChildren()); 87 90 Base::visitChildren(jsTextTrackCue, visitor); 88 91 89 92 // Mark the cue's track root if it has one. 90 93 TextTrackCue& textTrackCue = jsTextTrackCue->impl(); -
trunk/Source/WebCore/html/track/DataCue.cpp
r163973 r163974 1 1 /* 2 * Copyright (C) 201 1 Google Inc.All rights reserved.2 * Copyright (C) 2014 Cable Television Labs Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 21 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 24 */ 25 25 26 [ 27 Conditional=VIDEO_TRACK, 28 EventTarget, 29 GenerateIsReachable=ImplElementRoot, 30 JSCustomMarkFunction, 31 SkipVTableValidation, 32 ] interface TextTrack { 33 readonly attribute DOMString id; 34 [CustomSetter] attribute DOMString kind; 35 readonly attribute DOMString label; 36 [CustomSetter] attribute DOMString language; 26 #include "config.h" 37 27 38 attribute DOMString mode; 28 #if ENABLE(VIDEO_TRACK) 29 #include "DataCue.h" 39 30 40 readonly attribute TextTrackCueList cues; 41 readonly attribute TextTrackCueList activeCues; 42 attribute EventListener oncuechange; 31 #include "Logging.h" 32 #include "TextTrack.h" 33 #include "TextTrackCueList.h" 43 34 44 void addCue(TextTrackCue cue); 45 [RaisesException] void removeCue(TextTrackCue cue); 35 namespace WebCore { 46 36 47 #if defined(ENABLE_WEBVTT_REGIONS) && ENABLE_WEBVTT_REGIONS 48 readonly attribute TextTrackRegionList regions; 49 void addRegion(TextTrackRegion region); 50 [RaisesException] void removeRegion(TextTrackRegion region); 37 DataCue::DataCue(ScriptExecutionContext& context, double start, double end, PassRefPtr<ArrayBuffer> data) 38 : TextTrackCue(context, start, end) 39 , m_data(data) 40 { 41 } 42 43 DataCue::~DataCue() 44 { 45 } 46 47 String DataCue::text(bool& isNull) const 48 { 49 isNull = true; 50 return String(); 51 } 52 53 DataCue* toDataCue(TextTrackCue* cue) 54 { 55 ASSERT_WITH_SECURITY_IMPLICATION(cue->cueType() == TextTrackCue::Data); 56 return static_cast<DataCue*>(cue); 57 } 58 59 const DataCue* toDataCue(const TextTrackCue* cue) 60 { 61 ASSERT_WITH_SECURITY_IMPLICATION(cue->cueType() == TextTrackCue::Data); 62 return static_cast<const DataCue*>(cue); 63 } 64 65 } // namespace WebCore 66 51 67 #endif 52 53 // EventTarget interface54 void addEventListener(DOMString type,55 EventListener listener,56 optional boolean useCapture);57 void removeEventListener(DOMString type,58 EventListener listener,59 optional boolean useCapture);60 [RaisesException] boolean dispatchEvent(Event evt);61 }; -
trunk/Source/WebCore/html/track/DataCue.h
r163973 r163974 1 1 /* 2 * Copyright (C) 201 1 Google Inc.All rights reserved.2 * Copyright (C) 2014 Cable Television Labs Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 21 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 24 */ 25 25 26 [ 27 Conditional=VIDEO_TRACK, 28 EventTarget, 29 GenerateIsReachable=ImplElementRoot, 30 JSCustomMarkFunction, 31 SkipVTableValidation, 32 ] interface TextTrack { 33 readonly attribute DOMString id; 34 [CustomSetter] attribute DOMString kind; 35 readonly attribute DOMString label; 36 [CustomSetter] attribute DOMString language; 26 #ifndef DataCue_h 27 #define DataCue_h 37 28 38 attribute DOMString mode; 29 #if ENABLE(VIDEO_TRACK) 39 30 40 readonly attribute TextTrackCueList cues; 41 readonly attribute TextTrackCueList activeCues; 42 attribute EventListener oncuechange; 31 #include "TextTrackCue.h" 32 #include <runtime/ArrayBuffer.h> 33 #include <wtf/RefCounted.h> 43 34 44 void addCue(TextTrackCue cue); 45 [RaisesException] void removeCue(TextTrackCue cue); 35 namespace WebCore { 46 36 47 #if defined(ENABLE_WEBVTT_REGIONS) && ENABLE_WEBVTT_REGIONS 48 readonly attribute TextTrackRegionList regions; 49 void addRegion(TextTrackRegion region); 50 [RaisesException] void removeRegion(TextTrackRegion region); 37 class ScriptExecutionContext; 38 39 class DataCue : public TextTrackCue { 40 public: 41 static PassRefPtr<DataCue> create(ScriptExecutionContext& context, double start, double end, PassRefPtr<ArrayBuffer> data) 42 { 43 return adoptRef(new DataCue(context, start, end, data)); 44 } 45 46 virtual ~DataCue(); 47 virtual CueType cueType() const { return Data; } 48 49 RefPtr<ArrayBuffer> data() const { return m_data; } 50 void setData(PassRefPtr<ArrayBuffer> data) { m_data = data; } 51 String text(bool& isNull) const; 52 53 protected: 54 DataCue(ScriptExecutionContext&, double start, double end, PassRefPtr<ArrayBuffer>); 55 56 private: 57 RefPtr<ArrayBuffer> m_data; 58 }; 59 60 DataCue* toDataCue(TextTrackCue*); 61 const DataCue* toDataCue(const TextTrackCue*); 62 63 } // namespace WebCore 64 51 65 #endif 52 53 // EventTarget interface 54 void addEventListener(DOMString type, 55 EventListener listener, 56 optional boolean useCapture); 57 void removeEventListener(DOMString type, 58 EventListener listener, 59 optional boolean useCapture); 60 [RaisesException] boolean dispatchEvent(Event evt); 61 }; 66 #endif -
trunk/Source/WebCore/html/track/DataCue.idl
r163973 r163974 1 1 /* 2 * Copyright (C) 201 1 GoogleInc. All rights reserved.2 * Copyright (C) 2014 Cable Television Labs Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 23 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 24 */ 25 26 25 [ 27 26 Conditional=VIDEO_TRACK, 28 EventTarget, 29 GenerateIsReachable=ImplElementRoot, 30 JSCustomMarkFunction, 31 SkipVTableValidation, 32 ] interface TextTrack { 33 readonly attribute DOMString id; 34 [CustomSetter] attribute DOMString kind; 35 readonly attribute DOMString label; 36 [CustomSetter] attribute DOMString language; 37 38 attribute DOMString mode; 39 40 readonly attribute TextTrackCueList cues; 41 readonly attribute TextTrackCueList activeCues; 42 attribute EventListener oncuechange; 43 44 void addCue(TextTrackCue cue); 45 [RaisesException] void removeCue(TextTrackCue cue); 46 47 #if defined(ENABLE_WEBVTT_REGIONS) && ENABLE_WEBVTT_REGIONS 48 readonly attribute TextTrackRegionList regions; 49 void addRegion(TextTrackRegion region); 50 [RaisesException] void removeRegion(TextTrackRegion region); 51 #endif 52 53 // EventTarget interface 54 void addEventListener(DOMString type, 55 EventListener listener, 56 optional boolean useCapture); 57 void removeEventListener(DOMString type, 58 EventListener listener, 59 optional boolean useCapture); 60 [RaisesException] boolean dispatchEvent(Event evt); 27 Constructor(double startTime, double endTime, ArrayBuffer data), 28 ConstructorCallWith=ScriptExecutionContext, 29 ] interface DataCue : TextTrackCue { 30 attribute ArrayBuffer data; 31 readonly attribute DOMString? text; 61 32 }; -
trunk/Source/WebCore/html/track/InbandGenericTextTrack.cpp
r163649 r163974 160 160 m_cueMap.add(cueData.get(), cue.get()); 161 161 162 addCue(cue );162 addCue(cue, ASSERT_NO_EXCEPTION); 163 163 } 164 164 -
trunk/Source/WebCore/html/track/InbandWebVTTTextTrack.cpp
r163649 r163974 72 72 return; 73 73 } 74 addCue(cue.release() );74 addCue(cue.release(), ASSERT_NO_EXCEPTION); 75 75 } 76 76 } -
trunk/Source/WebCore/html/track/TextTrack.cpp
r163649 r163974 274 274 } 275 275 276 void TextTrack::addCue(PassRefPtr<TextTrackCue> prpCue )276 void TextTrack::addCue(PassRefPtr<TextTrackCue> prpCue, ExceptionCode& ec) 277 277 { 278 278 if (!prpCue) … … 280 280 281 281 RefPtr<TextTrackCue> cue = prpCue; 282 283 // 4.7.10.12.6 Text tracks exposing in-band metadata 284 // The UA will use DataCue to expose only text track cue objects that belong to a text track that has a text 285 // track kind of metadata. 286 // If a DataCue is added to a TextTrack via the addCue() method but the text track does not have its text 287 // track kind set to metadata, throw a InvalidNodeTypeError exception and don't add the cue to the TextTrackList 288 // of the TextTrack. 289 if (cue->cueType() == TextTrackCue::Data && kind() != metadataKeyword()) { 290 ec = INVALID_NODE_TYPE_ERR; 291 return; 292 } 282 293 283 294 // TODO(93143): Add spec-compliant behavior for negative time values. -
trunk/Source/WebCore/html/track/TextTrack.h
r163649 r163974 109 109 TextTrackClient* client() { return m_client; } 110 110 111 void addCue(PassRefPtr<TextTrackCue> );111 void addCue(PassRefPtr<TextTrackCue>, ExceptionCode&); 112 112 virtual void removeCue(TextTrackCue*, ExceptionCode&); 113 113 -
trunk/Source/WebCore/html/track/TextTrack.idl
r159061 r163974 42 42 attribute EventListener oncuechange; 43 43 44 void addCue(TextTrackCue cue);44 [RaisesException] void addCue(TextTrackCue cue); 45 45 [RaisesException] void removeCue(TextTrackCue cue); 46 46 -
trunk/Source/WebCore/html/track/TextTrackCue.h
r163649 r163974 86 86 87 87 enum CueType { 88 Data, 88 89 Generic, 89 90 WebVTT
Note: See TracChangeset
for help on using the changeset viewer.