Ignore:
Timestamp:
02/20/12 00:59:42 (3 years ago)
Author:
bashi@chromium.org
Message:

[WebSocket] Add deflater/inflater classes
https://bugs.webkit.org/show_bug.cgi?id=78449

Source/WebCore:

Add WebSocketDeflater/WebSocketInflater classes which wrap zlib
functions. These classes are not used yet, but will be used for
supporting WebSocket deflate-frame extension.

This patch is second try. The previous patch broke Chromium Win
build. I added dependency of zlib to WebCore.gyp. I think it's
OK because Chromium already depends on zlib.

Reviewed by Kent Tamura.

No new tests except for chromium port. Behavior is unchanged.

  • GNUmakefile.list.am: Added WebSocketDeflater.(cpp|h).
  • WebCore.gyp/WebCore.gyp: Added zlib dependency.
  • WebCore.gypi: Added WebSocketDeflater.(cpp|h).
  • WebCore.vcproj/WebCore.vcproj: Ditto.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • websockets/WebSocketDeflater.cpp: Added.

(WebCore):
(WebCore::WebSocketDeflater::create):
(WebCore::WebSocketDeflater::WebSocketDeflater):
(WebCore::WebSocketDeflater::initialize):
(WebCore::WebSocketDeflater::~WebSocketDeflater):
(WebCore::setStreamParameter):
(WebCore::WebSocketDeflater::addBytes):
(WebCore::WebSocketDeflater::finish):
(WebCore::WebSocketDeflater::reset):
(WebCore::WebSocketInflater::create):
(WebCore::WebSocketInflater::WebSocketInflater):
(WebCore::WebSocketInflater::initialize):
(WebCore::WebSocketInflater::~WebSocketInflater):
(WebCore::WebSocketInflater::addBytes):
(WebCore::WebSocketInflater::finish):
(WebCore::WebSocketInflater::reset):

  • websockets/WebSocketDeflater.h: Added.

(WebCore):
(WebSocketDeflater):
(WebCore::WebSocketDeflater::data):
(WebCore::WebSocketDeflater::size):
(WebSocketInflater):
(WebCore::WebSocketInflater::data):
(WebCore::WebSocketInflater::size):

Source/WebKit/chromium:

Add tests which ensure WebSocketDeflater/WebSocketInflater can
compress/decompress data correctly.

Reviewed by Kent Tamura.

  • WebKit.gypi: Added zlib dependency.
  • WebKitUnitTests.gyp: Ditto.
  • tests/WebSocketDeflaterTest.cpp: Added.

(WebCore):
(WebCore::TEST):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/WebCore.gypi

    r108207 r108221  
    48124812            'websockets/WebSocketChannel.h', 
    48134813            'websockets/WebSocketChannelClient.h', 
     4814            'websockets/WebSocketDeflater.cpp', 
     4815            'websockets/WebSocketDeflater.h', 
    48144816            'websockets/WebSocketExtensionDispatcher.cpp', 
    48154817            'websockets/WebSocketExtensionDispatcher.h', 
Note: See TracChangeset for help on using the changeset viewer.