Commit 32dee7a4 authored by pfeldman@chromium.org's avatar pfeldman@chromium.org

2010-04-04 Pavel Feldman <pfeldman@chromium.org>

        Not reviewed. Rolling out chromium changes r57028 and r57032
        for breaking chromium layout tests.

        * WebCore.gyp/WebCore.gyp:
        * WebCore.gypi:
        * platform/chromium/DragImageChromium.cpp: Added.
        (WebCore::dragImageSize):
        (WebCore::deleteDragImage):
        (WebCore::scaleDragImage):
        (WebCore::dissolveDragImageToFraction):
        (WebCore::createDragImageFromImage):
        (WebCore::createDragImageIconForCachedImage):
        * platform/chromium/DragImageChromiumMac.cpp: Removed.
        * platform/chromium/DragImageChromiumSkia.cpp: Removed.
        * platform/chromium/DragImageRef.h:
        
        WebKit/chromium:
        * public/WebViewClient.h:
        (WebKit::WebViewClient::startDragging):
        * src/DragClientImpl.cpp:
        (WebKit::DragClientImpl::startDrag):
        * src/WebViewImpl.cpp:
        (WebKit::WebViewImpl::startDragging):
        * src/WebViewImpl.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57064 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 23434fe7
2010-04-04 Pavel Feldman <pfeldman@chromium.org>
Not reviewed. Rolling out chromium changes r57028 and r57032
for breaking chromium layout tests.
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* platform/chromium/DragImageChromium.cpp: Added.
(WebCore::dragImageSize):
(WebCore::deleteDragImage):
(WebCore::scaleDragImage):
(WebCore::dissolveDragImageToFraction):
(WebCore::createDragImageFromImage):
(WebCore::createDragImageIconForCachedImage):
* platform/chromium/DragImageChromiumMac.cpp: Removed.
* platform/chromium/DragImageChromiumSkia.cpp: Removed.
* platform/chromium/DragImageRef.h:
2010-03-29 Antonio Gomes <tonikitoo@webkit.org>
Reviewed by Simon Fraser.
......@@ -1064,9 +1064,6 @@
'../platform/image-decoders/skia/ImageDecoderSkia.cpp',
'../platform/image-decoders/xbm/XBMImageDecoder.cpp',
'../platform/image-decoders/xbm/XBMImageDecoder.h',
# Again, Skia is not used on Mac.
'../platform/chromium/DragImageChromiumSkia.cpp',
],
'direct_dependent_settings': {
'include_dirs': [
......
......@@ -1951,8 +1951,7 @@
'platform/chromium/CursorChromium.cpp',
'platform/chromium/DragDataChromium.cpp',
'platform/chromium/DragDataRef.h',
'platform/chromium/DragImageChromiumMac.cpp',
'platform/chromium/DragImageChromiumSkia.cpp',
'platform/chromium/DragImageChromium.cpp',
'platform/chromium/DragImageRef.h',
'platform/chromium/FileChooserChromium.cpp',
'platform/chromium/FileSystemChromium.cpp',
......
/*
* Copyright (c) 2010, Google Inc. All rights reserved.
* Copyright (c) 2008, 2009, 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
......@@ -51,23 +51,23 @@ DragImageRef scaleDragImage(DragImageRef image, FloatSize scale)
notImplemented();
return 0;
}
DragImageRef dissolveDragImageToFraction(DragImageRef image, float)
{
notImplemented();
return image;
}
DragImageRef createDragImageFromImage(Image* img)
{
{
notImplemented();
return 0;
}
DragImageRef createDragImageIconForCachedImage(CachedImage*)
{
notImplemented();
return 0;
return 0;
}
} // namespace WebCore
/*
* Copyright (c) 2008, 2009, 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.
*/
#include "config.h"
#include "DragImage.h"
#include "Image.h"
#include "NativeImageSkia.h"
#include "NotImplemented.h"
#include "RefPtr.h"
#include "SkBitmap.h"
namespace WebCore {
IntSize dragImageSize(DragImageRef image)
{
if (!image)
return IntSize();
return IntSize(image->width(), image->height());
}
void deleteDragImage(DragImageRef image)
{
delete image;
}
DragImageRef scaleDragImage(DragImageRef image, FloatSize scale)
{
notImplemented();
return image;
}
DragImageRef dissolveDragImageToFraction(DragImageRef image, float)
{
notImplemented();
return image;
}
DragImageRef createDragImageFromImage(Image* image)
{
return new SkBitmap(*image->nativeImageForCurrentFrame());
}
DragImageRef createDragImageIconForCachedImage(CachedImage*)
{
notImplemented();
return 0;
}
} // namespace WebCore
......@@ -29,16 +29,11 @@
#ifndef DragImageRef_h
#define DragImageRef_h
class SkBitmap;
namespace WebCore {
#if OS(DARWIN)
// FIXME: not implemented.
typedef void* DragImageRef;
#else
typedef SkBitmap* DragImageRef;
#endif
// FIXME: Need to support image drag-n-drop. For now, we just allow things
// to compile by defining this dummy type.
typedef void* DragImageRef;
} // namespace WebCore
......
2010-04-04 Pavel Feldman <pfeldman@chromium.org>
Not reviewed. Rolling out chromium changes r57028 and r57032
for breaking chromium layout tests.
* public/WebViewClient.h:
(WebKit::WebViewClient::startDragging):
* src/DragClientImpl.cpp:
(WebKit::DragClientImpl::startDrag):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::startDragging):
* src/WebViewImpl.h:
2010-04-03 Darin Fisher <darin@chromium.org>
Add default implementations of WebNotificationPresenter methods to
......
......@@ -48,7 +48,6 @@ class WebDragData;
class WebFileChooserCompletion;
class WebFrame;
class WebGeolocationService;
class WebImage;
class WebNode;
class WebNotificationPresenter;
class WebRange;
......@@ -225,7 +224,7 @@ public:
// Called when a drag-n-drop operation should begin.
virtual void startDragging(
const WebDragData&, WebDragOperationsMask, const WebImage&, const WebPoint&) { }
const WebPoint& from, const WebDragData&, WebDragOperationsMask) { }
// Called to determine if drag-n-drop operations may initiate a page
// navigation.
......
......@@ -30,14 +30,11 @@
#include "config.h"
#include "DragClientImpl.h"
#include "DragImageRef.h"
#include "ChromiumDataObject.h"
#include "ClipboardChromium.h"
#include "Frame.h"
#include "NativeImageSkia.h"
#include "WebCommon.h"
#include "WebDragData.h"
#include "WebImage.h"
#include "WebViewClient.h"
#include "WebViewImpl.h"
......@@ -84,19 +81,8 @@ void DragClientImpl::startDrag(DragImageRef dragImage,
DragOperation dragOperationMask = clipboard->sourceOperation();
IntSize offsetSize(eventPos - dragImageOrigin);
WebPoint offsetPoint(offsetSize.width(), offsetSize.height());
#if WEBKIT_USING_SKIA
m_webView->startDragging(
dragData, static_cast<WebDragOperationsMask>(dragOperationMask),
WebImage(*dragImage), offsetPoint);
#else
// FIXME: When DragImageRef is implemented for CG, we can probably just remove
// this #if fork. For now, pass an empty image.
m_webView->startDragging(
dragData, static_cast<WebDragOperationsMask>(dragOperationMask),
WebImage(), WebPoint());
#endif
eventPos, dragData, static_cast<WebDragOperationsMask>(dragOperationMask));
}
DragImageRef DragClientImpl::createDragImageForLink(KURL&, const String& label, Frame*)
......
......@@ -87,7 +87,6 @@
#include "WebDevToolsAgentPrivate.h"
#include "WebDragData.h"
#include "WebFrameImpl.h"
#include "WebImage.h"
#include "WebInputEvent.h"
#include "WebInputEventConversion.h"
#include "WebMediaPlayerAction.h"
......@@ -1933,16 +1932,15 @@ bool WebViewImpl::navigationPolicyFromMouseEvent(unsigned short button,
return true;
}
void WebViewImpl::startDragging(const WebDragData& dragData,
WebDragOperationsMask mask,
const WebImage& dragImage,
const WebPoint& dragImageOffset)
void WebViewImpl::startDragging(const WebPoint& eventPos,
const WebDragData& dragData,
WebDragOperationsMask mask)
{
if (!m_client)
return;
ASSERT(!m_doingDragAndDrop);
m_doingDragAndDrop = true;
m_client->startDragging(dragData, mask, dragImage, dragImageOffset);
m_client->startDragging(eventPos, dragData, mask);
}
void WebViewImpl::setCurrentHistoryItem(HistoryItem* item)
......
......@@ -74,7 +74,6 @@ class SuggestionsPopupMenuClient;
class WebAccessibilityObject;
class WebDevToolsAgentPrivate;
class WebFrameImpl;
class WebImage;
class WebKeyboardEvent;
class WebMouseEvent;
class WebMouseWheelEvent;
......@@ -275,10 +274,9 @@ public:
// Start a system drag and drop operation.
void startDragging(
const WebPoint& eventPos,
const WebDragData& dragData,
WebDragOperationsMask mask,
const WebImage& dragImage,
const WebPoint& dragImageOffset);
WebDragOperationsMask dragSourceOperationMask);
void suggestionsPopupDidHide()
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment