2011-02-04 Daniel Cheng <dcheng@chromium.org>
authordcheng@chromium.org <dcheng@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Feb 2011 23:36:37 +0000 (23:36 +0000)
committerdcheng@chromium.org <dcheng@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Feb 2011 23:36:37 +0000 (23:36 +0000)
commit9b138a52a3b9eb2f8a635c5200f322b0fe990617
tree897f99a82fd1d135d71d43b0c2d753f13dcdd1d1
parentab5f2e09704ea33245ece94cfa2a4a6891bd2e82
2011-02-04  Daniel Cheng  <dcheng@chromium.org>

        Reviewed by Dmitry Titov.

        Clone WebClipboard to be frame-specific.
        https://bugs.webkit.org/show_bug.cgi?id=53727

        For drop operations, Chrome currently snapshots the data and copies it
        into the renderer process. As we add more supported drag data types, the
        copy will become increasingly expensive. Instead, we'd like to snapshot
        data in the browser to reduce the amount of data copied and to support
        Blob in DataTransferItem. In order to allow this, we associated
        WebClipboard with a frame so it can correctly route its IPCs to the
        corresponding Chromium host.

        No new tests because no new functionality.

        * platform/chromium/ChromiumDataObject.cpp:
        (WebCore::ChromiumDataObject::createReadable):
        * platform/chromium/ChromiumDataObject.h:
        * platform/chromium/ClipboardChromium.cpp:
        (WebCore::ClipboardChromium::create):
        * platform/chromium/PlatformBridge.h:
        * platform/chromium/ReadableDataObject.cpp:
        (WebCore::ReadableDataObject::create):
        (WebCore::ReadableDataObject::ReadableDataObject):
        (WebCore::ReadableDataObject::getData):
        (WebCore::ReadableDataObject::urlTitle):
        (WebCore::ReadableDataObject::htmlBaseUrl):
        (WebCore::ReadableDataObject::filenames):
        (WebCore::ReadableDataObject::ensureTypeCacheInitialized):
        * platform/chromium/ReadableDataObject.h:
2011-02-04  Daniel Cheng  <dcheng@chromium.org>

        Reviewed by Dmitry Titov.

        Clone WebClipboard to be frame-specific.
        https://bugs.webkit.org/show_bug.cgi?id=53727

        For drop operations, Chrome currently snapshots the data and copies it
        into the renderer process. As we add more supported drag data types, the
        copy will become increasingly expensive. Instead, we'd like to snapshot
        data in the browser to reduce the amount of data copied and to support
        Blob in DataTransferItem. In order to allow this, we associated
        WebClipboard with a frame so it can correctly route its IPCs to the
        corresponding Chromium host.

        * public/WebFrameClient.h:
        (WebKit::WebFrameClient::clipboard):
        * src/PlatformBridge.cpp:
        (WebCore::getClipboard):
        (WebCore::PlatformBridge::clipboardReadAvailableTypes):
        (WebCore::PlatformBridge::clipboardReadData):
        (WebCore::PlatformBridge::clipboardReadFilenames):
        * src/WebFrameImpl.cpp:
        (WebKit::WebFrameImpl::fromFrame):
        * src/WebFrameImpl.h:
        * src/WebViewImpl.cpp:
        (WebKit::WebViewImpl::dragTargetDragEnterNew):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77687 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/platform/chromium/ChromiumDataObject.cpp
Source/WebCore/platform/chromium/ChromiumDataObject.h
Source/WebCore/platform/chromium/ClipboardChromium.cpp
Source/WebCore/platform/chromium/PlatformBridge.h
Source/WebCore/platform/chromium/ReadableDataObject.cpp
Source/WebCore/platform/chromium/ReadableDataObject.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/public/WebFrameClient.h
Source/WebKit/chromium/src/PlatformBridge.cpp
Source/WebKit/chromium/src/WebFrameImpl.cpp
Source/WebKit/chromium/src/WebFrameImpl.h
Source/WebKit/chromium/src/WebViewImpl.cpp