Skip to content
  • eric.carlson@apple.com's avatar
    2010-07-12 Eric Carlson <eric.carlson@apple.com> · 839b7439
    eric.carlson@apple.com authored
            Reviewed by Darin Adler.
    
            Update media element's handling of empty 'src' attribute
            https://bugs.webkit.org/show_bug.cgi?id=42001
    
            * html/HTMLMediaElement.cpp:
            (WebCore::HTMLMediaElement::src): Return getNonEmptyURLAttribute().
            (WebCore::HTMLMediaElement::selectMediaResource): Call noneSupported() for empty 'src'.
            (WebCore::HTMLMediaElement::selectNextSourceChild): Use getNonEmptyURLAttribute() to convert 
            'src' to URL instead of document()->completeURL(). Don't consider a <source> with an empty 'src'. 
    
            * html/HTMLMediaElement.idl: Add 'NonEmpty' option to 'src' attribute.
    
            * html/HTMLSourceElement.cpp:
            (WebCore::HTMLSourceElement::src): Return getNonEmptyURLAttribute().
            (WebCore::HTMLSourceElement::isURLAttribute): New, 'src' is a URL attribute.
            * html/HTMLSourceElement.h:
    
            * html/HTMLSourceElement.idl: Add 'NonEmpty' option to 'src' attribute.
    
            * html/HTMLVideoElement.cpp:
            (WebCore::HTMLVideoElement::parseMappedAttribute): Use getNonEmptyURLAttribute() to convert 
            'poster' to URL instead of document()->completeURL().
    
            * html/HTMLVideoElement.idl:  Add 'NonEmpty' option to 'poster' attribute.
    
    2010-07-12  Eric Carlson  <eric.carlson@apple.com>
    
            Reviewed by NOBODY (OOPS!).
    
            Update media element's handling of empty 'src' attribute
            https://bugs.webkit.org/show_bug.cgi?id=42001
    
            * fast/dom/URL-attribute-reflection-expected.txt: Update results now that audio, video, and
            source return 'non-empty URL'.
    
            * media/video-poster-expected.txt:
            * media/video-poster.html: Test empty poster url.
    
            * media/video-source-error-no-candidate-expected.txt:
            * media/video-source-error-no-candidate.html: Empty 'src' should fires an error event.
    
            * media/video-source-expected.txt:
            * media/video-source.html: Test <source> element's 'src' attribute and property as well 
            as currentSrc.
    
            * media/video-src-empty-expected.txt: Removed.
            * media/video-src-empty.html: Removed, the test is no longer valid.
    
            * media/video-src-none-expected.txt:
            * media/video-src-none.html: Updated to test empty 'src'. Add tests to ensure that an error 
            is fired when load() is called and the 'src' is empty, but not when 'src' is missing.
    
            * media/video-src.html:
            * media/video-src-expected.txt: Test 'src' attribute and property as well as currentSrc.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63119 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    839b7439