diff options
Diffstat (limited to 'WebCore/loader/MediaDocument.cpp')
-rw-r--r-- | WebCore/loader/MediaDocument.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/WebCore/loader/MediaDocument.cpp b/WebCore/loader/MediaDocument.cpp index 8ed5b45..b89ac10 100644 --- a/WebCore/loader/MediaDocument.cpp +++ b/WebCore/loader/MediaDocument.cpp @@ -54,7 +54,7 @@ public: MediaTokenizer(Document* doc) : m_doc(doc), m_mediaElement(0) {} private: - virtual bool write(const SegmentedString&, bool appendData); + virtual void write(const SegmentedString&, bool appendData); virtual void stopParsing(); virtual void finish(); virtual bool isWaitingForScripts() const; @@ -68,24 +68,23 @@ private: HTMLMediaElement* m_mediaElement; }; -bool MediaTokenizer::write(const SegmentedString&, bool) +void MediaTokenizer::write(const SegmentedString&, bool) { ASSERT_NOT_REACHED(); - return false; } void MediaTokenizer::createDocumentStructure() { ExceptionCode ec; - RefPtr<Element> rootElement = m_doc->createElementNS(xhtmlNamespaceURI, "html", ec); + RefPtr<Element> rootElement = m_doc->createElement(htmlTag, false); m_doc->appendChild(rootElement, ec); - RefPtr<Element> body = m_doc->createElementNS(xhtmlNamespaceURI, "body", ec); + RefPtr<Element> body = m_doc->createElement(bodyTag, false); body->setAttribute(styleAttr, "background-color: rgb(38,38,38);"); rootElement->appendChild(body, ec); - RefPtr<Element> mediaElement = m_doc->createElementNS(xhtmlNamespaceURI, "video", ec); + RefPtr<Element> mediaElement = m_doc->createElement(videoTag, false); m_mediaElement = static_cast<HTMLVideoElement*>(mediaElement.get()); m_mediaElement->setAttribute(controlsAttr, ""); @@ -147,18 +146,17 @@ void MediaDocument::defaultEventHandler(Event* event) { // Match the default Quicktime plugin behavior to allow // clicking and double-clicking to pause and play the media. - EventTargetNode* targetNode = event->target()->toNode(); + Node* targetNode = event->target()->toNode(); if (targetNode && targetNode->hasTagName(videoTag)) { HTMLVideoElement* video = static_cast<HTMLVideoElement*>(targetNode); - ExceptionCode ec; if (event->type() == eventNames().clickEvent) { if (!video->canPlay()) { - video->pause(ec); + video->pause(); event->setDefaultHandled(); } } else if (event->type() == eventNames().dblclickEvent) { if (video->canPlay()) { - video->play(ec); + video->play(); event->setDefaultHandled(); } } |