2009-08-19 Eric Carlson <eric.carlson@apple.com>
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Aug 2009 18:10:44 +0000 (18:10 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Aug 2009 18:10:44 +0000 (18:10 +0000)
commit179da87e4d3c5b502b14eb4a27f6ff3d452ca287
treef17dc55e56f314f69546edfd3e736a22ecd6c404
parent5cccf8de8e5f2eb3495cf3272671cb6aa972252e
2009-08-19  Eric Carlson  <eric.carlson@apple.com>

        Reviewed by Eric Seidel.

        Sound button appears in controller with movies that have no audio
        https://bugs.webkit.org/show_bug.cgi?id=28464

        Test: media/video-no-audio.html

        * html/HTMLMediaElement.cpp:
        * html/HTMLMediaElement.h:
        (WebCore::HTMLMediaElement::hasAudio):
            Added hasAudio.

        * platform/graphics/MediaPlayer.h:
        * platform/graphics/MediaPlayer.cpp:
        (WebCore::NullMediaPlayerPrivate::hasAudio):
        (WebCore::MediaPlayer::hasVideo):
            Make const.
        (WebCore::MediaPlayer::hasAudio):
            Added hasAudio.

        * platform/graphics/MediaPlayerPrivate.h:
            Add hasAudio.

        * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
        * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivate::hasAudio):
            Ditto.

        * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
        (WebCore::MediaPlayerPrivate::hasAudio):
            Ditto.

        * platform/graphics/qt/MediaPlayerPrivatePhonon.h:
        * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
        (WebCore::MediaPlayerPrivate::hasAudio):
            Ditto.

        * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
        * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
        (WebCore::MediaPlayerPrivate::hasAudio):
            Ditto.

        * platform/graphics/win/QTMovieWin.h:
        * platform/graphics/win/QTMovieWin.cpp:
        (QTMovieWin::hasAudio):
            Ditto.

        * rendering/MediaControlElements.cpp:
        (WebCore::MediaControlMuteButtonElement::disabled):
            New, return true if media element doesn't have audio.
        (WebCore::MediaControlMuteButtonElement::rendererIsNeeded):
            Renderer is not needed if element has no audio.
        * rendering/MediaControlElements.h:
        (WebCore::MediaControlInputElement::disabled):

        * rendering/RenderThemeMac.mm:
        (WebCore::getMediaUIPartStateFlags):
            Return MediaUIPartDisabledFlag if node is disabled.

2009-08-19  Eric Carlson  <eric.carlson@apple.com>

        Reviewed by Eric Seidel.

        Sound button appears in controller with movies that have no audio
        https://bugs.webkit.org/show_bug.cgi?id=28464

        * media/video-controls-visible-audio-only.html:
        * media/video-no-audio.html: Added.
        * platform/mac-leopard/media/video-empty-source-expected.txt:
        * platform/mac-leopard/media/video-no-audio-expected.txt: Added.
        * platform/mac/media/video-empty-source-expected.txt:
        * platform/mac/media/video-no-audio-expected.txt: Added.
        * platform/win/media/video-empty-source-expected.txt: Added.
        * platform/win/media/video-no-audio-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@47515 268f45cc-cd09-0410-ab3c-d52691b4dbfc
28 files changed:
LayoutTests/ChangeLog
LayoutTests/media/video-controls-visible-audio-only.html
LayoutTests/media/video-no-audio.html [new file with mode: 0644]
LayoutTests/platform/mac-leopard/media/video-empty-source-expected.txt
LayoutTests/platform/mac-leopard/media/video-no-audio-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/media/video-empty-source-expected.txt
LayoutTests/platform/mac/media/video-no-audio-expected.txt [new file with mode: 0644]
LayoutTests/platform/win/media/video-empty-source-expected.txt [new file with mode: 0644]
LayoutTests/platform/win/media/video-no-audio-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/html/HTMLMediaElement.cpp
WebCore/html/HTMLMediaElement.h
WebCore/platform/graphics/MediaPlayer.cpp
WebCore/platform/graphics/MediaPlayer.h
WebCore/platform/graphics/MediaPlayerPrivate.h
WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp
WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h
WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h
WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp
WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.h
WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp
WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h
WebCore/platform/graphics/win/QTMovieWin.cpp
WebCore/platform/graphics/win/QTMovieWin.h
WebCore/rendering/MediaControlElements.cpp
WebCore/rendering/MediaControlElements.h
WebCore/rendering/RenderThemeMac.mm