Changeset 211597 in webkit


Ignore:
Timestamp:
Feb 2, 2017 3:03:38 PM (7 years ago)
Author:
Wenson Hsieh
Message:

Drag images should be anchored to the mouse location
https://bugs.webkit.org/show_bug.cgi?id=167690
<rdar://problem/30295261>

Reviewed by Enrica Casucci.

Source/WebCore:

Adds logic to compute the mouse anchor point. This is a point in the unit square indicating where the drag
origin is relative to the bounds of the drag image. There is no behavior change, since this anchor point is not
used by any client yet; this patch only computes and vends this information from WebCore.

  • loader/EmptyClients.cpp:
  • page/DragClient.h:
  • page/DragController.cpp:

(WebCore::DragController::startDrag):
(WebCore::DragController::doImageDrag):
(WebCore::DragController::doSystemDrag):

  • page/DragController.h:
  • platform/DragImage.h:

Source/WebKit/mac:

Adds some plumbing for the anchor point in the WK1 client layer.

  • WebCoreSupport/WebDragClient.h:
  • WebCoreSupport/WebDragClient.mm:

(WebDragClient::startDrag):

Source/WebKit/win:

Adds some plumbing for the anchor point in the WK1 client layer.

  • WebCoreSupport/WebDragClient.cpp:

(WebDragClient::startDrag):

  • WebCoreSupport/WebDragClient.h:

Source/WebKit2:

Adds some plumbing for the mouse anchor point in the UI process. Additionally, refactors some unrelated code
for handling data interaction.

  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::startDataInteractionWithImage):

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/mac/PageClientImpl.h:
  • UIProcess/mac/PageClientImpl.mm:

(WebKit::PageClientImpl::startDataInteractionWithImage):

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::setDragImage):

  • WebProcess/WebCoreSupport/WebDragClient.cpp:

(WebKit::WebDragClient::startDrag):

  • WebProcess/WebCoreSupport/WebDragClient.h:
  • WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:

(WebKit::WebDragClient::startDrag):

