Commit 159869e5 authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

Add interfaces and stubs for audio and video tracks

https://bugs.webkit.org/show_bug.cgi?id=113965

Patch by Brendan Long <b.long@cablelabs.com> on 2013-04-19
Reviewed by Jer Noble.

No new tests because there's no implementations, so there's nothing
interesting to test.

* CMakeLists.txt: Add AudioTrack, VideoTrack, AudioTrackList and VideoTrackList.
* DerivedSources.cpp: Same.
* DerivedSources.make: Same.
* DerivedSources.pri: Same.
* GNUmakefile.list.am: Same.
* Target.pri: Same.
* UseJSC.cmake: Same.
* WebCore.vcproj/WebCore.vcproj: Same.
* WebCore.xcodeproj/project.pbxproj: Same.
* bindings/gobject/GNUmakefile.am: Same.
* bindings/js/JSAudioTrackCustom.cpp: Added, based on JSTestTrackCustom
* bindings/js/JSAudioTrackListCustom.cpp: Same.
* bindings/js/JSBindingsAllInOne.cpp: Add AudioTrack, VideoTrack, AudioTrackList and VideoTrackList.
* bindings/js/JSVideoTrackCustom.cpp: Added, based on JSTestTrackCustom
* bindings/js/JSVideoTrackListCustom.cpp: Same.
* dom/EventTarget.h: Make AudioTrackList and VideoTrackList event targets.
* dom/EventTargetFactory.in: Same.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Add m_audioTracks and m_videoTracks
(WebCore::HTMLMediaElement::~HTMLMediaElement): Clear clients for audio and video tracks
(WebCore::HTMLMediaElement::audioTrackEnabledChanged): Added.
(WebCore::HTMLMediaElement::videoTrackSelectedChanged): Added.
(WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack): Added, based on mediaPlayerDidAddTextTrack
(WebCore::HTMLMediaElement::mediaPlayerDidAddVideoTrack): Same.
(WebCore::HTMLMediaElement::mediaPlayerDidRemoveAudioTrack): Added, based on mediaPlayerDidRemoveTextTrack
(WebCore::HTMLMediaElement::mediaPlayerDidRemoveVideoTrack): Same.
(WebCore::HTMLMediaElement::addAudioTrack): Added, based on addTextTrack
(WebCore::HTMLMediaElement::addVideoTrack): Same.
(WebCore::HTMLMediaElement::removeAudioTrack): Added, based on removeTextTrack
(WebCore::HTMLMediaElement::removeVideoTrack): Added, based on removeTextTrack
(WebCore::HTMLMediaElement::removeAllInbandTracks): Remove audio and video tracks too
(WebCore::HTMLMediaElement::audioTracks): Added, based on textTracks
(WebCore::HTMLMediaElement::videoTracks): Added, based on textTracks
(WebCore::HTMLMediaElement::reportMemoryUsage): Add audio and video tracks
* html/HTMLMediaElement.h: Add audioTracks and videoTracks and related functions
* html/HTMLMediaElement.idl: Add audioTracks and videoTracks
* html/track/AudioTrack.cpp: Added, based on TextTrack and InbandTextTrack.
* html/track/AudioTrack.h: Same.
* html/track/AudioTrack.idl: Added.
* html/track/AudioTrackList.cpp: Added, based on TextTrackList
* html/track/AudioTrackList.h: Same.
* html/track/AudioTrackList.idl: Added.
* html/track/TextTrackList.h: Add missing OVERRIDE on interfaceName()
* html/track/VideoTrack.cpp: Added, based on TextTrack and InbandTextTrack.
* html/track/VideoTrack.h: Same.
* html/track/VideoTrack.idl: Added.
* html/track/VideoTrackList.cpp: Added, based on TextTrackList
* html/track/VideoTrackList.h: Same.
* html/track/VideoTrackList.idl: Added.
* platform/graphics/AudioTrackPrivate.h: Added, based on InbandTextTrackPrivate.h
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::addAudioTrack): Added, based on addTextTrack
(WebCore::MediaPlayer::removeAudioTrack): Added, based on removeTextTrack
(WebCore::MediaPlayer::addVideoTrack): Added, based on addTextTrack
(WebCore::MediaPlayer::removeVideoTrack): Added, based on removeTextTrack
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerDidAddAudioTrack): Added, based on mediaPlayerDidAddTextTrack
(WebCore::MediaPlayerClient::mediaPlayerDidAddVideoTrack): Same
(WebCore::MediaPlayerClient::mediaPlayerDidRemoveAudioTrack): Added, based on mediaPlayerDidRemoveTextTrack
(WebCore::MediaPlayerClient::mediaPlayerDidRemoveVideoTrack): Same
* platform/graphics/VideoTrackPrivate.h: Added, based on InbandTextTrackPrivate.h

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148785 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 22b04633
......@@ -2686,14 +2686,20 @@ endif ()
if (ENABLE_VIDEO_TRACK)
list(APPEND WebCore_IDL_FILES
html/track/AudioTrack.idl
html/track/AudioTrackList.idl
html/track/TextTrack.idl
html/track/TextTrackCue.idl
html/track/TextTrackCueList.idl
html/track/TextTrackList.idl
html/track/TrackEvent.idl
html/track/VideoTrack.idl
html/track/VideoTrackList.idl
)
list(APPEND WebCore_SOURCES
html/track/AudioTrack.cpp
html/track/AudioTrackList.cpp
html/track/InbandTextTrack.cpp
html/track/LoadableTextTrack.cpp
html/track/TextTrack.cpp
......@@ -2707,6 +2713,8 @@ if (ENABLE_VIDEO_TRACK)
html/track/WebVTTElement.cpp
html/track/WebVTTParser.cpp
html/track/WebVTTTokenizer.cpp
html/track/VideoTrack.cpp
html/track/VideoTrackList.cpp
loader/cache/CachedTextTrack.cpp
......
2013-04-19 Brendan Long <b.long@cablelabs.com>
Add interfaces and stubs for audio and video tracks
https://bugs.webkit.org/show_bug.cgi?id=113965
Reviewed by Jer Noble.
No new tests because there's no implementations, so there's nothing
interesting to test.
* CMakeLists.txt: Add AudioTrack, VideoTrack, AudioTrackList and VideoTrackList.
* DerivedSources.cpp: Same.
* DerivedSources.make: Same.
* DerivedSources.pri: Same.
* GNUmakefile.list.am: Same.
* Target.pri: Same.
* UseJSC.cmake: Same.
* WebCore.vcproj/WebCore.vcproj: Same.
* WebCore.xcodeproj/project.pbxproj: Same.
* bindings/gobject/GNUmakefile.am: Same.
* bindings/js/JSAudioTrackCustom.cpp: Added, based on JSTestTrackCustom
* bindings/js/JSAudioTrackListCustom.cpp: Same.
* bindings/js/JSBindingsAllInOne.cpp: Add AudioTrack, VideoTrack, AudioTrackList and VideoTrackList.
* bindings/js/JSVideoTrackCustom.cpp: Added, based on JSTestTrackCustom
* bindings/js/JSVideoTrackListCustom.cpp: Same.
* dom/EventTarget.h: Make AudioTrackList and VideoTrackList event targets.
* dom/EventTargetFactory.in: Same.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Add m_audioTracks and m_videoTracks
(WebCore::HTMLMediaElement::~HTMLMediaElement): Clear clients for audio and video tracks
(WebCore::HTMLMediaElement::audioTrackEnabledChanged): Added.
(WebCore::HTMLMediaElement::videoTrackSelectedChanged): Added.
(WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack): Added, based on mediaPlayerDidAddTextTrack
(WebCore::HTMLMediaElement::mediaPlayerDidAddVideoTrack): Same.
(WebCore::HTMLMediaElement::mediaPlayerDidRemoveAudioTrack): Added, based on mediaPlayerDidRemoveTextTrack
(WebCore::HTMLMediaElement::mediaPlayerDidRemoveVideoTrack): Same.
(WebCore::HTMLMediaElement::addAudioTrack): Added, based on addTextTrack
(WebCore::HTMLMediaElement::addVideoTrack): Same.
(WebCore::HTMLMediaElement::removeAudioTrack): Added, based on removeTextTrack
(WebCore::HTMLMediaElement::removeVideoTrack): Added, based on removeTextTrack
(WebCore::HTMLMediaElement::removeAllInbandTracks): Remove audio and video tracks too
(WebCore::HTMLMediaElement::audioTracks): Added, based on textTracks
(WebCore::HTMLMediaElement::videoTracks): Added, based on textTracks
(WebCore::HTMLMediaElement::reportMemoryUsage): Add audio and video tracks
* html/HTMLMediaElement.h: Add audioTracks and videoTracks and related functions
* html/HTMLMediaElement.idl: Add audioTracks and videoTracks
* html/track/AudioTrack.cpp: Added, based on TextTrack and InbandTextTrack.
* html/track/AudioTrack.h: Same.
* html/track/AudioTrack.idl: Added.
* html/track/AudioTrackList.cpp: Added, based on TextTrackList
* html/track/AudioTrackList.h: Same.
* html/track/AudioTrackList.idl: Added.
* html/track/TextTrackList.h: Add missing OVERRIDE on interfaceName()
* html/track/VideoTrack.cpp: Added, based on TextTrack and InbandTextTrack.
* html/track/VideoTrack.h: Same.
* html/track/VideoTrack.idl: Added.
* html/track/VideoTrackList.cpp: Added, based on TextTrackList
* html/track/VideoTrackList.h: Same.
* html/track/VideoTrackList.idl: Added.
* platform/graphics/AudioTrackPrivate.h: Added, based on InbandTextTrackPrivate.h
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::addAudioTrack): Added, based on addTextTrack
(WebCore::MediaPlayer::removeAudioTrack): Added, based on removeTextTrack
(WebCore::MediaPlayer::addVideoTrack): Added, based on addTextTrack
(WebCore::MediaPlayer::removeVideoTrack): Added, based on removeTextTrack
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerDidAddAudioTrack): Added, based on mediaPlayerDidAddTextTrack
(WebCore::MediaPlayerClient::mediaPlayerDidAddVideoTrack): Same
(WebCore::MediaPlayerClient::mediaPlayerDidRemoveAudioTrack): Added, based on mediaPlayerDidRemoveTextTrack
(WebCore::MediaPlayerClient::mediaPlayerDidRemoveVideoTrack): Same
* platform/graphics/VideoTrackPrivate.h: Added, based on InbandTextTrackPrivate.h
2013-04-19 Bear Travis <betravis@adobe.com>
 
