Changeset 117160 in webkit


Ignore:
Timestamp:
May 15, 2012 2:27:39 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[File API] URL methods handling null arguments
https://bugs.webkit.org/show_bug.cgi?id=69693

Patch by Lauro Neto <lauro.neto@openbossa.org> on 2012-05-15
Reviewed by Adam Barth.

Source/WebCore:

Per the latest editor's draft of the File API:
http://dev.w3.org/2006/webapi/FileAPI/#dfn-createObjectURL

Use null instead of undefined as return value when a
null blob is given to URL.createObjectURL.

Test: fast/files/url-null.html

  • html/DOMURL.idl:

LayoutTests:

URL.createObjectURL must return null instead of undefined
when a null blob is given as argument. Updated old test that
used undefined explicitly. New test by Mark Pilgrim (rebaselined
after fix).

  • fast/files/url-null-expected.txt: Added.
  • fast/files/url-null.html: Added.
  • http/tests/fileapi/create-blob-url-from-data-url.html:
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r117128 r117160  
     12012-05-15  Lauro Neto  <lauro.neto@openbossa.org>
     2
     3        [File API] URL methods handling null arguments
     4        https://bugs.webkit.org/show_bug.cgi?id=69693
     5
     6        Reviewed by Adam Barth.
     7
     8        URL.createObjectURL must return null instead of undefined
     9        when a null blob is given as argument. Updated old test that
     10        used undefined explicitly. New test by Mark Pilgrim (rebaselined
     11        after fix).
     12
     13        * fast/files/url-null-expected.txt: Added.
     14        * fast/files/url-null.html: Added.
     15        * http/tests/fileapi/create-blob-url-from-data-url.html:
     16
    1172012-05-15  Terry Anderson  <tdanderson@chromium.org>
    218
  • trunk/LayoutTests/http/tests/fileapi/create-blob-url-from-data-url.html

    r115582 r117160  
    1616        return;
    1717    var blobURL = location.hash.substr(1);
    18     if (blobURL == "undefined")
     18    if (blobURL == "null")
    1919        log("PASS: no blob URL is created");
    2020    else
  • trunk/Source/WebCore/ChangeLog

    r117158 r117160  
     12012-05-15  Lauro Neto  <lauro.neto@openbossa.org>
     2
     3        [File API] URL methods handling null arguments
     4        https://bugs.webkit.org/show_bug.cgi?id=69693
     5
     6        Reviewed by Adam Barth.
     7
     8        Per the latest editor's draft of the File API:
     9        http://dev.w3.org/2006/webapi/FileAPI/#dfn-createObjectURL
     10
     11        Use null instead of undefined as return value when a
     12        null blob is given to URL.createObjectURL.
     13
     14        Test: fast/files/url-null.html
     15
     16        * html/DOMURL.idl:
     17
    1182012-05-15  Jer Noble  <jer.noble@apple.com>
    219
  • trunk/Source/WebCore/html/DOMURL.idl

    r109574 r117160  
    3535    ] DOMURL {
    3636#if defined(ENABLE_MEDIA_STREAM) && ENABLE_MEDIA_STREAM
    37         [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Undefined] static DOMString createObjectURL(in MediaStream stream);
     37        [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Null] static DOMString createObjectURL(in MediaStream stream);
    3838#endif
    39         [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Undefined] static DOMString createObjectURL(in Blob blob);
     39        [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Null] static DOMString createObjectURL(in Blob blob);
    4040        [CallWith=ScriptExecutionContext] static void revokeObjectURL(in DOMString url);
    4141    };
Note: See TracChangeset for help on using the changeset viewer.