Diff
Modified: trunk/Source/Platform/ChangeLog (119257 => 119258)
--- trunk/Source/Platform/ChangeLog 2012-06-01 18:33:20 UTC (rev 119257)
+++ trunk/Source/Platform/ChangeLog 2012-06-01 18:55:29 UTC (rev 119258)
@@ -1,3 +1,15 @@
+2012-06-01 Mark Pilgrim <[email protected]>
+
+ [Chromium] Call clipboard methods directly
+ https://bugs.webkit.org/show_bug.cgi?id=88038
+
+ Reviewed by Adam Barth.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * chromium/public/WebClipboard.h:
+ (WebKit::WebClipboard::sequenceNumber):
+
2012-05-31 Shawn Singh <[email protected]>
[chromium] Migrate to WebTransformationMatrix
Modified: trunk/Source/Platform/chromium/public/WebClipboard.h (119257 => 119258)
--- trunk/Source/Platform/chromium/public/WebClipboard.h 2012-06-01 18:33:20 UTC (rev 119257)
+++ trunk/Source/Platform/chromium/public/WebClipboard.h 2012-06-01 18:55:29 UTC (rev 119258)
@@ -33,7 +33,9 @@
#include "WebCommon.h"
#include "WebData.h"
+#include "WebImage.h"
#include "WebString.h"
+#include "WebURL.h"
#include "WebVector.h"
namespace WebKit {
@@ -60,7 +62,7 @@
// Returns an identifier which can be used to determine whether the data
// contained within the clipboard has changed.
- virtual uint64 sequenceNumber(Buffer) { return 0; }
+ virtual uint64_t sequenceNumber(Buffer) { return 0; }
virtual bool isFormatAvailable(Format, Buffer) { return false; }
Modified: trunk/Source/WebCore/ChangeLog (119257 => 119258)
--- trunk/Source/WebCore/ChangeLog 2012-06-01 18:33:20 UTC (rev 119257)
+++ trunk/Source/WebCore/ChangeLog 2012-06-01 18:55:29 UTC (rev 119258)
@@ -1,3 +1,38 @@
+2012-06-01 Mark Pilgrim <[email protected]>
+
+ [Chromium] Call clipboard methods directly
+ https://bugs.webkit.org/show_bug.cgi?id=88038
+
+ Reviewed by Adam Barth.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * WebCore.gypi:
+ * platform/Pasteboard.h:
+ (Pasteboard):
+ * platform/chromium/ChromiumDataObject.cpp:
+ (WebCore::ChromiumDataObject::createFromPasteboard):
+ * platform/chromium/ChromiumDataObjectItem.cpp:
+ (WebCore::ChromiumDataObjectItem::getAsFile):
+ (WebCore::ChromiumDataObjectItem::internalGetAsString):
+ * platform/chromium/ClipboardUtilitiesChromium.cpp:
+ (WebCore::currentPasteboardBuffer):
+ * platform/chromium/ClipboardUtilitiesChromium.h:
+ (WebCore):
+ * platform/chromium/PasteboardChromium.cpp:
+ (WebCore::Pasteboard::writeSelection):
+ (WebCore::Pasteboard::writePlainText):
+ (WebCore::Pasteboard::writeURL):
+ (WebCore::Pasteboard::writeImage):
+ (WebCore::Pasteboard::writeClipboard):
+ (WebCore::Pasteboard::canSmartReplace):
+ (WebCore::Pasteboard::plainText):
+ (WebCore::Pasteboard::documentFragment):
+ * platform/chromium/PasteboardPrivate.h: Removed.
+ * platform/chromium/PlatformSupport.h:
+ (WebCore):
+ (PlatformSupport):
+
2012-06-01 Hugo Parente Lima <[email protected]>
Improve handling of legacy viewport meta tags
Modified: trunk/Source/WebCore/WebCore.gypi (119257 => 119258)
--- trunk/Source/WebCore/WebCore.gypi 2012-06-01 18:33:20 UTC (rev 119257)
+++ trunk/Source/WebCore/WebCore.gypi 2012-06-01 18:55:29 UTC (rev 119258)
@@ -3346,7 +3346,6 @@
'platform/chromium/MemoryUsageSupportChromium.cpp',
'platform/chromium/MIMETypeRegistryChromium.cpp',
'platform/chromium/PasteboardChromium.cpp',
- 'platform/chromium/PasteboardPrivate.h',
'platform/chromium/PlatformCursor.h',
'platform/chromium/PlatformKeyboardEventChromium.cpp',
'platform/chromium/PlatformScreenChromium.cpp',
Modified: trunk/Source/WebCore/platform/Pasteboard.h (119257 => 119258)
--- trunk/Source/WebCore/platform/Pasteboard.h 2012-06-01 18:33:20 UTC (rev 119257)
+++ trunk/Source/WebCore/platform/Pasteboard.h 2012-06-01 18:55:29 UTC (rev 119258)
@@ -53,10 +53,6 @@
typedef struct HWND__* HWND;
#endif
-#if PLATFORM(CHROMIUM)
-#include "PasteboardPrivate.h"
-#endif
-
namespace WebCore {
#if PLATFORM(MAC)
@@ -123,9 +119,6 @@
bool m_selectionMode;
#endif
-#if PLATFORM(CHROMIUM)
- PasteboardPrivate p;
-#endif
};
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/chromium/ChromiumDataObject.cpp (119257 => 119258)
--- trunk/Source/WebCore/platform/chromium/ChromiumDataObject.cpp 2012-06-01 18:33:20 UTC (rev 119257)
+++ trunk/Source/WebCore/platform/chromium/ChromiumDataObject.cpp 2012-06-01 18:55:29 UTC (rev 119258)
@@ -36,16 +36,21 @@
#include "DataTransferItem.h"
#include "ExceptionCode.h"
#include "ExceptionCodePlaceholder.h"
-#include "PlatformSupport.h"
+#include <public/Platform.h>
+#include <public/WebClipboard.h>
+
namespace WebCore {
PassRefPtr<ChromiumDataObject> ChromiumDataObject::createFromPasteboard()
{
RefPtr<ChromiumDataObject> dataObject = create();
- uint64_t sequenceNumber = PlatformSupport::clipboardSequenceNumber(currentPasteboardBuffer());
+ uint64_t sequenceNumber = WebKit::Platform::current()->clipboard()->sequenceNumber(currentPasteboardBuffer());
bool ignored;
- HashSet<String> types = PlatformSupport::clipboardReadAvailableTypes(currentPasteboardBuffer(), &ignored);
+ WebKit::WebVector<WebKit::WebString> webTypes = WebKit::Platform::current()->clipboard()->readAvailableTypes(currentPasteboardBuffer(), &ignored);
+ HashSet<String> types;
+ for (size_t i = 0; i < webTypes.size(); ++i)
+ types.add(webTypes[i]);
for (HashSet<String>::const_iterator it = types.begin(); it != types.end(); ++it)
dataObject->m_itemList.append(ChromiumDataObjectItem::createFromPasteboard(*it, sequenceNumber));
return dataObject.release();
Modified: trunk/Source/WebCore/platform/chromium/ChromiumDataObjectItem.cpp (119257 => 119258)
--- trunk/Source/WebCore/platform/chromium/ChromiumDataObjectItem.cpp 2012-06-01 18:33:20 UTC (rev 119257)
+++ trunk/Source/WebCore/platform/chromium/ChromiumDataObjectItem.cpp 2012-06-01 18:55:29 UTC (rev 119258)
@@ -40,10 +40,12 @@
#include "ClipboardUtilitiesChromium.h"
#include "DataTransferItem.h"
#include "File.h"
-#include "PlatformSupport.h"
#include "SharedBuffer.h"
#include "StringCallback.h"
+#include <public/Platform.h>
+#include <public/WebClipboard.h>
+
namespace WebCore {
PassRefPtr<ChromiumDataObjectItem> ChromiumDataObjectItem::createFromString(const String& type, const String& data)
@@ -141,7 +143,7 @@
// method to the blob registry; that way the data is only copied over
// into the renderer when it's actually read, not when the blob is
// initially constructed).
- RefPtr<SharedBuffer> data = ""
+ RefPtr<SharedBuffer> data = "" >(WebKit::Platform::current()->clipboard()->readImage(WebKit::WebClipboard::BufferStandard));
RefPtr<RawData> rawData = RawData::create();
rawData->mutableData()->append(data->data(), data->size());
OwnPtr<BlobData> blobData = BlobData::create();
@@ -165,15 +167,15 @@
String data;
// This is ugly but there's no real alternative.
if (m_type == mimeTypeTextPlain)
- data = ""
+ data = ""
else if (m_type == mimeTypeTextHTML) {
- KURL ignoredSourceURL;
+ WebKit::WebURL ignoredSourceURL;
unsigned ignored;
- PlatformSupport::clipboardReadHTML(currentPasteboardBuffer(), &data, &ignoredSourceURL, &ignored, &ignored);
+ data = "" &ignoredSourceURL, &ignored, &ignored);
} else
- data = "" m_type);
+ data = "" m_type);
- return PlatformSupport::clipboardSequenceNumber(currentPasteboardBuffer()) == m_sequenceNumber ? data : String();
+ return WebKit::Platform::current()->clipboard()->sequenceNumber(currentPasteboardBuffer()) == m_sequenceNumber ? data : String();
}
bool ChromiumDataObjectItem::isFilename() const
Modified: trunk/Source/WebCore/platform/chromium/ClipboardUtilitiesChromium.cpp (119257 => 119258)
--- trunk/Source/WebCore/platform/chromium/ClipboardUtilitiesChromium.cpp 2012-06-01 18:33:20 UTC (rev 119257)
+++ trunk/Source/WebCore/platform/chromium/ClipboardUtilitiesChromium.cpp 2012-06-01 18:55:29 UTC (rev 119258)
@@ -35,13 +35,15 @@
#include "Pasteboard.h"
#include "PlatformString.h"
+#include <public/WebClipboard.h>
+
namespace WebCore {
-PasteboardPrivate::ClipboardBuffer currentPasteboardBuffer()
+WebKit::WebClipboard::Buffer currentPasteboardBuffer()
{
return Pasteboard::generalPasteboard()->isSelectionMode() ?
- PasteboardPrivate::SelectionBuffer :
- PasteboardPrivate::StandardBuffer;
+ WebKit::WebClipboard::BufferSelection :
+ WebKit::WebClipboard::BufferStandard;
}
#if OS(WINDOWS)
Modified: trunk/Source/WebCore/platform/chromium/ClipboardUtilitiesChromium.h (119257 => 119258)
--- trunk/Source/WebCore/platform/chromium/ClipboardUtilitiesChromium.h 2012-06-01 18:33:20 UTC (rev 119257)
+++ trunk/Source/WebCore/platform/chromium/ClipboardUtilitiesChromium.h 2012-06-01 18:55:29 UTC (rev 119258)
@@ -31,15 +31,14 @@
#ifndef ClipboardUtilitiesChromium_h
#define ClipboardUtilitiesChromium_h
-#include "PasteboardPrivate.h"
-
+#include <public/WebClipboard.h>
#include <wtf/Forward.h>
namespace WebCore {
class KURL;
-PasteboardPrivate::ClipboardBuffer currentPasteboardBuffer();
+WebKit::WebClipboard::Buffer currentPasteboardBuffer();
#if OS(WINDOWS)
void replaceNewlinesWithWindowsStyleNewlines(String&);
#endif
Modified: trunk/Source/WebCore/platform/chromium/PasteboardChromium.cpp (119257 => 119258)
--- trunk/Source/WebCore/platform/chromium/PasteboardChromium.cpp 2012-06-01 18:33:20 UTC (rev 119257)
+++ trunk/Source/WebCore/platform/chromium/PasteboardChromium.cpp 2012-06-01 18:55:29 UTC (rev 119258)
@@ -31,6 +31,7 @@
#include "config.h"
#include "Pasteboard.h"
+#include "ClipboardChromium.h"
#include "ClipboardUtilitiesChromium.h"
#include "Document.h"
#include "DocumentFragment.h"
@@ -41,7 +42,6 @@
#include "Image.h"
#include "KURL.h"
#include "NativeImageSkia.h"
-#include "PlatformSupport.h"
#include "Range.h"
#include "RenderImage.h"
#include "markup.h"
@@ -51,6 +51,10 @@
#include "XLinkNames.h"
#endif
+#include <public/Platform.h>
+#include <public/WebClipboard.h>
+#include <public/WebDragData.h>
+
namespace WebCore {
Pasteboard* Pasteboard::generalPasteboard()
@@ -91,7 +95,7 @@
#endif
replaceNBSPWithSpace(plainText);
- PlatformSupport::clipboardWriteSelection(html, url, plainText, canSmartCopyOrDelete);
+ WebKit::Platform::current()->clipboard()->writeHTML(html, url, plainText, canSmartCopyOrDelete);
}
void Pasteboard::writePlainText(const String& text)
@@ -99,9 +103,9 @@
#if OS(WINDOWS)
String plainText(text);
replaceNewlinesWithWindowsStyleNewlines(plainText);
- PlatformSupport::clipboardWritePlainText(plainText);
+ WebKit::Platform::current()->clipboard()->writePlainText(plainText);
#else
- PlatformSupport::clipboardWritePlainText(text);
+ WebKit::Platform::current()->clipboard()->writePlainText(text);
#endif
}
@@ -116,7 +120,7 @@
title = url.host();
}
- PlatformSupport::clipboardWriteURL(url, title);
+ WebKit::Platform::current()->clipboard()->writeURL(url, title);
}
void Pasteboard::writeImage(Node* node, const KURL&, const String& title)
@@ -151,47 +155,51 @@
urlString = element->getAttribute(element->imageSourceAttributeName());
}
KURL url = "" ? KURL() : node->document()->completeURL(stripLeadingAndTrailingHTMLSpaces(urlString));
-
- PlatformSupport::clipboardWriteImage(bitmap, url, title);
+ WebKit::WebImage webImage = bitmap->bitmap();
+ WebKit::Platform::current()->clipboard()->writeImage(webImage, WebKit::WebURL(url), WebKit::WebString(title));
}
void Pasteboard::writeClipboard(Clipboard* clipboard)
{
- PlatformSupport::clipboardWriteDataObject(clipboard);
+ WebKit::WebDragData dragData = static_cast<ClipboardChromium*>(clipboard)->dataObject();
+ WebKit::Platform::current()->clipboard()->writeDataObject(dragData);
}
bool Pasteboard::canSmartReplace()
{
- return PlatformSupport::clipboardIsFormatAvailable(PasteboardPrivate::WebSmartPasteFormat, m_selectionMode ? PasteboardPrivate::SelectionBuffer : PasteboardPrivate::StandardBuffer);
+ return WebKit::Platform::current()->clipboard()->isFormatAvailable(WebKit::WebClipboard::FormatSmartPaste, m_selectionMode ? WebKit::WebClipboard::BufferSelection : WebKit::WebClipboard::BufferStandard);
}
String Pasteboard::plainText(Frame* frame)
{
- return PlatformSupport::clipboardReadPlainText(m_selectionMode ? PasteboardPrivate::SelectionBuffer : PasteboardPrivate::StandardBuffer);
+ return WebKit::Platform::current()->clipboard()->readPlainText(m_selectionMode ? WebKit::WebClipboard::BufferSelection : WebKit::WebClipboard::BufferStandard);
}
PassRefPtr<DocumentFragment> Pasteboard::documentFragment(Frame* frame, PassRefPtr<Range> context, bool allowPlainText, bool& chosePlainText)
{
chosePlainText = false;
- PasteboardPrivate::ClipboardBuffer buffer = m_selectionMode ? PasteboardPrivate::SelectionBuffer : PasteboardPrivate::StandardBuffer;
+ WebKit::WebClipboard::Buffer buffer = m_selectionMode ? WebKit::WebClipboard::BufferSelection : WebKit::WebClipboard::BufferStandard;
- if (PlatformSupport::clipboardIsFormatAvailable(PasteboardPrivate::HTMLFormat, buffer)) {
- String markup;
- KURL srcURL;
+ if (WebKit::Platform::current()->clipboard()->isFormatAvailable(WebKit::WebClipboard::FormatHTML, buffer)) {
+ WebKit::WebString markup;
unsigned fragmentStart = 0;
unsigned fragmentEnd = 0;
- PlatformSupport::clipboardReadHTML(buffer, &markup, &srcURL, &fragmentStart, &fragmentEnd);
+ WebKit::WebURL url;
+ markup = WebKit::Platform::current()->clipboard()->readHTML(buffer, &url, &fragmentStart, &fragmentEnd);
+
+ // PlatformSupport::clipboardReadHTML(buffer, &markup, &srcURL, &fragmentStart, &fragmentEnd);
+
if (!markup.isEmpty()) {
RefPtr<DocumentFragment> fragment =
- createFragmentFromMarkupWithContext(frame->document(), markup, fragmentStart, fragmentEnd, srcURL, DisallowScriptingContent);
+ createFragmentFromMarkupWithContext(frame->document(), markup, fragmentStart, fragmentEnd, KURL(url), DisallowScriptingContent);
if (fragment)
return fragment.release();
}
}
if (allowPlainText) {
- String markup = PlatformSupport::clipboardReadPlainText(buffer);
+ String markup = WebKit::Platform::current()->clipboard()->readPlainText(buffer);
if (!markup.isEmpty()) {
chosePlainText = true;
Deleted: trunk/Source/WebCore/platform/chromium/PasteboardPrivate.h (119257 => 119258)
--- trunk/Source/WebCore/platform/chromium/PasteboardPrivate.h 2012-06-01 18:33:20 UTC (rev 119257)
+++ trunk/Source/WebCore/platform/chromium/PasteboardPrivate.h 2012-06-01 18:55:29 UTC (rev 119258)
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2008, Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef PasteboardPrivate_h
-#define PasteboardPrivate_h
-
-namespace WebCore {
-
- class PasteboardPrivate {
- public:
- enum ClipboardFormat {
- PlainTextFormat,
- HTMLFormat,
- BookmarkFormat,
- WebSmartPasteFormat,
- };
- enum ClipboardBuffer {
- StandardBuffer,
- SelectionBuffer,
- DragBuffer,
- };
- };
-
-} // namespace WebCore
-
-#endif
Modified: trunk/Source/WebCore/platform/chromium/PlatformSupport.h (119257 => 119258)
--- trunk/Source/WebCore/platform/chromium/PlatformSupport.h 2012-06-01 18:33:20 UTC (rev 119257)
+++ trunk/Source/WebCore/platform/chromium/PlatformSupport.h 2012-06-01 18:55:29 UTC (rev 119258)
@@ -38,7 +38,6 @@
#include "FileSystem.h"
#include "ImageSource.h"
#include "LinkHash.h"
-#include "PasteboardPrivate.h"
#include "PluginData.h"
#include <wtf/Forward.h>
@@ -67,7 +66,6 @@
namespace WebCore {
class AsyncFileSystem;
-class Clipboard;
class Color;
class Cursor;
class Document;
@@ -94,26 +92,6 @@
class PlatformSupport {
public:
- // Clipboard ----------------------------------------------------------
- static uint64_t clipboardSequenceNumber(PasteboardPrivate::ClipboardBuffer);
-
- static bool clipboardIsFormatAvailable(PasteboardPrivate::ClipboardFormat, PasteboardPrivate::ClipboardBuffer);
- static HashSet<String> clipboardReadAvailableTypes(PasteboardPrivate::ClipboardBuffer, bool* containsFilenames);
-
- static String clipboardReadPlainText(PasteboardPrivate::ClipboardBuffer);
- static void clipboardReadHTML(PasteboardPrivate::ClipboardBuffer, String*, KURL*, unsigned* fragmentStart, unsigned* fragmentEnd);
- static PassRefPtr<SharedBuffer> clipboardReadImage(PasteboardPrivate::ClipboardBuffer);
- static String clipboardReadCustomData(PasteboardPrivate::ClipboardBuffer, const String& type);
-
- // Only the clipboardRead functions take a buffer argument because
- // Chromium currently uses a different technique to write to alternate
- // clipboard buffers.
- static void clipboardWriteSelection(const String&, const KURL&, const String&, bool);
- static void clipboardWritePlainText(const String&);
- static void clipboardWriteURL(const KURL&, const String&);
- static void clipboardWriteImage(NativeImagePtr, const KURL&, const String&);
- static void clipboardWriteDataObject(Clipboard*);
-
// Cookies ------------------------------------------------------------
static void setCookies(const Document*, const KURL&, const String& value);
static String cookies(const Document*, const KURL&);
Modified: trunk/Source/WebKit/chromium/ChangeLog (119257 => 119258)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-06-01 18:33:20 UTC (rev 119257)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-06-01 18:55:29 UTC (rev 119258)
@@ -1,3 +1,16 @@
+2012-06-01 Mark Pilgrim <[email protected]>
+
+ [Chromium] Call clipboard methods directly
+ https://bugs.webkit.org/show_bug.cgi?id=88038
+
+ Reviewed by Adam Barth.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * src/AssertMatchingEnums.cpp:
+ * src/PlatformSupport.cpp:
+ (WebCore::getCookieJar):
+
2012-06-01 Peter Beverloo <[email protected]>
Unreviewed. Rolled DEPS.
Modified: trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp (119257 => 119258)
--- trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp 2012-06-01 18:33:20 UTC (rev 119257)
+++ trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp 2012-06-01 18:55:29 UTC (rev 119258)
@@ -59,7 +59,6 @@
#include "MediaStreamSource.h"
#include "NotificationClient.h"
#include "PageVisibilityState.h"
-#include "PasteboardPrivate.h"
#include "PeerConnection00.h"
#include "PlatformCursor.h"
#include "ReferrerPolicy.h"
@@ -268,14 +267,6 @@
COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::CachedEvent, ApplicationCacheHost::CACHED_EVENT);
COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::ObsoleteEvent, ApplicationCacheHost::OBSOLETE_EVENT);
-COMPILE_ASSERT_MATCHING_ENUM(WebClipboard::FormatPlainText, PasteboardPrivate::PlainTextFormat);
-COMPILE_ASSERT_MATCHING_ENUM(WebClipboard::FormatHTML, PasteboardPrivate::HTMLFormat);
-COMPILE_ASSERT_MATCHING_ENUM(WebClipboard::FormatBookmark, PasteboardPrivate::BookmarkFormat);
-COMPILE_ASSERT_MATCHING_ENUM(WebClipboard::FormatSmartPaste, PasteboardPrivate::WebSmartPasteFormat);
-
-COMPILE_ASSERT_MATCHING_ENUM(WebClipboard::BufferStandard, PasteboardPrivate::StandardBuffer);
-COMPILE_ASSERT_MATCHING_ENUM(WebClipboard::BufferSelection, PasteboardPrivate::SelectionBuffer);
-
COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypePointer, PlatformCursor::TypePointer);
COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeCross, PlatformCursor::TypeCross);
COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeHand, PlatformCursor::TypeHand);
Modified: trunk/Source/WebKit/chromium/src/PlatformSupport.cpp (119257 => 119258)
--- trunk/Source/WebKit/chromium/src/PlatformSupport.cpp 2012-06-01 18:33:20 UTC (rev 119257)
+++ trunk/Source/WebKit/chromium/src/PlatformSupport.cpp 2012-06-01 18:55:29 UTC (rev 119258)
@@ -80,7 +80,6 @@
#include "AsyncFileSystemChromium.h"
#include "BitmapImage.h"
-#include "ClipboardChromium.h"
#include "Cookie.h"
#include "Document.h"
#include "FrameView.h"
@@ -94,7 +93,6 @@
#include "Worker.h"
#include "WorkerContextProxy.h"
-#include <public/WebClipboard.h>
#include <public/WebCookie.h>
#include <public/WebCookieJar.h>
#include <public/WebMimeRegistry.h>
@@ -141,96 +139,6 @@
return cookieJar;
}
-// Clipboard ------------------------------------------------------------------
-
-uint64_t PlatformSupport::clipboardSequenceNumber(PasteboardPrivate::ClipboardBuffer buffer)
-{
- return webKitPlatformSupport()->clipboard()->sequenceNumber(
- static_cast<WebClipboard::Buffer>(buffer));
-}
-
-bool PlatformSupport::clipboardIsFormatAvailable(
- PasteboardPrivate::ClipboardFormat format,
- PasteboardPrivate::ClipboardBuffer buffer)
-{
- return webKitPlatformSupport()->clipboard()->isFormatAvailable(
- static_cast<WebClipboard::Format>(format),
- static_cast<WebClipboard::Buffer>(buffer));
-}
-
-HashSet<String> PlatformSupport::clipboardReadAvailableTypes(
- PasteboardPrivate::ClipboardBuffer buffer, bool* containsFilenames)
-{
- WebVector<WebString> result = webKitPlatformSupport()->clipboard()->readAvailableTypes(
- static_cast<WebClipboard::Buffer>(buffer), containsFilenames);
- HashSet<String> types;
- for (size_t i = 0; i < result.size(); ++i)
- types.add(result[i]);
- return types;
-}
-
-String PlatformSupport::clipboardReadPlainText(
- PasteboardPrivate::ClipboardBuffer buffer)
-{
- return webKitPlatformSupport()->clipboard()->readPlainText(
- static_cast<WebClipboard::Buffer>(buffer));
-}
-
-void PlatformSupport::clipboardReadHTML(
- PasteboardPrivate::ClipboardBuffer buffer,
- String* htmlText, KURL* sourceURL, unsigned* fragmentStart, unsigned* fragmentEnd)
-{
- WebURL url;
- *htmlText = webKitPlatformSupport()->clipboard()->readHTML(
- static_cast<WebClipboard::Buffer>(buffer), &url, fragmentStart, fragmentEnd);
- *sourceURL = url;
-}
-
-PassRefPtr<SharedBuffer> PlatformSupport::clipboardReadImage(
- PasteboardPrivate::ClipboardBuffer buffer)
-{
- return webKitPlatformSupport()->clipboard()->readImage(static_cast<WebClipboard::Buffer>(buffer));
-}
-
-String PlatformSupport::clipboardReadCustomData(
- PasteboardPrivate::ClipboardBuffer buffer, const String& type)
-{
- return webKitPlatformSupport()->clipboard()->readCustomData(static_cast<WebClipboard::Buffer>(buffer), type);
-}
-
-void PlatformSupport::clipboardWriteSelection(const String& htmlText,
- const KURL& sourceURL,
- const String& plainText,
- bool writeSmartPaste)
-{
- webKitPlatformSupport()->clipboard()->writeHTML(
- htmlText, sourceURL, plainText, writeSmartPaste);
-}
-
-void PlatformSupport::clipboardWritePlainText(const String& plainText)
-{
- webKitPlatformSupport()->clipboard()->writePlainText(plainText);
-}
-
-void PlatformSupport::clipboardWriteURL(const KURL& url, const String& title)
-{
- webKitPlatformSupport()->clipboard()->writeURL(url, title);
-}
-
-void PlatformSupport::clipboardWriteImage(NativeImagePtr image,
- const KURL& sourceURL,
- const String& title)
-{
- WebImage webImage(image->bitmap());
- webKitPlatformSupport()->clipboard()->writeImage(webImage, sourceURL, title);
-}
-
-void PlatformSupport::clipboardWriteDataObject(Clipboard* clipboard)
-{
- WebDragData data = ""
- webKitPlatformSupport()->clipboard()->writeDataObject(data);
-}
-
// Cookies --------------------------------------------------------------------
void PlatformSupport::setCookies(const Document* document, const KURL& url,