[CSS Exclusions] Implement empty segments for multiple-segment shape-insides
......@@ -472,12 +472,16 @@
#include "JSTextEvent.cpp"
#include "JSTextMetrics.cpp"
#if ENABLE(VIDEO_TRACK)
#include "JSAudioTrack.cpp"
#include "JSAudioTrackList.cpp"
#include "JSHTMLTrackElement.cpp"
#include "JSTextTrack.cpp"
#include "JSTextTrackCue.cpp"
#include "JSTextTrackCueList.cpp"
#include "JSTextTrackList.cpp"
#include "JSTrackEvent.cpp"
#include "JSVideoTrack.cpp"
#include "JSVideoTrackList.cpp"
#endif
#include "JSTimeRanges.cpp"
#include "JSTouch.cpp"
......
......@@ -431,11 +431,15 @@ BINDING_IDLS = \
$(WebCore)/html/canvas/WebGLVertexArrayObjectOES.idl \
$(WebCore)/html/shadow/HTMLContentElement.idl \
$(WebCore)/html/shadow/HTMLShadowElement.idl \
$(WebCore)/html/track/AudioTrack.idl \
$(WebCore)/html/track/AudioTrackList.idl \
$(WebCore)/html/track/TextTrack.idl \
$(WebCore)/html/track/TextTrackCue.idl \
$(WebCore)/html/track/TextTrackCueList.idl \
$(WebCore)/html/track/TextTrackList.idl \
$(WebCore)/html/track/TrackEvent.idl \
$(WebCore)/html/track/VideoTrack.idl \
$(WebCore)/html/track/VideoTrackList.idl \
$(WebCore)/inspector/InjectedScriptHost.idl \
$(WebCore)/inspector/InspectorFrontendHost.idl \
$(WebCore)/inspector/ScriptProfile.idl \
......
......@@ -652,11 +652,15 @@ enable?(GAMEPAD) {
enable?(VIDEO_TRACK) {
IDL_BINDINGS += \
$$PWD/html/track/AudioTrack.idl \
$$PWD/html/track/AudioTrackList.idl \
$$PWD/html/track/TextTrack.idl \
$$PWD/html/track/TextTrackCue.idl \
$$PWD/html/track/TextTrackCueList.idl \
$$PWD/html/track/TextTrackList.idl \
$$PWD/html/track/TrackEvent.idl \
$$PWD/html/track/VideoTrack.idl \
$$PWD/html/track/VideoTrackList.idl
}
enable?(MEDIA_SOURCE) {
......
......@@ -65,6 +65,10 @@ webcore_built_sources += \
DerivedSources/WebCore/JSAudioProcessingEvent.h \
DerivedSources/WebCore/JSAudioSourceNode.cpp \
DerivedSources/WebCore/JSAudioSourceNode.h \
DerivedSources/WebCore/JSAudioTrack.cpp \
DerivedSources/WebCore/JSAudioTrack.h \
DerivedSources/WebCore/JSAudioTrackList.cpp \
DerivedSources/WebCore/JSAudioTrackList.h \
DerivedSources/WebCore/JSBarInfo.cpp \
DerivedSources/WebCore/JSBarInfo.h \
DerivedSources/WebCore/JSBeforeLoadEvent.cpp \
......@@ -777,6 +781,10 @@ webcore_built_sources += \
DerivedSources/WebCore/JSValidityState.h \
DerivedSources/WebCore/JSVoidCallback.cpp \
DerivedSources/WebCore/JSVoidCallback.h \
DerivedSources/WebCore/JSVideoTrack.cpp \
DerivedSources/WebCore/JSVideoTrack.h \
DerivedSources/WebCore/JSVideoTrackList.cpp \
DerivedSources/WebCore/JSVideoTrackList.h \
DerivedSources/WebCore/JSWaveShaperNode.cpp \
DerivedSources/WebCore/JSWaveShaperNode.h \
DerivedSources/WebCore/JSWaveTable.cpp \
......@@ -1586,11 +1594,15 @@ dom_binding_idls += \
$(WebCore)/html/canvas/WebGLVertexArrayObjectOES.idl \
$(WebCore)/html/shadow/HTMLContentElement.idl \
$(WebCore)/html/shadow/HTMLShadowElement.idl \
$(WebCore)/html/track/AudioTrack.idl \
$(WebCore)/html/track/AudioTrackList.idl \
$(WebCore)/html/track/TextTrack.idl \
$(WebCore)/html/track/TextTrackCue.idl \
$(WebCore)/html/track/TextTrackCueList.idl \
$(WebCore)/html/track/TextTrackList.idl \
$(WebCore)/html/track/TrackEvent.idl \
$(WebCore)/html/track/VideoTrack.idl \
$(WebCore)/html/track/VideoTrackList.idl \
$(WebCore)/inspector/InjectedScriptHost.idl \
$(WebCore)/inspector/InspectorFrontendHost.idl \
$(WebCore)/inspector/JavaScriptCallFrame.idl \
......@@ -2321,6 +2333,8 @@ webcore_sources += \
Source/WebCore/bindings/js/JSAttrCustom.cpp \
Source/WebCore/bindings/js/JSAudioBufferSourceNodeCustom.cpp \
Source/WebCore/bindings/js/JSAudioContextCustom.cpp \
Source/WebCore/bindings/js/JSAudioTrackCustom.cpp \
Source/WebCore/bindings/js/JSAudioTrackListCustom.cpp \
Source/WebCore/bindings/js/JSBiquadFilterNodeCustom.cpp \
Source/WebCore/bindings/js/JSBlobCustom.cpp \
Source/WebCore/bindings/js/JSCDATASectionCustom.cpp \
......@@ -2467,7 +2481,6 @@ webcore_sources += \
Source/WebCore/bindings/js/JSTextCustom.cpp \
Source/WebCore/bindings/js/JSTextTrackCueCustom.cpp \
Source/WebCore/bindings/js/JSTextTrackCustom.cpp \
Source/WebCore/bindings/js/JSTextTrackCustom.h \
Source/WebCore/bindings/js/JSTextTrackListCustom.cpp \
Source/WebCore/bindings/js/JSTouchCustom.cpp \
Source/WebCore/bindings/js/JSTouchListCustom.cpp \
......@@ -2475,6 +2488,8 @@ webcore_sources += \
Source/WebCore/bindings/js/JSTrackCustom.h \
Source/WebCore/bindings/js/JSTrackEventCustom.cpp \
Source/WebCore/bindings/js/JSTreeWalkerCustom.cpp \
Source/WebCore/bindings/js/JSVideoTrackCustom.cpp \
Source/WebCore/bindings/js/JSVideoTrackListCustom.cpp \
Source/WebCore/bindings/js/JSWebKitCSSKeyframeRuleCustom.cpp \
Source/WebCore/bindings/js/JSWebKitCSSKeyframesRuleCustom.cpp \
Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp \
......@@ -3769,6 +3784,10 @@ webcore_sources += \
Source/WebCore/html/TimeInputType.h \
Source/WebCore/html/TimeRanges.cpp \
Source/WebCore/html/TimeRanges.h \
Source/WebCore/html/track/AudioTrack.cpp \
Source/WebCore/html/track/AudioTrack.h \
Source/WebCore/html/track/AudioTrackList.cpp \
Source/WebCore/html/track/AudioTrackList.h \
Source/WebCore/html/track/InbandTextTrack.cpp \
Source/WebCore/html/track/InbandTextTrack.h \
Source/WebCore/html/track/LoadableTextTrack.cpp \
......@@ -3789,6 +3808,10 @@ webcore_sources += \
Source/WebCore/html/track/TrackEvent.h \
Source/WebCore/html/track/TrackListBase.cpp \
Source/WebCore/html/track/TrackListBase.h \
Source/WebCore/html/track/VideoTrack.cpp \
Source/WebCore/html/track/VideoTrack.h \
Source/WebCore/html/track/VideoTrackList.cpp \
Source/WebCore/html/track/VideoTrackList.h \
Source/WebCore/html/track/WebVTTElement.cpp \
Source/WebCore/html/track/WebVTTElement.h \
Source/WebCore/html/track/WebVTTParser.cpp \
......@@ -5499,6 +5522,7 @@ webcore_platform_sources += \
Source/WebCore/platform/InitializeLogging.h \
Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp \
Source/WebCore/platform/graphics/ANGLEWebKitBridge.h \
Source/WebCore/platform/graphics/AudioTrackPrivate.h \
Source/WebCore/platform/graphics/cpu/arm/GraphicsContext3DNEON.h \
Source/WebCore/platform/graphics/cpu/arm/filters/NEONHelpers.h \
Source/WebCore/platform/graphics/cpu/arm/filters/FEBlendNEON.h \
......@@ -5779,6 +5803,7 @@ webcore_platform_sources += \
Source/WebCore/platform/graphics/transforms/TranslateTransformOperation.h \
Source/WebCore/platform/graphics/TypesettingFeatures.h \
Source/WebCore/platform/graphics/UnitBezier.h \
Source/WebCore/platform/graphics/VideoTrackPrivate.h \
Source/WebCore/platform/graphics/WidthCache.h \
Source/WebCore/platform/graphics/WidthIterator.cpp \
Source/WebCore/platform/graphics/WidthIterator.h \
......
......@@ -3969,9 +3969,10 @@ enable?(JAVASCRIPT_DEBUGGER) {
enable?(VIDEO_TRACK) {
HEADERS += \
bindings/js/JSTextTrackCustom.h \
bindings/js/JSTrackCustom.h \
html/HTMLTrackElement.h \
html/track/AudioTrack.h \
html/track/AudioTrackList.h \
html/track/InbandTextTrack.h \
html/track/LoadableTextTrack.h \
html/track/TextTrack.h \
......@@ -3982,20 +3983,30 @@ enable?(VIDEO_TRACK) {
html/track/TrackBase.h \
html/track/TrackEvent.h \
html/track/TrackListBase.h \
html/track/VideoTrack.h \
html/track/VideoTrackList.h \
html/track/WebVTTParser.h \
html/track/WebVTTToken.h \
html/track/WebVTTTokenizer.h \
loader/TextTrackLoader.h \
platform/graphics/AudioTrackPrivate.h \
platform/graphics/InbandTextTrackPrivate.h \
platform/graphics/InbandTextTrackPrivateClient.h
platform/graphics/VideoTrackPrivate.h \
SOURCES += \
bindings/js/JSAudioTrackCustom.cpp \
bindings/js/JSAudioTrackListCustom.cpp \
bindings/js/JSTextTrackCueCustom.cpp \
bindings/js/JSTextTrackCustom.cpp \
bindings/js/JSTrackCustom.cpp \
bindings/js/JSTrackEventCustom.cpp \
bindings/js/JSTextTrackListCustom.cpp \
bindings/js/JSVideoTrackCustom.cpp \
bindings/js/JSVideoTrackListCustom.cpp \
html/HTMLTrackElement.cpp \
html/track/AudioTrack.cpp \
html/track/AudioTrackList.cpp \
html/track/InbandTextTrack.cpp \
html/track/LoadableTextTrack.cpp \
html/track/TextTrack.cpp \
......@@ -4006,6 +4017,8 @@ enable?(VIDEO_TRACK) {
html/track/TrackBase.cpp \
html/track/TrackEvent.cpp \
html/track/TrackListBase.cpp \
html/track/VideoTrack.cpp \
html/track/VideoTrackList.cpp \
html/track/WebVTTElement.cpp \
html/track/WebVTTParser.cpp \
html/track/WebVTTTokenizer.cpp \
......
......@@ -219,11 +219,15 @@ endif ()
if (ENABLE_VIDEO_TRACK)
list(APPEND WebCore_SOURCES
bindings/js/JSAudioTrackCustom.cpp
bindings/js/JSAudioTrackListCustom.cpp
bindings/js/JSTextTrackCueCustom.cpp
bindings/js/JSTextTrackCustom.cpp
bindings/js/JSTextTrackListCustom.cpp
bindings/js/JSTrackCustom.cpp
bindings/js/JSTrackEventCustom.cpp
bindings/js/JSVideoTrackCustom.cpp
bindings/js/JSVideoTrackListCustom.cpp
)
endif ()
......
......@@ -29901,6 +29901,10 @@
<Filter
Name="graphics"
>
<File
RelativePath="..\platform\graphics\AudioTrackPrivate.h"
>
</File>
<File
RelativePath="..\platform\graphics\BitmapImage.cpp"
>
......@@ -30377,6 +30381,10 @@
RelativePath="..\platform\graphics\UnitBezier.h"
>
</File>
<File
RelativePath="..\platform\graphics\VideoTrackPrivate.h"
>
</File>
<File
RelativePath="..\platform\graphics\WindRule.h"
>
......@@ -65753,6 +65761,22 @@
<Filter
Name="track"
>
<File
RelativePath="..\html\track\AudioTrack.cpp"
>
</File>
<File
RelativePath="..\html\track\AudioTrack.h"
>
</File>
<File
RelativePath="..\html\track\AudioTrackList.cpp"
>
</File>
<File
RelativePath="..\html\track\AudioTrackList.h"
>
</File>
<File
RelativePath="..\html\track\InbandTextTrack.cpp"
>
......@@ -65833,6 +65857,22 @@
RelativePath="..\html\track\TrackListBase.h"
>
</File>
<File
RelativePath="..\html\track\VideoTrack.cpp"
>
</File>
<File
RelativePath="..\html\track\VideoTrack.h"
>
</File>
<File
RelativePath="..\html\track\VideoTrackList.cpp"
>
</File>
<File
RelativePath="..\html\track\VideoTrackList.h"
>
</File>
<File
RelativePath="..\html\track\WebVTTElement.cpp"
>
......@@ -433,18 +433,24 @@ webkitgtk_gdom_built_h_api += \
if ENABLE_VIDEO
webkitgtk_gdom_built_h_api += \
$(top_builddir)/DerivedSources/webkitdom/WebKitDOMAudioTrack.h \
$(top_builddir)/DerivedSources/webkitdom/WebKitDOMAudioTrackList.h \
$(top_builddir)/DerivedSources/webkitdom/WebKitDOMHTMLAudioElement.h \
$(top_builddir)/DerivedSources/webkitdom/WebKitDOMHTMLVideoElement.h \
$(top_builddir)/DerivedSources/webkitdom/WebKitDOMTextTrack.h \
$(top_builddir)/DerivedSources/webkitdom/WebKitDOMTextTrackList.h \
$(top_builddir)/DerivedSources/webkitdom/WebKitDOMTextTrackCue.h \
$(top_builddir)/DerivedSources/webkitdom/WebKitDOMTextTrackCueList.h \
$(top_builddir)/DerivedSources/webkitdom/WebKitDOMTrackEvent.h
$(top_builddir)/DerivedSources/webkitdom/WebKitDOMTrackEvent.h \
$(top_builddir)/DerivedSources/webkitdom/WebKitDOMVideoTrack.h \
$(top_builddir)/DerivedSources/webkitdom/WebKitDOMVideoTrackList.h
webkitgtk_gdom_built_sources += \
DerivedSources/webkitdom/WebKitDOMHTMLAudioElement.cpp \
DerivedSources/webkitdom/WebKitDOMHTMLAudioElementPrivate.h \
DerivedSources/webkitdom/WebKitDOMHTMLVideoElement.cpp \
DerivedSources/webkitdom/WebKitDOMHTMLVideoElementPrivate.h \
DerivedSources/webkitdom/WebKitDOMAudioTrack.cpp \
DerivedSources/webkitdom/WebKitDOMAudioTrackList.cpp \
DerivedSources/webkitdom/WebKitDOMTextTrack.cpp \
DerivedSources/webkitdom/WebKitDOMTextTrackPrivate.h \
DerivedSources/webkitdom/WebKitDOMTextTrackList.cpp \
......@@ -453,6 +459,8 @@ webkitgtk_gdom_built_sources += \
DerivedSources/webkitdom/WebKitDOMTextTrackCuePrivate.h \
DerivedSources/webkitdom/WebKitDOMTextTrackCueList.cpp \
DerivedSources/webkitdom/WebKitDOMTextTrackCueListPrivate.h \
DerivedSources/webkitdom/WebKitDOMVideoTrack.cpp \
DerivedSources/webkitdom/WebKitDOMVideoTrackList.cpp \
DerivedSources/webkitdom/WebKitDOMTrackEvent.cpp \
DerivedSources/webkitdom/WebKitDOMTrackEventPrivate.h
endif
......
/*
* 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 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.
*/
#include "config.h"
#if ENABLE(VIDEO_TRACK)
#include "JSAudioTrack.h"
#include "JSTrackCustom.h"
using namespace JSC;
namespace WebCore {
void JSAudioTrack::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
JSAudioTrack* jsAudioTrack = jsCast<JSAudioTrack*>(cell);
ASSERT_GC_OBJECT_INHERITS(jsAudioTrack, &s_info);
COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
ASSERT(jsAudioTrack->structure()->typeInfo().overridesVisitChildren());
Base::visitChildren(jsAudioTrack, visitor);
AudioTrack* audioTrack = static_cast<AudioTrack*>(jsAudioTrack->impl());
visitor.addOpaqueRoot(root(audioTrack));
}
} // namespace WebCore
#endif
/*
* Copyright (C) 2011 Apple Inc. All rights reserved.
* 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
......@@ -23,38 +23,31 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JSTextTrackCustom_h
#define JSTextTrackCustom_h
#include "config.h"
#if ENABLE(VIDEO_TRACK)
#include "JSTextTrack.h"
#include "JSAudioTrackList.h"
#include "HTMLMediaElement.h"
#include "HTMLTrackElement.h"
#include "Element.h"
#include "JSNodeCustom.h"
#include "LoadableTextTrack.h"
using namespace JSC;
namespace WebCore {
inline void* root(TextTrack* track)
void JSAudioTrackList::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
// If this track corresponds to a <track> element, return that element's root.
if (track->trackType() == TextTrack::TrackElement) {
if (HTMLTrackElement* trackElement = static_cast<LoadableTextTrack*>(track)->trackElement())
return root(trackElement);
}
// No, return the media element's root if it has one.
if (track->mediaElement())
return root(track->mediaElement());
// No track element and no media element, return the text track.
return track;
JSAudioTrackList* jsAudioTrackList = jsCast<JSAudioTrackList*>(cell);
ASSERT_GC_OBJECT_INHERITS(jsAudioTrackList, &s_info);
COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
ASSERT(jsAudioTrackList->structure()->typeInfo().overridesVisitChildren());
Base::visitChildren(jsAudioTrackList, visitor);
AudioTrackList* audioTrackList = static_cast<AudioTrackList*>(jsAudioTrackList->impl());
visitor.addOpaqueRoot(root(audioTrackList->element()));
audioTrackList->visitJSEventListeners(visitor);
}
}
} // namespace WebCore
#endif
#endif
......@@ -34,6 +34,8 @@
#include "GCController.cpp"
#include "JSArrayBufferCustom.cpp"
#include "JSAttrCustom.cpp"
#include "JSAudioTrackCustom.cpp"
#include "JSAudioTrackListCustom.cpp"
#include "JSBlobCustom.cpp"
#include "JSCDATASectionCustom.cpp"
#include "JSCSSFontFaceRuleCustom.cpp"
......@@ -147,6 +149,8 @@
#include "JSTrackCustom.cpp"
#include "JSTrackEventCustom.cpp"
#include "JSTreeWalkerCustom.cpp"
#include "JSVideoTrackCustom.cpp"
#include "JSVideoTrackListCustom.cpp"
#include "JSWebKitCSSKeyframeRuleCustom.cpp"
#include "JSWebKitCSSKeyframesRuleCustom.cpp"
#include "JSWebKitPointCustom.cpp"
......
......@@ -28,7 +28,8 @@
#if ENABLE(VIDEO_TRACK)
#include "JSTextTrackCue.h"
#include "JSTextTrackCustom.h"
#include "JSTrackCustom.h"
#include "TextTrack.h"
using namespace JSC;
......
......@@ -26,32 +26,14 @@
#include "config.h"
#if ENABLE(VIDEO_TRACK)
#include "JSTextTrackCustom.h"
#include "JSTextTrack.h"
#include "JSTextTrackCueList.h"
#include "JSTrackCustom.h"
using namespace JSC;
namespace WebCore {
bool JSTextTrackOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
JSTextTrack* jsTextTrack = jsCast<JSTextTrack*>(handle.get().asCell());
TextTrack* textTrack = static_cast<TextTrack*>(jsTextTrack->impl());
// If the cue is firing event listeners, its wrapper is reachable because
// the wrapper is responsible for marking those event listeners.
if (textTrack->isFiringEventListeners())
return true;
// If the cue has no event listeners and has no custom properties, it is not reachable.
if (!textTrack->hasEventListeners() && !jsTextTrack->hasCustomProperties())
return false;
return visitor.containsOpaqueRoot(root(textTrack));
}
void JSTextTrack::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
JSTextTrack* jsTextTrack = jsCast<JSTextTrack*>(cell);
......
......@@ -28,31 +28,13 @@
#if ENABLE(VIDEO_TRACK)
#include "JSTextTrackList.h"
#include "HTMLMediaElement.h"
#include "Element.h"
#include "JSNodeCustom.h"
using namespace JSC;
namespace WebCore {
bool JSTextTrackListOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
JSTextTrackList* jsTextTrackList = jsCast<JSTextTrackList*>(handle.get().asCell());
TextTrackList* textTrackList = static_cast<TextTrackList*>(jsTextTrackList->impl());