• xlai@chromium.org's avatar
    The toBlob method in HTMLCanvasElement has been implemented. · c8bfc082
    xlai@chromium.org authored
    Changes include:
    (1) HTMLCanvasElement: 
    
    The toBlob function is implemented in a similar fashion as the existing toDataURL function, taking in parameters like mimeType and qualityArgument. It has an additional argument FileCallback which accepts user-defined callback function.
    
    (2) ImageDataBuffer:
    
    encodeImage is made public.
    
    (3) File:
    
    A new create factory method is added to allow HTMLCanvasElement to create a new File object using the blob data. File object is a subtype of Blob object; it has two additional attributes -- name, last modification time -- as compared to Blob. We use empty string and current time to fill in these two attributes; FF creates the latter attribute in the same way.
    
    (4) FileCallback: 
    
    Moved from module/ to core/. 
    
    
    
    BUG=67587
    
    Review URL: https://codereview.chromium.org/1257253004
    
    git-svn-id: svn://svn.chromium.org/blink/trunk@201327 bbb929c8-8fbe-4397-9dbb-9b2b20218538
    c8bfc082
canvas-read-blocked-by-setting.html 1.71 KB