Commit 76787a87 authored by antti's avatar antti

Rubber stamped by Adele.

        Initial media (<video> and <audio>) support from feature branch and 
        QTKit based platform implementation.
        
        This will need to be updated to match current draft specification.

        * Configurations/WebCore.xcconfig:
        * DerivedSources.make:
        * WebCore.base.exp:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSEventCustom.cpp:
        (WebCore::toJS):
        * bindings/js/JSHTMLAudioElementConstructor.cpp: Added.
        (WebCore::JSHTMLAudioElementConstructor::JSHTMLAudioElementConstructor):
        (WebCore::JSHTMLAudioElementConstructor::implementsConstruct):
        (WebCore::JSHTMLAudioElementConstructor::construct):
        * bindings/js/JSHTMLAudioElementConstructor.h: Added.
        * bindings/js/JSHTMLElementWrapperFactory.cpp:
        (WebCore::createJSHTMLWrapper):
        * bindings/js/kjs_window.cpp:
        (KJS::Window::getValueProperty):
        * bindings/js/kjs_window.h:
        (KJS::Window::):
        * bindings/scripts/CodeGeneratorJS.pm:
        * dom/Document.cpp:
        (WebCore::Document::createEvent):
        (WebCore::Document::willSaveToCache):
        (WebCore::Document::didRestoreFromCache):
        (WebCore::Document::registerForCacheCallbacks):
        (WebCore::Document::unregisterForCacheCallbacks):
        * dom/Document.h:
        * dom/Element.cpp:
        (WebCore::Element::setBooleanAttribute):
        * dom/Element.h:
        (WebCore::Element::willSaveToCache):
        * dom/Event.cpp:
        (WebCore::Event::isProgressEvent):
        * dom/Event.h:
        * dom/EventNames.h:
        * dom/EventTargetNode.cpp:
        (WebCore::EventTargetNode::dispatchProgressEvent):
        * dom/EventTargetNode.h:
        * dom/ProgressEvent.cpp: Added.
        (WebCore::ProgressEvent::ProgressEvent):
        (WebCore::ProgressEvent::initProgressEvent):
        (WebCore::ProgressEvent::initProgressEventNS):
        * dom/ProgressEvent.h: Added.
        (WebCore::ProgressEvent::lengthComputable):
        (WebCore::ProgressEvent::loaded):
        (WebCore::ProgressEvent::total):
        (WebCore::ProgressEvent::isProgressEvent):
        * dom/ProgressEvent.idl: Added.
        * history/CachedPage.cpp:
        (WebCore::CachedPage::CachedPage):
        * html/HTMLAttributeNames.in:
        * html/HTMLAudioElement.cpp: Added.
        (WebCore::HTMLAudioElement::HTMLAudioElement):
        * html/HTMLAudioElement.h: Added.
        (WebCore::HTMLAudioElement::tagPriority):
        * html/HTMLAudioElement.idl: Added.
        * html/HTMLElement.cpp:
        (WebCore::inlineTagList):
        * html/HTMLElementFactory.cpp:
        (WebCore::audioConstructor):
        (WebCore::videoConstructor):
        (WebCore::sourceConstructor):
        (WebCore::createFunctionMap):
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::~HTMLInputElement):
        (WebCore::HTMLInputElement::setInputType):
        (WebCore::HTMLInputElement::willMoveToNewOwnerDocument):
        (WebCore::HTMLInputElement::didMoveToNewOwnerDocument):
        * html/HTMLMediaElement.cpp: Added.
        (WebCore::HTMLMediaElement::HTMLMediaElement):
        (WebCore::HTMLMediaElement::~HTMLMediaElement):
        (WebCore::HTMLMediaElement::checkDTD):
        (WebCore::HTMLMediaElement::rendererIsNeeded):
        (WebCore::HTMLMediaElement::createRenderer):
        (WebCore::HTMLMediaElement::insertedIntoDocument):
        (WebCore::HTMLMediaElement::removedFromDocument):
        (WebCore::HTMLMediaElement::scheduleLoad):
        (WebCore::HTMLMediaElement::initAndDispatchProgressEvent):
        (WebCore::HTMLMediaElement::dispatchEventAsync):
        (WebCore::HTMLMediaElement::loadTimerFired):
        (WebCore::HTMLMediaElement::asyncEventTimerFired):
        (WebCore::serializeTimeOffset):
        (WebCore::parseTimeOffset):
        (WebCore::HTMLMediaElement::getTimeOffsetAttribute):
        (WebCore::HTMLMediaElement::setTimeOffsetAttribute):
        (WebCore::HTMLMediaElement::error):
        (WebCore::HTMLMediaElement::src):
        (WebCore::HTMLMediaElement::HTMLMediaElement::setSrc):
        (WebCore::HTMLMediaElement::currentSrc):
        (WebCore::HTMLMediaElement::networkState):
        (WebCore::HTMLMediaElement::bufferingRate):
        (WebCore::HTMLMediaElement::load):
        (WebCore::HTMLMediaElement::movieNetworkStateChanged):
        (WebCore::HTMLMediaElement::movieReadyStateChanged):
        (WebCore::HTMLMediaElement::setReadyState):
        (WebCore::HTMLMediaElement::progressEventTimerFired):
        (WebCore::HTMLMediaElement::seek):
        (WebCore::HTMLMediaElement::readyState):
        (WebCore::HTMLMediaElement::seeking):
        (WebCore::HTMLMediaElement::currentTime):
        (WebCore::HTMLMediaElement::setCurrentTime):
        (WebCore::HTMLMediaElement::duration):
        (WebCore::HTMLMediaElement::paused):
        (WebCore::HTMLMediaElement::defaultPlaybackRate):
        (WebCore::HTMLMediaElement::setDefaultPlaybackRate):
        (WebCore::HTMLMediaElement::playbackRate):
        (WebCore::HTMLMediaElement::setPlaybackRate):
        (WebCore::HTMLMediaElement::ended):
        (WebCore::HTMLMediaElement::autoplay):
        (WebCore::HTMLMediaElement::setAutoplay):
        (WebCore::HTMLMediaElement::play):
        (WebCore::HTMLMediaElement::pause):
        (WebCore::HTMLMediaElement::loopCount):
        (WebCore::HTMLMediaElement::setLoopCount):
        (WebCore::HTMLMediaElement::start):
        (WebCore::HTMLMediaElement::setStart):
        (WebCore::HTMLMediaElement::end):
        (WebCore::HTMLMediaElement::setEnd):
        (WebCore::HTMLMediaElement::loopStart):
        (WebCore::HTMLMediaElement::setLoopStart):
        (WebCore::HTMLMediaElement::loopEnd):
        (WebCore::HTMLMediaElement::setLoopEnd):
        (WebCore::HTMLMediaElement::currentLoop):
        (WebCore::HTMLMediaElement::setCurrentLoop):
        (WebCore::HTMLMediaElement::controls):
        (WebCore::HTMLMediaElement::setControls):
        (WebCore::HTMLMediaElement::volume):
        (WebCore::HTMLMediaElement::setVolume):
        (WebCore::HTMLMediaElement::muted):
        (WebCore::HTMLMediaElement::setMuted):
        (WebCore::HTMLMediaElement::pickMedia):
        (WebCore::HTMLMediaElement::checkIfSeekNeeded):
        (WebCore::HTMLMediaElement::movieVolumeChanged):
        (WebCore::HTMLMediaElement::movieDidEnd):
        (WebCore::HTMLMediaElement::movieCuePointReached):
        (WebCore::HTMLMediaElement::addCuePoint):
        (WebCore::HTMLMediaElement::removeCuePoint):
        (WebCore::HTMLMediaElement::buffered):
        (WebCore::HTMLMediaElement::played):
        (WebCore::HTMLMediaElement::seekable):
        (WebCore::HTMLMediaElement::effectiveStart):
        (WebCore::HTMLMediaElement::effectiveEnd):
        (WebCore::HTMLMediaElement::effectiveLoopStart):
        (WebCore::HTMLMediaElement::effectiveLoopEnd):
        (WebCore::HTMLMediaElement::activelyPlaying):
        (WebCore::HTMLMediaElement::endedPlayback):
        (WebCore::HTMLMediaElement::willSaveToCache):
        (WebCore::HTMLMediaElement::didRestoreFromCache):
        * html/HTMLMediaElement.h: Added.
        (WebCore::HTMLMediaElement::movie):
        (WebCore::HTMLMediaElement::isVideo):
        (WebCore::HTMLMediaElement::):
        (WebCore::HTMLMediaElement::CallbackEntry::CallbackEntry):
        * html/HTMLMediaElement.idl: Added.
        * html/HTMLSourceElement.cpp: Added.
        (WebCore::HTMLSourceElement::HTMLSourceElement):
        (WebCore::HTMLSourceElement::~HTMLSourceElement):
        (WebCore::HTMLSourceElement::insertedIntoDocument):
        (WebCore::HTMLSourceElement::src):
        (WebCore::HTMLSourceElement::setSrc):
        (WebCore::HTMLSourceElement::media):
        (WebCore::HTMLSourceElement::setMedia):
        (WebCore::HTMLSourceElement::type):
        (WebCore::HTMLSourceElement::setType):
        * html/HTMLSourceElement.h: Added.
        (WebCore::HTMLSourceElement::endTagRequirement):
        (WebCore::HTMLSourceElement::tagPriority):
        * html/HTMLSourceElement.idl: Added.
        * html/HTMLTagNames.in:
        * html/HTMLVideoElement.cpp: Added.
        (WebCore::HTMLVideoElement::HTMLVideoElement):
        (WebCore::HTMLVideoElement::videoWidth):
        (WebCore::HTMLVideoElement::videoHeight):
        * html/HTMLVideoElement.h: Added.
        (WebCore::HTMLVideoElement::tagPriority):
        (WebCore::HTMLVideoElement::isVideo):
        * html/HTMLVideoElement.idl: Added.
        * html/MediaError.h: Added.
        (WebCore::MediaError::):
        (WebCore::MediaError::MediaError):
        (WebCore::MediaError::code):
        * html/MediaError.idl: Added.
        * html/TimeRanges.cpp: Added.
        (TimeRanges::TimeRanges):
        (TimeRanges::start):
        (TimeRanges::end):
        (TimeRanges::add):
        (TimeRanges::contain):
        * html/TimeRanges.h: Added.
        (WebCore::TimeRanges::TimeRanges):
        (WebCore::TimeRanges::length):
        (WebCore::TimeRanges::Range::Range):
        * html/TimeRanges.idl: Added.
        * page/DOMWindow.idl:
        * platform/MIMETypeRegistry.cpp:
        (WebCore::initialiseSupportedMovieMIMETypes):
        (WebCore::initialiseMIMETypeRegistry):
        (WebCore::MIMETypeRegistry::isSupportedMovieMIMEType):
        (WebCore::MIMETypeRegistry::getSupportedMovieMIMETypes):
        * platform/MIMETypeRegistry.h:
        * platform/graphics/Movie.cpp: Added.
        (WebCore::Movie::Movie):
        (WebCore::Movie::~Movie):
        (WebCore::Movie::load):
        (WebCore::Movie::cancelLoad):
        (WebCore::Movie::play):
        (WebCore::Movie::pause):
        (WebCore::Movie::duration):
        (WebCore::Movie::currentTime):
        (WebCore::Movie::seek):
        (WebCore::Movie::paused):
        (WebCore::Movie::seeking):
        (WebCore::Movie::naturalSize):
        (WebCore::Movie::hasVideo):
        (WebCore::Movie::networkState):
        (WebCore::Movie::readyState):
        (WebCore::Movie::volume):
        (WebCore::Movie::setVolume):
        (WebCore::Movie::rate):
        (WebCore::Movie::setRate):
        (WebCore::Movie::muted):
        (WebCore::Movie::setMuted):
        (WebCore::Movie::dataRate):
        (WebCore::Movie::setEndTime):
        (WebCore::Movie::addCuePoint):
        (WebCore::Movie::removeCuePoint):
        (WebCore::Movie::clearCuePoints):
        (WebCore::Movie::maxTimeBuffered):
        (WebCore::Movie::maxTimeSeekable):
        (WebCore::Movie::bytesLoaded):
        (WebCore::Movie::totalBytesKnown):
        (WebCore::Movie::totalBytes):
        (WebCore::Movie::setRect):
        (WebCore::Movie::visible):
        (WebCore::Movie::setVisible):
        (WebCore::Movie::paint):
        (WebCore::Movie::getSupportedTypes):
        (WebCore::Movie::networkStateChanged):
        (WebCore::Movie::readyStateChanged):
        (WebCore::Movie::volumeChanged):
        (WebCore::Movie::didEnd):
        (WebCore::Movie::cuePointReached):
        * platform/graphics/Movie.h: Added.
        (WebCore::MovieClient::~MovieClient):
        (WebCore::MovieClient::movieNetworkStateChanged):
        (WebCore::MovieClient::movieReadyStateChanged):
        (WebCore::MovieClient::movieVolumeChanged):
        (WebCore::MovieClient::movieDidEnd):
        (WebCore::MovieClient::movieCuePointReached):
        (WebCore::Movie::parentWidget):
        (WebCore::Movie::setParentWidget):
        (WebCore::Movie::rect):
        (WebCore::Movie::):
        * platform/graphics/mac/MoviePrivateQTKit.h: Added.
        * platform/graphics/mac/MoviePrivateQTKit.mm: Added.
        (WebCore::MoviePrivate::MoviePrivate):
        (WebCore::MoviePrivate::~MoviePrivate):
        (WebCore::MoviePrivate::createQTMovie):
        (WebCore::MoviePrivate::createQTMovieView):
        (WebCore::MoviePrivate::createQTTime):
        (WebCore::MoviePrivate::load):
        (WebCore::MoviePrivate::play):
        (WebCore::MoviePrivate::pause):
        (WebCore::MoviePrivate::duration):
        (WebCore::MoviePrivate::currentTime):
        (WebCore::MoviePrivate::seek):
        (WebCore::MoviePrivate::setEndTime):
        (WebCore::MoviePrivate::addCuePoint):
        (WebCore::MoviePrivate::removeCuePoint):
        (WebCore::MoviePrivate::clearCuePoints):
        (WebCore::MoviePrivate::startCuePointTimerIfNeeded):
        (WebCore::MoviePrivate::cancelSeek):
        (WebCore::MoviePrivate::seekTimerFired):
        (WebCore::MoviePrivate::cuePointTimerFired):
        (WebCore::MoviePrivate::paused):
        (WebCore::MoviePrivate::seeking):
        (WebCore::MoviePrivate::naturalSize):
        (WebCore::MoviePrivate::hasVideo):
        (WebCore::MoviePrivate::setVolume):
        (WebCore::MoviePrivate::setMuted):
        (WebCore::MoviePrivate::setRate):
        (WebCore::MoviePrivate::dataRate):
        (WebCore::MoviePrivate::networkState):
        (WebCore::MoviePrivate::readyState):
        (WebCore::MoviePrivate::maxTimeBuffered):
        (WebCore::MoviePrivate::maxTimeSeekable):
        (WebCore::MoviePrivate::maxTimeLoaded):
        (WebCore::MoviePrivate::bytesLoaded):
        (WebCore::MoviePrivate::totalBytesKnown):
        (WebCore::MoviePrivate::totalBytes):
        (WebCore::MoviePrivate::cancelLoad):
        (WebCore::MoviePrivate::updateStates):
        (WebCore::MoviePrivate::loadStateChanged):
        (WebCore::MoviePrivate::rateChanged):
        (WebCore::MoviePrivate::sizeChanged):
        (WebCore::MoviePrivate::timeChanged):
        (WebCore::MoviePrivate::volumeChanged):
        (WebCore::MoviePrivate::didEnd):
        (WebCore::MoviePrivate::setRect):
        (WebCore::MoviePrivate::setVisible):
        (WebCore::MoviePrivate::paint):
        (WebCore::MoviePrivate::getSupportedTypes):
        (-[WebCoreMovieObserver loadStateChanged:]):
        (-[WebCoreMovieObserver rateChanged:]):
        (-[WebCoreMovieObserver sizeChanged:]):
        (-[WebCoreMovieObserver timeChanged:]):
        (-[WebCoreMovieObserver volumeChanged:]):
        (-[WebCoreMovieObserver didEnd:]):
        (-[WebCoreMovieObserver setCallback:WebCore::]):
        * platform/mac/WebCoreSystemInterface.h:
        * platform/mac/WebCoreSystemInterface.mm:
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::collectLayers):
        * rendering/RenderVideo.cpp: Added.
        (WebCore::RenderVideo::RenderVideo):
        (WebCore::RenderVideo::~RenderVideo):
        (WebCore::RenderVideo::movie):
        (WebCore::RenderVideo::videoSizeChanged):
        (WebCore::RenderVideo::paint):
        (WebCore::RenderVideo::layout):
        (WebCore::RenderVideo::updateFromElement):
        (WebCore::RenderVideo::updateMovie):
        (WebCore::RenderVideo::isWidthSpecified):
        (WebCore::RenderVideo::isHeightSpecified):
        (WebCore::RenderVideo::calcReplacedWidth):
        (WebCore::RenderVideo::calcReplacedHeight):
        (WebCore::RenderVideo::calcAspectRatioWidth):
        (WebCore::RenderVideo::calcAspectRatioHeight):
        (WebCore::RenderVideo::calcPrefWidths):
        * rendering/RenderVideo.h: Added.
        (WebCore::RenderVideo::renderName):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27277 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b2ec73cf
2007-10-29 Antti Koivisto <antti@apple.com>
Rubber stamped by Adele.
Initial media (<video> and <audio>) support from feature branch and
QTKit based platform implementation.
This will need to be updated to match current draft specification.
* Configurations/WebCore.xcconfig:
* DerivedSources.make:
* WebCore.base.exp:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSEventCustom.cpp:
(WebCore::toJS):
* bindings/js/JSHTMLAudioElementConstructor.cpp: Added.
(WebCore::JSHTMLAudioElementConstructor::JSHTMLAudioElementConstructor):
(WebCore::JSHTMLAudioElementConstructor::implementsConstruct):
(WebCore::JSHTMLAudioElementConstructor::construct):
* bindings/js/JSHTMLAudioElementConstructor.h: Added.
* bindings/js/JSHTMLElementWrapperFactory.cpp:
(WebCore::createJSHTMLWrapper):
* bindings/js/kjs_window.cpp:
(KJS::Window::getValueProperty):
* bindings/js/kjs_window.h:
(KJS::Window::):
* bindings/scripts/CodeGeneratorJS.pm:
* dom/Document.cpp:
(WebCore::Document::createEvent):
(WebCore::Document::willSaveToCache):
(WebCore::Document::didRestoreFromCache):
(WebCore::Document::registerForCacheCallbacks):
(WebCore::Document::unregisterForCacheCallbacks):
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::setBooleanAttribute):
* dom/Element.h:
(WebCore::Element::willSaveToCache):
* dom/Event.cpp:
(WebCore::Event::isProgressEvent):
* dom/Event.h:
* dom/EventNames.h:
* dom/EventTargetNode.cpp:
(WebCore::EventTargetNode::dispatchProgressEvent):
* dom/EventTargetNode.h:
* dom/ProgressEvent.cpp: Added.
(WebCore::ProgressEvent::ProgressEvent):
(WebCore::ProgressEvent::initProgressEvent):
(WebCore::ProgressEvent::initProgressEventNS):
* dom/ProgressEvent.h: Added.
(WebCore::ProgressEvent::lengthComputable):
(WebCore::ProgressEvent::loaded):
(WebCore::ProgressEvent::total):
(WebCore::ProgressEvent::isProgressEvent):
* dom/ProgressEvent.idl: Added.
* history/CachedPage.cpp:
(WebCore::CachedPage::CachedPage):
* html/HTMLAttributeNames.in:
* html/HTMLAudioElement.cpp: Added.
(WebCore::HTMLAudioElement::HTMLAudioElement):
* html/HTMLAudioElement.h: Added.
(WebCore::HTMLAudioElement::tagPriority):
* html/HTMLAudioElement.idl: Added.
* html/HTMLElement.cpp:
(WebCore::inlineTagList):
* html/HTMLElementFactory.cpp:
(WebCore::audioConstructor):
(WebCore::videoConstructor):
(WebCore::sourceConstructor):
(WebCore::createFunctionMap):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::~HTMLInputElement):
(WebCore::HTMLInputElement::setInputType):
(WebCore::HTMLInputElement::willMoveToNewOwnerDocument):
(WebCore::HTMLInputElement::didMoveToNewOwnerDocument):
* html/HTMLMediaElement.cpp: Added.
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::checkDTD):
(WebCore::HTMLMediaElement::rendererIsNeeded):
(WebCore::HTMLMediaElement::createRenderer):
(WebCore::HTMLMediaElement::insertedIntoDocument):
(WebCore::HTMLMediaElement::removedFromDocument):
(WebCore::HTMLMediaElement::scheduleLoad):
(WebCore::HTMLMediaElement::initAndDispatchProgressEvent):
(WebCore::HTMLMediaElement::dispatchEventAsync):
(WebCore::HTMLMediaElement::loadTimerFired):
(WebCore::HTMLMediaElement::asyncEventTimerFired):
(WebCore::serializeTimeOffset):
(WebCore::parseTimeOffset):
(WebCore::HTMLMediaElement::getTimeOffsetAttribute):
(WebCore::HTMLMediaElement::setTimeOffsetAttribute):
(WebCore::HTMLMediaElement::error):
(WebCore::HTMLMediaElement::src):
(WebCore::HTMLMediaElement::HTMLMediaElement::setSrc):
(WebCore::HTMLMediaElement::currentSrc):
(WebCore::HTMLMediaElement::networkState):
(WebCore::HTMLMediaElement::bufferingRate):
(WebCore::HTMLMediaElement::load):
(WebCore::HTMLMediaElement::movieNetworkStateChanged):
(WebCore::HTMLMediaElement::movieReadyStateChanged):
(WebCore::HTMLMediaElement::setReadyState):
(WebCore::HTMLMediaElement::progressEventTimerFired):
(WebCore::HTMLMediaElement::seek):
(WebCore::HTMLMediaElement::readyState):
(WebCore::HTMLMediaElement::seeking):
(WebCore::HTMLMediaElement::currentTime):
(WebCore::HTMLMediaElement::setCurrentTime):
(WebCore::HTMLMediaElement::duration):
(WebCore::HTMLMediaElement::paused):
(WebCore::HTMLMediaElement::defaultPlaybackRate):
(WebCore::HTMLMediaElement::setDefaultPlaybackRate):
(WebCore::HTMLMediaElement::playbackRate):
(WebCore::HTMLMediaElement::setPlaybackRate):
(WebCore::HTMLMediaElement::ended):
(WebCore::HTMLMediaElement::autoplay):
(WebCore::HTMLMediaElement::setAutoplay):
(WebCore::HTMLMediaElement::play):
(WebCore::HTMLMediaElement::pause):
(WebCore::HTMLMediaElement::loopCount):
(WebCore::HTMLMediaElement::setLoopCount):
(WebCore::HTMLMediaElement::start):
(WebCore::HTMLMediaElement::setStart):
(WebCore::HTMLMediaElement::end):
(WebCore::HTMLMediaElement::setEnd):
(WebCore::HTMLMediaElement::loopStart):
(WebCore::HTMLMediaElement::setLoopStart):
(WebCore::HTMLMediaElement::loopEnd):
(WebCore::HTMLMediaElement::setLoopEnd):
(WebCore::HTMLMediaElement::currentLoop):
(WebCore::HTMLMediaElement::setCurrentLoop):
(WebCore::HTMLMediaElement::controls):
(WebCore::HTMLMediaElement::setControls):
(WebCore::HTMLMediaElement::volume):
(WebCore::HTMLMediaElement::setVolume):
(WebCore::HTMLMediaElement::muted):
(WebCore::HTMLMediaElement::setMuted):
(WebCore::HTMLMediaElement::pickMedia):
(WebCore::HTMLMediaElement::checkIfSeekNeeded):
(WebCore::HTMLMediaElement::movieVolumeChanged):
(WebCore::HTMLMediaElement::movieDidEnd):
(WebCore::HTMLMediaElement::movieCuePointReached):
(WebCore::HTMLMediaElement::addCuePoint):
(WebCore::HTMLMediaElement::removeCuePoint):
(WebCore::HTMLMediaElement::buffered):
(WebCore::HTMLMediaElement::played):
(WebCore::HTMLMediaElement::seekable):
(WebCore::HTMLMediaElement::effectiveStart):
(WebCore::HTMLMediaElement::effectiveEnd):
(WebCore::HTMLMediaElement::effectiveLoopStart):
(WebCore::HTMLMediaElement::effectiveLoopEnd):
(WebCore::HTMLMediaElement::activelyPlaying):
(WebCore::HTMLMediaElement::endedPlayback):
(WebCore::HTMLMediaElement::willSaveToCache):
(WebCore::HTMLMediaElement::didRestoreFromCache):
* html/HTMLMediaElement.h: Added.
(WebCore::HTMLMediaElement::movie):
(WebCore::HTMLMediaElement::isVideo):
(WebCore::HTMLMediaElement::):
(WebCore::HTMLMediaElement::CallbackEntry::CallbackEntry):
* html/HTMLMediaElement.idl: Added.
* html/HTMLSourceElement.cpp: Added.
(WebCore::HTMLSourceElement::HTMLSourceElement):
(WebCore::HTMLSourceElement::~HTMLSourceElement):
(WebCore::HTMLSourceElement::insertedIntoDocument):
(WebCore::HTMLSourceElement::src):
(WebCore::HTMLSourceElement::setSrc):
(WebCore::HTMLSourceElement::media):
(WebCore::HTMLSourceElement::setMedia):
(WebCore::HTMLSourceElement::type):
(WebCore::HTMLSourceElement::setType):
* html/HTMLSourceElement.h: Added.
(WebCore::HTMLSourceElement::endTagRequirement):
(WebCore::HTMLSourceElement::tagPriority):
* html/HTMLSourceElement.idl: Added.
* html/HTMLTagNames.in:
* html/HTMLVideoElement.cpp: Added.
(WebCore::HTMLVideoElement::HTMLVideoElement):
(WebCore::HTMLVideoElement::videoWidth):
(WebCore::HTMLVideoElement::videoHeight):
* html/HTMLVideoElement.h: Added.
(WebCore::HTMLVideoElement::tagPriority):
(WebCore::HTMLVideoElement::isVideo):
* html/HTMLVideoElement.idl: Added.
* html/MediaError.h: Added.
(WebCore::MediaError::):
(WebCore::MediaError::MediaError):
(WebCore::MediaError::code):
* html/MediaError.idl: Added.
* html/TimeRanges.cpp: Added.
(TimeRanges::TimeRanges):
(TimeRanges::start):
(TimeRanges::end):
(TimeRanges::add):
(TimeRanges::contain):
* html/TimeRanges.h: Added.
(WebCore::TimeRanges::TimeRanges):
(WebCore::TimeRanges::length):
(WebCore::TimeRanges::Range::Range):
* html/TimeRanges.idl: Added.
* page/DOMWindow.idl:
* platform/MIMETypeRegistry.cpp:
(WebCore::initialiseSupportedMovieMIMETypes):
(WebCore::initialiseMIMETypeRegistry):
(WebCore::MIMETypeRegistry::isSupportedMovieMIMEType):
(WebCore::MIMETypeRegistry::getSupportedMovieMIMETypes):
* platform/MIMETypeRegistry.h:
* platform/graphics/Movie.cpp: Added.
(WebCore::Movie::Movie):
(WebCore::Movie::~Movie):
(WebCore::Movie::load):
(WebCore::Movie::cancelLoad):
(WebCore::Movie::play):
(WebCore::Movie::pause):
(WebCore::Movie::duration):
(WebCore::Movie::currentTime):
(WebCore::Movie::seek):
(WebCore::Movie::paused):
(WebCore::Movie::seeking):
(WebCore::Movie::naturalSize):
(WebCore::Movie::hasVideo):
(WebCore::Movie::networkState):
(WebCore::Movie::readyState):
(WebCore::Movie::volume):
(WebCore::Movie::setVolume):
(WebCore::Movie::rate):
(WebCore::Movie::setRate):
(WebCore::Movie::muted):
(WebCore::Movie::setMuted):
(WebCore::Movie::dataRate):
(WebCore::Movie::setEndTime):
(WebCore::Movie::addCuePoint):
(WebCore::Movie::removeCuePoint):
(WebCore::Movie::clearCuePoints):
(WebCore::Movie::maxTimeBuffered):
(WebCore::Movie::maxTimeSeekable):
(WebCore::Movie::bytesLoaded):
(WebCore::Movie::totalBytesKnown):
(WebCore::Movie::totalBytes):
(WebCore::Movie::setRect):
(WebCore::Movie::visible):
(WebCore::Movie::setVisible):
(WebCore::Movie::paint):
(WebCore::Movie::getSupportedTypes):
(WebCore::Movie::networkStateChanged):
(WebCore::Movie::readyStateChanged):
(WebCore::Movie::volumeChanged):
(WebCore::Movie::didEnd):
(WebCore::Movie::cuePointReached):
* platform/graphics/Movie.h: Added.
(WebCore::MovieClient::~MovieClient):
(WebCore::MovieClient::movieNetworkStateChanged):
(WebCore::MovieClient::movieReadyStateChanged):
(WebCore::MovieClient::movieVolumeChanged):
(WebCore::MovieClient::movieDidEnd):
(WebCore::MovieClient::movieCuePointReached):
(WebCore::Movie::parentWidget):
(WebCore::Movie::setParentWidget):
(WebCore::Movie::rect):
(WebCore::Movie::):
* platform/graphics/mac/MoviePrivateQTKit.h: Added.
* platform/graphics/mac/MoviePrivateQTKit.mm: Added.
(WebCore::MoviePrivate::MoviePrivate):
(WebCore::MoviePrivate::~MoviePrivate):
(WebCore::MoviePrivate::createQTMovie):
(WebCore::MoviePrivate::createQTMovieView):
(WebCore::MoviePrivate::createQTTime):
(WebCore::MoviePrivate::load):
(WebCore::MoviePrivate::play):
(WebCore::MoviePrivate::pause):
(WebCore::MoviePrivate::duration):
(WebCore::MoviePrivate::currentTime):
(WebCore::MoviePrivate::seek):
(WebCore::MoviePrivate::setEndTime):
(WebCore::MoviePrivate::addCuePoint):
(WebCore::MoviePrivate::removeCuePoint):
(WebCore::MoviePrivate::clearCuePoints):
(WebCore::MoviePrivate::startCuePointTimerIfNeeded):
(WebCore::MoviePrivate::cancelSeek):
(WebCore::MoviePrivate::seekTimerFired):
(WebCore::MoviePrivate::cuePointTimerFired):
(WebCore::MoviePrivate::paused):
(WebCore::MoviePrivate::seeking):
(WebCore::MoviePrivate::naturalSize):
(WebCore::MoviePrivate::hasVideo):
(WebCore::MoviePrivate::setVolume):
(WebCore::MoviePrivate::setMuted):
(WebCore::MoviePrivate::setRate):
(WebCore::MoviePrivate::dataRate):
(WebCore::MoviePrivate::networkState):
(WebCore::MoviePrivate::readyState):
(WebCore::MoviePrivate::maxTimeBuffered):
(WebCore::MoviePrivate::maxTimeSeekable):
(WebCore::MoviePrivate::maxTimeLoaded):
(WebCore::MoviePrivate::bytesLoaded):
(WebCore::MoviePrivate::totalBytesKnown):
(WebCore::MoviePrivate::totalBytes):
(WebCore::MoviePrivate::cancelLoad):
(WebCore::MoviePrivate::updateStates):
(WebCore::MoviePrivate::loadStateChanged):
(WebCore::MoviePrivate::rateChanged):
(WebCore::MoviePrivate::sizeChanged):
(WebCore::MoviePrivate::timeChanged):
(WebCore::MoviePrivate::volumeChanged):
(WebCore::MoviePrivate::didEnd):
(WebCore::MoviePrivate::setRect):
(WebCore::MoviePrivate::setVisible):
(WebCore::MoviePrivate::paint):
(WebCore::MoviePrivate::getSupportedTypes):
(-[WebCoreMovieObserver loadStateChanged:]):
(-[WebCoreMovieObserver rateChanged:]):
(-[WebCoreMovieObserver sizeChanged:]):
(-[WebCoreMovieObserver timeChanged:]):
(-[WebCoreMovieObserver volumeChanged:]):
(-[WebCoreMovieObserver didEnd:]):
(-[WebCoreMovieObserver setCallback:WebCore::]):
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::collectLayers):
* rendering/RenderVideo.cpp: Added.
(WebCore::RenderVideo::RenderVideo):
(WebCore::RenderVideo::~RenderVideo):
(WebCore::RenderVideo::movie):
(WebCore::RenderVideo::videoSizeChanged):
(WebCore::RenderVideo::paint):
(WebCore::RenderVideo::layout):
(WebCore::RenderVideo::updateFromElement):
(WebCore::RenderVideo::updateMovie):
(WebCore::RenderVideo::isWidthSpecified):
(WebCore::RenderVideo::isHeightSpecified):
(WebCore::RenderVideo::calcReplacedWidth):
(WebCore::RenderVideo::calcReplacedHeight):
(WebCore::RenderVideo::calcAspectRatioWidth):
(WebCore::RenderVideo::calcAspectRatioHeight):
(WebCore::RenderVideo::calcPrefWidths):
* rendering/RenderVideo.h: Added.
(WebCore::RenderVideo::renderName):
2007-10-30 Sam Weinig <sam@webkit.org>
Reviewed by Adam Roben.
......
......@@ -5,7 +5,7 @@ EXPORTED_SYMBOLS_FILE_i386 = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/WebCor
EXPORTED_SYMBOLS_FILE_ppc = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/WebCore.exp;
EXPORTED_SYMBOLS_FILE_ppc64 = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/WebCore.LP64.exp;
EXPORTED_SYMBOLS_FILE_x86_64 = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/WebCore.LP64.exp;
FEATURE_DEFINES = ENABLE_DATABASE ENABLE_ICONDATABASE ENABLE_SVG ENABLE_SVG_EXPERIMENTAL_FEATURES ENABLE_XPATH ENABLE_XSLT;
FEATURE_DEFINES = ENABLE_DATABASE ENABLE_ICONDATABASE ENABLE_SVG ENABLE_SVG_EXPERIMENTAL_FEATURES ENABLE_XPATH ENABLE_XSLT ENABLE_VIDEO;
GCC_PREFIX_HEADER = WebCorePrefix.h;
GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) $(FEATURE_DEFINES) $(GCC_PREPROCESSOR_DEFINITIONS);
FRAMEWORK_SEARCH_PATHS = $(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks $(FRAMEWORK_SEARCH_PATHS);
......
......@@ -347,6 +347,7 @@ all : \
JSHTMLAppletElement.h \
JSHTMLAnchorElement.h \
JSHTMLAreaElement.h \
JSHTMLAudioElement.h \
JSHTMLBaseElement.h \
JSHTMLBaseFontElement.h \
JSHTMLBlockquoteElement.h \
......@@ -381,6 +382,7 @@ all : \
JSHTMLLinkElement.h \
JSHTMLMapElement.h \
JSHTMLMarqueeElement.h \
JSHTMLMediaElement.h \
JSHTMLMenuElement.h \
JSHTMLMetaElement.h \
JSHTMLModElement.h \
......@@ -395,6 +397,7 @@ all : \
JSHTMLQuoteElement.h \
JSHTMLScriptElement.h \
JSHTMLSelectElement.h \
JSHTMLSourceElement.h \
JSHTMLStyleElement.h \
JSHTMLTableCaptionElement.h \
JSHTMLTableCellElement.h \
......@@ -405,8 +408,10 @@ all : \
JSHTMLTextAreaElement.h \
JSHTMLTitleElement.h \
JSHTMLUListElement.h \
JSHTMLVideoElement.h \
JSHistory.h \
JSKeyboardEvent.h \
JSMediaError.h \
JSMediaList.h \
JSMouseEvent.h \
JSMutationEvent.h \
......@@ -418,6 +423,7 @@ all : \
JSNotation.h \
JSOverflowEvent.h \
JSProcessingInstruction.h \
JSProgressEvent.h \
JSRange.h \
JSRangeException.h \
JSRect.h \
......@@ -560,9 +566,11 @@ all : \
JSStyleSheetList.h \
JSText.h \
JSTextEvent.h \
JSTimeRanges.h \
JSTreeWalker.h \
JSUIEvent.h \
JSVersionChangeCallback.h \
JSVoidCallback.h \
JSXPathEvaluator.h \
JSXPathExpression.h \
JSXPathNSResolver.h \
......
......@@ -740,6 +740,8 @@ _wkInitializeGlyphVector
_wkNSURLProtocolClassForReqest
_wkPathFromFont
_wkPopupMenu
_wkQTMovieDataRate
_wkQTMovieMaxTimeLoaded
_wkReleaseStyleGroup
_wkSecondsSinceLastInputEvent
_wkSetCGFontRenderingMode
......
This diff is collapsed.
......@@ -35,6 +35,7 @@
#include "JSMouseEvent.h"
#include "JSMutationEvent.h"
#include "JSOverflowEvent.h"
#include "JSProgressEvent.h"
#include "JSTextEvent.h"
#include "JSUIEvent.h"
#include "JSWheelEvent.h"
......@@ -42,6 +43,7 @@
#include "MouseEvent.h"
#include "MutationEvent.h"
#include "OverflowEvent.h"
#include "ProgressEvent.h"
#include "TextEvent.h"
#include "UIEvent.h"
#include "WheelEvent.h"
......@@ -81,6 +83,8 @@ KJS::JSValue* toJS(KJS::ExecState* exec, Event* event)
ret = new JSMutationEvent(exec, static_cast<MutationEvent*>(event));
else if (event->isOverflowEvent())
ret = new JSOverflowEvent(exec, static_cast<OverflowEvent*>(event));
else if (event->isProgressEvent())
ret = new JSProgressEvent(exec, static_cast<ProgressEvent*>(event));
else
ret = new JSEvent(exec, event);
......
/*
* Copyright (C) 2007 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)
#include "JSHTMLAudioElementConstructor.h"
#include "Document.h"
#include "HTMLAudioElement.h"
#include "JSHTMLAudioElement.h"
#include "Text.h"
using namespace KJS;
namespace WebCore {
JSHTMLAudioElementConstructor::JSHTMLAudioElementConstructor(ExecState* exec, Document* d)
: m_doc(d)
{
setPrototype(exec->lexicalInterpreter()->builtinObjectPrototype());
put(exec, exec->propertyNames().length, jsNumber(1), ReadOnly|DontDelete|DontEnum);
}
bool JSHTMLAudioElementConstructor::implementsConstruct() const
{
return true;
}
JSObject* JSHTMLAudioElementConstructor::construct(ExecState* exec, const List& args)
{
int exception = 0;
RefPtr<Element> el(m_doc->createElement("audio", exception));
HTMLAudioElement* audio = 0;
if (el && !exception) {
audio = static_cast<HTMLAudioElement*>(el.get());
int sz = args.size();
if (sz > 0) {
audio->setSrc(args[0]->toString(exec));
audio->scheduleLoad();
}
}
setDOMException(exec, exception);
return static_cast<JSObject*>(toJS(exec, audio));
}
}
#endif
/*
* Copyright (C) 2007 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.
*/
#ifndef JSHTMLAudioElementConstructor_h
#define JSHTMLAudioElementConstructor_h
#if ENABLE(VIDEO)
#include "kjs_binding.h"
#include <wtf/RefPtr.h>
namespace WebCore {
class JSHTMLAudioElementConstructor : public KJS::DOMObject {
public:
JSHTMLAudioElementConstructor(KJS::ExecState*, Document*);
virtual bool implementsConstruct() const;
virtual KJS::JSObject *construct(KJS::ExecState*, const KJS::List& args);
private:
RefPtr<Document> m_doc;
};
}
#endif
#endif
......@@ -22,6 +22,7 @@
#include "HTMLAnchorElement.h"
#include "HTMLAppletElement.h"
#include "HTMLAreaElement.h"
#include "HTMLAudioElement.h"
#include "HTMLBRElement.h"
#include "HTMLBaseElement.h"
#include "HTMLBaseFontElement.h"
......@@ -65,6 +66,7 @@
#include "HTMLQuoteElement.h"
#include "HTMLScriptElement.h"
#include "HTMLSelectElement.h"
#include "HTMLSourceElement.h"
#include "HTMLStyleElement.h"
#include "HTMLTableCaptionElement.h"
#include "HTMLTableCellElement.h"
......@@ -75,12 +77,14 @@
#include "HTMLTextAreaElement.h"
#include "HTMLTitleElement.h"
#include "HTMLUListElement.h"
#include "HTMLVideoElement.h"
#include "HTMLNames.h"
#include "JSHTMLAnchorElement.h"
#include "JSHTMLAppletElement.h"
#include "JSHTMLAreaElement.h"
#include "JSHTMLAudioElement.h"
#include "JSHTMLBRElement.h"
#include "JSHTMLBaseElement.h"
#include "JSHTMLBaseFontElement.h"
......@@ -124,6 +128,7 @@
#include "JSHTMLQuoteElement.h"
#include "JSHTMLScriptElement.h"
#include "JSHTMLSelectElement.h"
#include "JSHTMLSourceElement.h"
#include "JSHTMLStyleElement.h"
#include "JSHTMLTableCaptionElement.h"
#include "JSHTMLTableCellElement.h"
......@@ -134,6 +139,7 @@
#include "JSHTMLTextAreaElement.h"
#include "JSHTMLTitleElement.h"
#include "JSHTMLUListElement.h"
#include "JSHTMLVideoElement.h"
#include "kjs_html.h"
......@@ -206,12 +212,21 @@ typedef JSNode* (*CreateHTMLElementWrapperFunction)(ExecState*, PassRefPtr<HTMLE
macro(ul, UList) \
// end of macro
#define FOR_EACH_VIDEO_TAG(macro) \
macro(audio, Audio) \
macro(source, Source) \
macro(video, Video) \
// end of macro
#define CREATE_WRAPPER_FUNCTION(tag, name) \
static JSNode* create##name##Wrapper(ExecState* exec, PassRefPtr<HTMLElement> element) \
{ \
return new JSHTML##name##Element(exec, static_cast<HTML##name##Element*>(element.get())); \
}
FOR_EACH_TAG(CREATE_WRAPPER_FUNCTION)
#if ENABLE(VIDEO)
FOR_EACH_VIDEO_TAG(CREATE_WRAPPER_FUNCTION)
#endif
#undef CREATE_WRAPPER_FUNCTION
JSNode* createJSHTMLWrapper(ExecState* exec, PassRefPtr<HTMLElement> element)
......@@ -220,6 +235,9 @@ JSNode* createJSHTMLWrapper(ExecState* exec, PassRefPtr<HTMLElement> element)
if (map.isEmpty()) {
#define ADD_TO_HASH_MAP(tag, name) map.set(tag##Tag.localName().impl(), create##name##Wrapper);
FOR_EACH_TAG(ADD_TO_HASH_MAP)
#if ENABLE(VIDEO)