Location:
trunk/Source
Files:
26 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r211596 r211597  
     12017-02-02  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        Drag images should be anchored to the mouse location
     4        https://bugs.webkit.org/show_bug.cgi?id=167690
     5        <rdar://problem/30295261>
     6
     7        Reviewed by Enrica Casucci.
     8
     9        Adds logic to compute the mouse anchor point. This is a point in the unit square indicating where the drag
     10        origin is relative to the bounds of the drag image. There is no behavior change, since this anchor point is not
     11        used by any client yet; this patch only computes and vends this information from WebCore.
     12
     13        * loader/EmptyClients.cpp:
     14        * page/DragClient.h:
     15        * page/DragController.cpp:
     16        (WebCore::DragController::startDrag):
     17        (WebCore::DragController::doImageDrag):
     18        (WebCore::DragController::doSystemDrag):
     19        * page/DragController.h:
     20        * platform/DragImage.h:
     21
    1222017-02-02  Eric Carlson  <eric.carlson@apple.com>
    223
  • trunk/Source/WebCore/loader/EmptyClients.cpp

    r211402 r211597  
    131131    DragDestinationAction actionMaskForDrag(const DragData&) final { return DragDestinationActionNone; }
    132132    DragSourceAction dragSourceActionMaskForPoint(const IntPoint&) final { return DragSourceActionNone; }
    133     void startDrag(DragImageRef, const IntPoint&, const IntPoint&, DataTransfer&, Frame&, bool) final { }
     133    void startDrag(DragImageRef, const IntPoint&, const IntPoint&, const FloatPoint&, DataTransfer&, Frame&, bool) final { }
    134134    void dragControllerDestroyed() final { }
    135135};
  • trunk/Source/WebCore/page/DragClient.h

    r208904 r211597  
    2828#include "DragActions.h"
    2929#include "DragImage.h"
     30#include "FloatPoint.h"
    3031#include "IntPoint.h"
    3132
     
    4748    virtual DragSourceAction dragSourceActionMaskForPoint(const IntPoint& rootViewPoint) = 0;
    4849   
    49     virtual void startDrag(DragImageRef, const IntPoint& dragImageOrigin, const IntPoint& eventPos, DataTransfer&, Frame&, bool linkDrag = false) = 0;
     50    virtual void startDrag(DragImageRef, const IntPoint& dragImageOrigin, const IntPoint& eventPos, const FloatPoint& dragImageAnchor, DataTransfer&, Frame&, bool linkDrag = false) = 0;
    5051    virtual void dragEnded() { }
    5152
  • trunk/Source/WebCore/page/DragController.cpp

    r211377 r211597  
    3333#include "CachedImage.h"
    3434#include "CachedResourceLoader.h"
     35#include "ClientRect.h"
    3536#include "DataTransfer.h"
    3637#include "Document.h"
     
    7778#include "htmlediting.h"
    7879#include "markup.h"
     80
     81#if ENABLE(DATA_INTERACTION)
     82#include "SelectionRect.h"
     83#endif
     84
    7985#include <wtf/CurrentTime.h>
    8086#include <wtf/RefPtr.h>
     
    811817    Element& element = *state.source;
    812818
     819    IntRect dragImageBounds;
    813820    Image* image = getImage(element);
    814821    if (state.type == DragSourceActionSelection) {
     
    818825            RefPtr<Range> selectionRange = src.selection().toNormalizedRange();
    819826            ASSERT(selectionRange);
     827
     828#if ENABLE(DATA_INTERACTION)
     829            Vector<SelectionRect> selectionRects;
     830            selectionRange->collectSelectionRects(selectionRects);
     831            for (auto selectionRect : selectionRects)
     832                dragImageBounds.unite(selectionRect.rect());
     833            dragImageBounds.inflate(SelectionDragImagePadding);
     834#endif
    820835
    821836            src.editor().willWriteSelectionToPasteboard(selectionRange.get());
     
    844859            return false;
    845860
    846         doSystemDrag(dragImage, dragLoc, dragOrigin, dataTransfer, src, false);
     861        doSystemDrag(dragImage, dragLoc, dragOrigin, dragImageBounds, dataTransfer, src, false);
    847862    } else if (!src.document()->securityOrigin().canDisplay(linkURL)) {
    848863        src.document()->addConsoleMessage(MessageSource::Security, MessageLevel::Error, "Not allowed to drag local resource: " + linkURL.stringCenterEllipsizedToLength());
     
    867882        } else {
    868883            // DHTML defined drag image
    869             doSystemDrag(dragImage, dragLoc, dragOrigin, dataTransfer, src, false);
     884            doSystemDrag(dragImage, dragLoc, dragOrigin, { }, dataTransfer, src, false);
    870885        }
    871886    } else if (!linkURL.isEmpty() && (m_dragSourceAction & DragSourceActionLink)) {
     
    903918            dragImage = scaleDragImage(dragImage, FloatSize(m_page.deviceScaleFactor(), m_page.deviceScaleFactor()));
    904919        }
    905         doSystemDrag(dragImage, dragLoc, mouseDraggedPoint, dataTransfer, src, true);
     920        doSystemDrag(dragImage, dragLoc, mouseDraggedPoint, { }, dataTransfer, src, true);
    906921#if ENABLE(ATTACHMENT_ELEMENT)
    907922    } else if (!attachmentURL.isEmpty() && (m_dragSourceAction & DragSourceActionAttachment)) {
     
    919934            m_dragOffset = IntPoint(dragOrigin.x() - dragLoc.x(), dragOrigin.y() - dragLoc.y());
    920935        }
    921         doSystemDrag(dragImage, dragLoc, dragOrigin, dataTransfer, src, false);
     936        doSystemDrag(dragImage, dragLoc, dragOrigin, { }, dataTransfer, src, false);
    922937#endif
    923938    } else if (state.type == DragSourceActionDHTML) {
     
    925940            ASSERT(m_dragSourceAction & DragSourceActionDHTML);
    926941            m_client.willPerformDragSourceAction(DragSourceActionDHTML, dragOrigin, dataTransfer);
    927             doSystemDrag(dragImage, dragLoc, dragOrigin, dataTransfer, src, false);
     942            doSystemDrag(dragImage, dragLoc, dragOrigin, { }, dataTransfer, src, false);
    928943        } else
    929944            startedDrag = false;
     
    982997
    983998    dragImageOffset = mouseDownPoint + scaledOrigin;
    984     doSystemDrag(dragImage, dragImageOffset, dragOrigin, dataTransfer, frame, false);
     999    doSystemDrag(dragImage, dragImageOffset, dragOrigin, element.boundsInRootViewSpace(), dataTransfer, frame, false);
    9851000
    9861001    deleteDragImage(dragImage);
    9871002}
    9881003
    989 void DragController::doSystemDrag(DragImageRef image, const IntPoint& dragLoc, const IntPoint& eventPos, DataTransfer& dataTransfer, Frame& frame, bool forLink)
    990 {
     1004void DragController::doSystemDrag(DragImageRef image, const IntPoint& dragLoc, const IntPoint& eventPos, const IntRect& dragImageBounds, DataTransfer& dataTransfer, Frame& frame, bool forLink)
     1005{
     1006    FloatPoint dragImageAnchor = { 0.5, 0.5 };
     1007    if (!dragImageBounds.isEmpty()) {
     1008        dragImageAnchor.setX((eventPos.x() - dragImageBounds.x()) / (float)dragImageBounds.width());
     1009        dragImageAnchor.setY((eventPos.y() - dragImageBounds.y()) / (float)dragImageBounds.height());
     1010    }
     1011
    9911012    m_didInitiateDrag = true;
    9921013    m_dragInitiator = frame.document();
     
    9941015    Ref<MainFrame> frameProtector(m_page.mainFrame());
    9951016    RefPtr<FrameView> viewProtector = frameProtector->view();
    996     m_client.startDrag(image, viewProtector->rootViewToContents(frame.view()->contentsToRootView(dragLoc)),
    997         viewProtector->rootViewToContents(frame.view()->contentsToRootView(eventPos)), dataTransfer, frameProtector.get(), forLink);
     1017    m_client.startDrag(image, viewProtector->rootViewToContents(frame.view()->contentsToRootView(dragLoc)), viewProtector->rootViewToContents(frame.view()->contentsToRootView(eventPos)), dragImageAnchor, dataTransfer, frameProtector.get(), forLink);
    9981018    // DragClient::startDrag can cause our Page to dispear, deallocating |this|.
    9991019    if (!frameProtector->page())
  • trunk/Source/WebCore/page/DragController.h

    r208904 r211597  
    2929#include "DragImage.h"
    3030#include "IntPoint.h"
     31#include "IntRect.h"
    3132#include "URL.h"
    3233
     
    112113
    113114        void doImageDrag(Element&, const IntPoint&, const IntRect&, DataTransfer&, Frame&, IntPoint&);
    114         void doSystemDrag(DragImageRef, const IntPoint&, const IntPoint&, DataTransfer&, Frame&, bool forLink);
     115        void doSystemDrag(DragImageRef, const IntPoint&, const IntPoint&, const IntRect& dragImageBounds, DataTransfer&, Frame&, bool forLink);
    115116        void cleanupAfterSystemDrag();
    116117        void declareAndWriteDragImage(DataTransfer&, Element&, const URL&, const String& label);
  • trunk/Source/WebCore/platform/DragImage.h

    r204717 r211597  
    6868#endif
    6969
     70#if PLATFORM(COCOA)
     71static const float SelectionDragImagePadding = 15;
     72#endif
     73
    7074IntSize dragImageSize(DragImageRef);
    7175
  • trunk/Source/WebKit/mac/ChangeLog

    r211591 r211597  
     12017-02-02  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        Drag images should be anchored to the mouse location
     4        https://bugs.webkit.org/show_bug.cgi?id=167690
     5        <rdar://problem/30295261>
     6
     7        Reviewed by Enrica Casucci.
     8
     9        Adds some plumbing for the anchor point in the WK1 client layer.
     10
     11        * WebCoreSupport/WebDragClient.h:
     12        * WebCoreSupport/WebDragClient.mm:
     13        (WebDragClient::startDrag):
     14
    1152017-02-02  Chris Dumez  <cdumez@apple.com>
    216
  • trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.h

    r208904 r211597  
    3838    void dragControllerDestroyed() override;
    3939    WebCore::DragSourceAction dragSourceActionMaskForPoint(const WebCore::IntPoint& windowPoint) override;
    40     void startDrag(WebCore::DragImageRef, const WebCore::IntPoint& dragPos, const WebCore::IntPoint& eventPos, WebCore::DataTransfer&, WebCore::Frame&, bool linkDrag) override;
     40    void startDrag(WebCore::DragImageRef, const WebCore::IntPoint& dragPos, const WebCore::IntPoint& eventPos, const WebCore::FloatPoint&, WebCore::DataTransfer&, WebCore::Frame&, bool linkDrag) override;
    4141    void declareAndWriteDragImage(const String& pasteboardName, WebCore::Element&, const WebCore::URL&, const String&, WebCore::Frame*) override;
    4242#if ENABLE(ATTACHMENT_ELEMENT)
  • trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.mm

    r211323 r211597  
    9696}
    9797
    98 void WebDragClient::startDrag(DragImageRef dragImage, const IntPoint& at, const IntPoint& eventPos, DataTransfer& dataTransfer, Frame& frame, bool linkDrag)
     98void WebDragClient::startDrag(DragImageRef dragImage, const IntPoint& at, const IntPoint& eventPos, const FloatPoint&, DataTransfer& dataTransfer, Frame& frame, bool linkDrag)
    9999{
    100100    RetainPtr<WebHTMLView> htmlView = (WebHTMLView*)[[kit(&frame) frameView] documentView];
     
    166166}
    167167
    168 void WebDragClient::startDrag(DragImageRef, const IntPoint&, const IntPoint&, DataTransfer&, Frame&, bool)
     168void WebDragClient::startDrag(DragImageRef, const IntPoint&, const IntPoint&, const FloatPoint&, DataTransfer&, Frame&, bool)
    169169{
    170170}
  • trunk/Source/WebKit/win/ChangeLog

    r211584 r211597  
     12017-02-02  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        Drag images should be anchored to the mouse location
     4        https://bugs.webkit.org/show_bug.cgi?id=167690
     5        <rdar://problem/30295261>
     6
     7        Reviewed by Enrica Casucci.
     8
     9        Adds some plumbing for the anchor point in the WK1 client layer.
     10
     11        * WebCoreSupport/WebDragClient.cpp:
     12        (WebDragClient::startDrag):
     13        * WebCoreSupport/WebDragClient.h:
     14
    1152017-02-02  Per Arne Vollan  <pvollan@apple.com>
    216
  • trunk/Source/WebKit/win/WebCoreSupport/WebDragClient.cpp

    r208904 r211597  
    111111}
    112112
    113 void WebDragClient::startDrag(DragImageRef image, const IntPoint& imageOrigin, const IntPoint& dragPoint, DataTransfer& dataTransfer, Frame& frame, bool isLink)
     113void WebDragClient::startDrag(DragImageRef image, const IntPoint& imageOrigin, const IntPoint& dragPoint, const FloatPoint&, DataTransfer& dataTransfer, Frame& frame, bool isLink)
    114114{
    115115    //FIXME: Allow UIDelegate to override behaviour <rdar://problem/5015953>
  • trunk/Source/WebKit/win/WebCoreSupport/WebDragClient.h

    r208904 r211597  
    4040    virtual void willPerformDragDestinationAction(WebCore::DragDestinationAction, const WebCore::DragData&);
    4141    virtual void willPerformDragSourceAction(WebCore::DragSourceAction, const WebCore::IntPoint&, WebCore::DataTransfer&);
    42     virtual void startDrag(WebCore::DragImageRef, const WebCore::IntPoint&, const WebCore::IntPoint&, WebCore::DataTransfer&, WebCore::Frame&, bool);
     42    virtual void startDrag(WebCore::DragImageRef, const WebCore::IntPoint&, const WebCore::IntPoint&, const WebCore::FloatPoint&, WebCore::DataTransfer&, WebCore::Frame&, bool);
    4343
    4444private:
  • trunk/Source/WebKit2/ChangeLog

    r211589 r211597  
     12017-02-02  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        Drag images should be anchored to the mouse location
     4        https://bugs.webkit.org/show_bug.cgi?id=167690
     5        <rdar://problem/30295261>
     6
     7        Reviewed by Enrica Casucci.
     8
     9        Adds some plumbing for the mouse anchor point in the UI process. Additionally, refactors some unrelated code
     10        for handling data interaction.
     11
     12        * UIProcess/PageClient.h:
     13        * UIProcess/WebPageProxy.h:
     14        * UIProcess/WebPageProxy.messages.in:
     15        * UIProcess/ios/PageClientImplIOS.h:
     16        * UIProcess/ios/PageClientImplIOS.mm:
     17        (WebKit::PageClientImpl::startDataInteractionWithImage):
     18        * UIProcess/ios/WKContentViewInteraction.h:
     19        * UIProcess/mac/PageClientImpl.h:
     20        * UIProcess/mac/PageClientImpl.mm:
     21        (WebKit::PageClientImpl::startDataInteractionWithImage):
     22        * UIProcess/mac/WebPageProxyMac.mm:
     23        (WebKit::WebPageProxy::setDragImage):
     24        * WebProcess/WebCoreSupport/WebDragClient.cpp:
     25        (WebKit::WebDragClient::startDrag):
     26        * WebProcess/WebCoreSupport/WebDragClient.h:
     27        * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
     28        (WebKit::WebDragClient::startDrag):
     29
    1302017-02-02  Commit Queue  <commit-queue@webkit.org>
    231
  • trunk/Source/WebKit2/UIProcess/PageClient.h

    r211199 r211597  
    384384#if ENABLE(DATA_INTERACTION)
    385385    virtual void didPerformDataInteractionControllerOperation() = 0;
    386     virtual void startDataInteractionWithImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& image, bool isLink) = 0;
     386    virtual void startDataInteractionWithImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& image, const WebCore::FloatPoint& anchorPoint, bool isLink) = 0;
    387387#endif
    388388};
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.h

    r211376 r211597  
    836836    void dragEnded(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition, uint64_t operation);
    837837#if PLATFORM(COCOA)
    838     void setDragImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& dragImageHandle, bool isLinkDrag);
     838    void setDragImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& dragImageHandle, const WebCore::FloatPoint& dragImageAnchor, bool isLinkDrag);
    839839    void setPromisedDataForImage(const String& pasteboardName, const SharedMemory::Handle& imageHandle, uint64_t imageSize, const String& filename, const String& extension,
    840840                         const String& title, const String& url, const String& visibleURL, const SharedMemory::Handle& archiveHandle, uint64_t archiveSize);
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in

    r211376 r211597  
    308308#endif
    309309#if PLATFORM(COCOA) && ENABLE(DRAG_SUPPORT)
    310     SetDragImage(WebCore::IntPoint clientPosition, WebKit::ShareableBitmap::Handle dragImage, bool linkDrag)
     310    SetDragImage(WebCore::IntPoint clientPosition, WebKit::ShareableBitmap::Handle dragImage, WebCore::FloatPoint dragImageAnchor, bool linkDrag)
    311311    SetPromisedDataForImage(String pasteboardName, WebKit::SharedMemory::Handle imageHandle, uint64_t imageSize, String filename, String extension, String title, String url, String visibleURL, WebKit::SharedMemory::Handle archiveHandle, uint64_t archiveSize)
    312312#if ENABLE(ATTACHMENT_ELEMENT)
  • trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h

    r211329 r211597  
    204204#if ENABLE(DATA_INTERACTION)
    205205    void didPerformDataInteractionControllerOperation() override;
    206     void startDataInteractionWithImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& image, bool isLink) override;
     206    void startDataInteractionWithImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& image, const WebCore::FloatPoint& anchorPoint, bool isLink) override;
    207207#endif
    208208
  • trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm

    r211329 r211597  
    769769}
    770770
    771 void PageClientImpl::startDataInteractionWithImage(const IntPoint& clientPosition, const ShareableBitmap::Handle& image, bool isLink)
    772 {
    773     [m_contentView _startDataInteractionWithImage:ShareableBitmap::create(image)->makeCGImageCopy() atClientPosition:CGPointMake(clientPosition.x(), clientPosition.y()) isLink:isLink];
     771void PageClientImpl::startDataInteractionWithImage(const IntPoint& clientPosition, const ShareableBitmap::Handle& image, const FloatPoint& anchorPoint, bool isLink)
     772{
     773    [m_contentView _startDataInteractionWithImage:ShareableBitmap::create(image)->makeCGImageCopy() atClientPosition:CGPointMake(clientPosition.x(), clientPosition.y()) anchorPoint:anchorPoint isLink:isLink];
    774774}
    775775#endif
  • trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h

    r211547 r211597  
    253253#if ENABLE(DATA_INTERACTION)
    254254- (void)_didPerformDataInteractionControllerOperation;
    255 - (void)_startDataInteractionWithImage:(RetainPtr<CGImageRef>)image atClientPosition:(CGPoint)clientPosition isLink:(BOOL)isLink;
     255- (void)_startDataInteractionWithImage:(RetainPtr<CGImageRef>)image atClientPosition:(CGPoint)clientPosition anchorPoint:(CGPoint)anchorPoint isLink:(BOOL)isLink;
    256256#endif
    257257
  • trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h

    r211199 r211597  
    235235#if ENABLE(DATA_INTERACTION)
    236236    void didPerformDataInteractionControllerOperation() override;
    237     void startDataInteractionWithImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& image, bool isLink) override;
     237    void startDataInteractionWithImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& image, const WebCore::FloatPoint& anchorPoint, bool isLink) override;
    238238#endif
    239239
  • trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm

    r211199 r211597  
    882882}
    883883
    884 void PageClientImpl::startDataInteractionWithImage(const IntPoint&, const ShareableBitmap::Handle&, bool)
     884void PageClientImpl::startDataInteractionWithImage(const IntPoint&, const ShareableBitmap::Handle&, const FloatPoint&, bool)
    885885{
    886886    // FIXME: Implement me.
  • trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm

    r208415 r211597  
    270270
    271271#if ENABLE(DRAG_SUPPORT)
    272 void WebPageProxy::setDragImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& dragImageHandle, bool isLinkDrag)
     272void WebPageProxy::setDragImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& dragImageHandle, const FloatPoint&, bool isLinkDrag)
    273273{
    274274    if (auto dragImage = ShareableBitmap::create(dragImageHandle))
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.cpp

    r208904 r211597  
    5858
    5959#if !PLATFORM(COCOA) && !PLATFORM(GTK)
    60 void WebDragClient::startDrag(DragImageRef, const IntPoint&, const IntPoint&, DataTransfer&, Frame&, bool)
     60void WebDragClient::startDrag(DragImageRef, const IntPoint&, const IntPoint&, const FloatPoint&, DataTransfer&, Frame&, bool)
    6161{
    6262}
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.h

    r208904 r211597  
    4848    WebCore::DragSourceAction dragSourceActionMaskForPoint(const WebCore::IntPoint& windowPoint) override;
    4949
    50     void startDrag(WebCore::DragImageRef, const WebCore::IntPoint& dragImageOrigin, const WebCore::IntPoint& eventPos, WebCore::DataTransfer&, WebCore::Frame&, bool linkDrag = false) override;
     50    void startDrag(WebCore::DragImageRef, const WebCore::IntPoint& dragImageOrigin, const WebCore::IntPoint& eventPos, const WebCore::FloatPoint& dragImageAnchor, WebCore::DataTransfer&, WebCore::Frame&, bool linkDrag = false) override;
    5151
    5252#if PLATFORM(COCOA)
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp

    r206256 r211597  
    5757}
    5858
    59 void WebDragClient::startDrag(DragImageRef dragImage, const IntPoint& clientPosition, const IntPoint& globalPosition, DataTransfer& dataTransfer, Frame&, bool)
     59void WebDragClient::startDrag(DragImageRef dragImage, const IntPoint& clientPosition, const IntPoint& globalPosition, const FloatPoint&, DataTransfer& dataTransfer, Frame&, bool)
    6060{
    6161    RefPtr<ShareableBitmap> bitmap = convertCairoSurfaceToShareableBitmap(dragImage);
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm

    r211547 r211597  
    8181}
    8282
    83 void WebDragClient::startDrag(RetainPtr<NSImage> image, const IntPoint& point, const IntPoint&, DataTransfer&, Frame& frame, bool linkDrag)
     83void WebDragClient::startDrag(RetainPtr<NSImage> image, const IntPoint& point, const IntPoint&, const FloatPoint&, DataTransfer&, Frame& frame, bool linkDrag)
    8484{
    8585    IntSize bitmapSize([image size]);
     
    9292
    9393    // FIXME: Seems this message should be named StartDrag, not SetDragImage.
    94     m_page->send(Messages::WebPageProxy::SetDragImage(frame.view()->contentsToWindow(point), handle, linkDrag));
     94    m_page->send(Messages::WebPageProxy::SetDragImage(frame.view()->contentsToWindow(point), handle, { }, linkDrag));
    9595}
    9696
Note: See TracChangeset for help on using the changeset viewer.