Bug 65967 - WebSocket: Add binaryType attribute
Summary: WebSocket: Add binaryType attribute
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Yuta Kitamura
URL:
Keywords:
Depends on:
Blocks: 65249
  Show dependency treegraph
 
Reported: 2011-08-10 00:30 PDT by Yuta Kitamura
Modified: 2011-08-10 02:20 PDT (History)
4 users (show)

See Also:


Attachments
Patch (9.06 KB, patch)
2011-08-10 00:51 PDT, Yuta Kitamura
no flags Details | Formatted Diff | Diff
Patch for landing (9.06 KB, patch)
2011-08-10 01:45 PDT, Yuta Kitamura
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuta Kitamura 2011-08-10 00:30:37 PDT
WebSocket API defines a new attribute "binaryType" which controls the data type of MessageEvent.data for binary frames.

http://dev.w3.org/html5/websockets/#the-websocket-interface
Comment 1 Yuta Kitamura 2011-08-10 00:51:47 PDT
Created attachment 103449 [details]
Patch
Comment 2 Kent Tamura 2011-08-10 01:04:43 PDT
Comment on attachment 103449 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=103449&action=review

> Source/WebCore/websockets/WebSocket.cpp:223
> +    if (m_binaryType == BinaryTypeBlob)
> +        return "blob";
> +    if (m_binaryType == BinaryTypeArrayBuffer)
> +        return "arraybuffer";

We had better use switch-case.
Comment 3 Yuta Kitamura 2011-08-10 01:45:17 PDT
Created attachment 103452 [details]
Patch for landing
Comment 4 WebKit Review Bot 2011-08-10 02:20:04 PDT
Comment on attachment 103452 [details]
Patch for landing

Clearing flags on attachment: 103452

Committed r92759: <http://trac.webkit.org/changeset/92759>
Comment 5 WebKit Review Bot 2011-08-10 02:20:09 PDT
All reviewed patches have been landed.  Closing bug.