| Differences between
and this patch
- a/Source/WebCore/ChangeLog +66 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2017-04-15  Wenson Hsieh  <wenson_hsieh@apple.com>
2
3
        [WK2] Support DataTransfer::files() when performing a DHTML data interaction
4
        https://bugs.webkit.org/show_bug.cgi?id=170880
5
        <rdar://problem/31314689>
6
7
        Reviewed by Tim Horton.
8
9
        Adds support for fetching files from the DataTransfer when performing a data interaction operation handled by
10
        JavaScript. There are two changes we make here to achieve this:
11
12
        First, we teach the Pasteboard on iOS to know what file paths hold the item provider contents used in the
13
        current data interaction operation. On iOS, Pasteboard::readFilenames is currently hard-coded to return an empty
14
        vector. To fix this, we add logic to the iOS Pasteboard to remember what the paths of all files that were
15
        successfully loaded from item providers as the data interaction is taking place. This ensures that at the
16
        WebCore layer, the implementation of Pasteboard::readFilenames on Mac and iOS is similar -- they both call out
17
        to the client layer in order to read file paths off of their respective pasteboards. Once in the client layer
18
        (WebKit1 or WebKit2) we then call into PlatformPasteboard::filenamesForDataInteraction, which then calls into
19
        WebItemProviderPasteboard if applicable.
20
21
        The second tweak is to propagate information about whether the document is preventing default data interaction
22
        behavior to the client layer. This prevents us from having to save pasteboard content when performing data
23
        interaction in cases where file information is not needed (i.e. the default behavior is being performed, and
24
        the target is not a file input). This also avoids compatibility issues with insertion animations when performing
25
        data interaction in editable areas, due to the extra time spent loading item provider data into a temporary
26
        file.
27
28
        Unit tests in <https://bugs.webkit.org/show_bug.cgi?id=170903>.
29
30
        * page/DragController.cpp:
31
        (WebCore::DragController::DragController):
32
        (WebCore::DragController::performDragOperation):
33
        (WebCore::DragController::dragEnteredOrUpdated):
34
        (WebCore::DragController::tryDocumentDrag):
35
36
        Refactor DragController::tryDocumentDrag to return a DragHandlingMethod. This method currently returns either
37
        true or false; this patch changes it to return a DragHandlingMethod, which is either None (the equivalent of
38
        returning false before the patch), Default (indicating that the drop destination is allowing default handling),
39
        or NonDefault, which indicates that the drop destination has explicitly prevented default.
40
41
        * page/DragController.h:
42
        (WebCore::DragController::documentIsHandlingNonDefaultDrag):
43
44
        Used by WebPage when sending an IPC response after handling dragentered or dragupdated.
45
46
        * platform/PasteboardStrategy.h:
47
        * platform/PlatformPasteboard.h:
48
        * platform/ios/AbstractPasteboard.h:
49
        * platform/ios/PasteboardIOS.mm:
50
        (WebCore::Pasteboard::readFilenames):
51
        * platform/ios/PlatformPasteboardIOS.mm:
52
        (WebCore::PlatformPasteboard::filenamesForDataInteraction):
53
        * platform/ios/WebItemProviderPasteboard.h:
54
        * platform/ios/WebItemProviderPasteboard.mm:
55
56
        WebItemProviderPasteboard now remembers the file URLs of successfully loaded item provider content when a data
57
        interaction is being performed. The new filenamesForDataInteraction property returns the array of data
58
        interaction file URLs which have been propagated to the web process along with sandbox extensions. This state
59
        is cleaned up when list of item providers change (i.e. when the data interaction operation is finished, or if
60
        the web content process crashes, etc.)
61
62
        (-[WebItemProviderPasteboard init]):
63
        (-[WebItemProviderPasteboard setItemProviders:]):
64
        (-[WebItemProviderPasteboard filenamesForDataInteraction]):
65
        (-[WebItemProviderPasteboard doAfterLoadingProvidedContentIntoFileURLs:]):
66
1
2017-04-18  Dean Jackson  <dino@apple.com>
67
2017-04-18  Dean Jackson  <dino@apple.com>
2
68
3
        Update ANGLE
69
        Update ANGLE
- a/Source/WebKit/mac/ChangeLog +14 lines
Lines 1-3 a/Source/WebKit/mac/ChangeLog_sec1
1
2017-04-15  Wenson Hsieh  <wenson_hsieh@apple.com>
2
3
        [WK2] Support DataTransfer::files() when performing a DHTML data interaction
4
        https://bugs.webkit.org/show_bug.cgi?id=170880
5
        <rdar://problem/31314689>
6
7
        Reviewed by Tim Horton.
8
9
        Adjust for a change in PasteboardStrategy. See WebCore ChangeLog for more details.
10
11
        * WebCoreSupport/WebPlatformStrategies.h:
12
        * WebCoreSupport/WebPlatformStrategies.mm:
13
        (WebPlatformStrategies::getFilenamesForDataInteraction):
14
1
2017-04-17  Youenn Fablet  <youenn@apple.com>
15
2017-04-17  Youenn Fablet  <youenn@apple.com>
2
16
3
        Disable outdated WritableStream API
17
        Disable outdated WritableStream API
- a/Source/WebKit2/ChangeLog +32 lines
Lines 1-3 a/Source/WebKit2/ChangeLog_sec1
1
2017-04-15  Wenson Hsieh  <wenson_hsieh@apple.com>
2
3
        [WK2] Support DataTransfer::files() when performing a DHTML data interaction
4
        https://bugs.webkit.org/show_bug.cgi?id=170880
5
        <rdar://problem/31314689>
6
7
        Reviewed by Tim Horton.
8
9
        See the WebCore ChangeLog for more details.
10
11
        * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
12
        (WebKit::WebPasteboardProxy::getFilenamesForDataInteraction):
13
        * UIProcess/WebPageProxy.cpp:
14
        (WebKit::WebPageProxy::didPerformDragControllerAction):
15
        (WebKit::WebPageProxy::resetCurrentDragInformation):
16
        * UIProcess/WebPageProxy.h:
17
        (WebKit::WebPageProxy::documentIsHandlingNonDefaultDrag):
18
        * UIProcess/WebPageProxy.messages.in:
19
20
        Adds an IPC argument to DidPerformDragControllerAction specifying whether the page prevented the default behavior.
21
22
        * UIProcess/WebPasteboardProxy.h:
23
        * UIProcess/WebPasteboardProxy.messages.in:
24
25
        Adds IPC plumbing for the new filenamesForDataInteraction Pasteboard codepath.
26
27
        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
28
        (WebKit::WebPlatformStrategies::getFilenamesForDataInteraction):
29
        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
30
        * WebProcess/WebPage/WebPage.cpp:
31
        (WebKit::WebPage::performDragControllerAction):
32
1
2017-04-18  John Wilander  <wilander@apple.com>
33
2017-04-18  John Wilander  <wilander@apple.com>
2
34
3
        Resource Load Statistics: Check both origins and cookieHostNames for domain matches in data removal
35
        Resource Load Statistics: Check both origins and cookieHostNames for domain matches in data removal
- a/Source/WebCore/page/DragController.cpp -14 / +14 lines
Lines 119-125 DragController::DragController(Page& page, DragClient& client) a/Source/WebCore/page/DragController.cpp_sec1
119
    : m_page(page)
119
    : m_page(page)
120
    , m_client(client)
120
    , m_client(client)
121
    , m_numberOfItemsToBeAccepted(0)
121
    , m_numberOfItemsToBeAccepted(0)
122
    , m_documentIsHandlingDrag(false)
122
    , m_documentDragHandlingMethod(DragHandlingMethod::None)
123
    , m_dragDestinationAction(DragDestinationActionNone)
123
    , m_dragDestinationAction(DragDestinationActionNone)
124
    , m_dragSourceAction(DragSourceActionNone)
124
    , m_dragSourceAction(DragSourceActionNone)
125
    , m_didInitiateDrag(false)
125
    , m_didInitiateDrag(false)
Lines 228-234 bool DragController::performDragOperation(const DragData& dragData) a/Source/WebCore/page/DragController.cpp_sec2
228
    if (m_documentUnderMouse)
228
    if (m_documentUnderMouse)
229
        shouldOpenExternalURLsPolicy = m_documentUnderMouse->shouldOpenExternalURLsPolicyToPropagate();
229
        shouldOpenExternalURLsPolicy = m_documentUnderMouse->shouldOpenExternalURLsPolicyToPropagate();
230
230
231
    if ((m_dragDestinationAction & DragDestinationActionDHTML) && m_documentIsHandlingDrag) {
231
    if ((m_dragDestinationAction & DragDestinationActionDHTML) && m_documentDragHandlingMethod != DragHandlingMethod::None) {
232
        m_client.willPerformDragDestinationAction(DragDestinationActionDHTML, dragData);
232
        m_client.willPerformDragDestinationAction(DragDestinationActionDHTML, dragData);
233
        Ref<MainFrame> mainFrame(m_page.mainFrame());
233
        Ref<MainFrame> mainFrame(m_page.mainFrame());
234
        bool preventedDefault = false;
234
        bool preventedDefault = false;
Lines 288-295 DragOperation DragController::dragEnteredOrUpdated(const DragData& dragData) a/Source/WebCore/page/DragController.cpp_sec3
288
    }
288
    }
289
289
290
    DragOperation dragOperation = DragOperationNone;
290
    DragOperation dragOperation = DragOperationNone;
291
    m_documentIsHandlingDrag = tryDocumentDrag(dragData, m_dragDestinationAction, dragOperation);
291
    m_documentDragHandlingMethod = tryDocumentDrag(dragData, m_dragDestinationAction, dragOperation);
292
    if (!m_documentIsHandlingDrag && (m_dragDestinationAction & DragDestinationActionLoad))
292
    if (m_documentDragHandlingMethod == DragHandlingMethod::None && (m_dragDestinationAction & DragDestinationActionLoad))
293
        dragOperation = operationForLoad(dragData);
293
        dragOperation = operationForLoad(dragData);
294
    return dragOperation;
294
    return dragOperation;
295
}
295
}
Lines 329-341 static Element* elementUnderMouse(Document* documentUnderMouse, const IntPoint& a/Source/WebCore/page/DragController.cpp_sec4
329
    return downcast<Element>(node);
329
    return downcast<Element>(node);
330
}
330
}
331
331
332
bool DragController::tryDocumentDrag(const DragData& dragData, DragDestinationAction actionMask, DragOperation& dragOperation)
332
DragController::DragHandlingMethod DragController::tryDocumentDrag(const DragData& dragData, DragDestinationAction actionMask, DragOperation& dragOperation)
333
{
333
{
334
    if (!m_documentUnderMouse)
334
    if (!m_documentUnderMouse)
335
        return false;
335
        return DragHandlingMethod::None;
336
336
337
    if (m_dragInitiator && !m_documentUnderMouse->securityOrigin().canReceiveDragData(m_dragInitiator->securityOrigin()))
337
    if (m_dragInitiator && !m_documentUnderMouse->securityOrigin().canReceiveDragData(m_dragInitiator->securityOrigin()))
338
        return false;
338
        return DragHandlingMethod::None;
339
339
340
    bool isHandlingDrag = false;
340
    bool isHandlingDrag = false;
341
    if (actionMask & DragDestinationActionDHTML) {
341
    if (actionMask & DragDestinationActionDHTML) {
Lines 346-375 bool DragController::tryDocumentDrag(const DragData& dragData, DragDestinationAc a/Source/WebCore/page/DragController.cpp_sec5
346
        // which could process dragleave event and reset m_documentUnderMouse in
346
        // which could process dragleave event and reset m_documentUnderMouse in
347
        // dragExited.
347
        // dragExited.
348
        if (!m_documentUnderMouse)
348
        if (!m_documentUnderMouse)
349
            return false;
349
            return DragHandlingMethod::None;
350
    }
350
    }
351
351
352
    // It's unclear why this check is after tryDHTMLDrag.
352
    // It's unclear why this check is after tryDHTMLDrag.
353
    // We send drag events in tryDHTMLDrag and that may be the reason.
353
    // We send drag events in tryDHTMLDrag and that may be the reason.
354
    RefPtr<FrameView> frameView = m_documentUnderMouse->view();
354
    RefPtr<FrameView> frameView = m_documentUnderMouse->view();
355
    if (!frameView)
355
    if (!frameView)
356
        return false;
356
        return DragHandlingMethod::None;
357
357
358
    if (isHandlingDrag) {
358
    if (isHandlingDrag) {
359
        clearDragCaret();
359
        clearDragCaret();
360
        return true;
360
        return DragHandlingMethod::NonDefault;
361
    }
361
    }
362
362
363
    if ((actionMask & DragDestinationActionEdit) && canProcessDrag(dragData)) {
363
    if ((actionMask & DragDestinationActionEdit) && canProcessDrag(dragData)) {
364
        if (dragData.containsColor()) {
364
        if (dragData.containsColor()) {
365
            dragOperation = DragOperationGeneric;
365
            dragOperation = DragOperationGeneric;
366
            return true;
366
            return DragHandlingMethod::Default;
367
        }
367
        }
368
368
369
        IntPoint point = frameView->windowToContents(dragData.clientPosition());
369
        IntPoint point = frameView->windowToContents(dragData.clientPosition());
370
        Element* element = elementUnderMouse(m_documentUnderMouse.get(), point);
370
        Element* element = elementUnderMouse(m_documentUnderMouse.get(), point);
371
        if (!element)
371
        if (!element)
372
            return false;
372
            return DragHandlingMethod::None;
373
        
373
        
374
        HTMLInputElement* elementAsFileInput = asFileInput(*element);
374
        HTMLInputElement* elementAsFileInput = asFileInput(*element);
375
        if (m_fileInputElementUnderMouse != elementAsFileInput) {
375
        if (m_fileInputElementUnderMouse != elementAsFileInput) {
Lines 407-413 bool DragController::tryDocumentDrag(const DragData& dragData, DragDestinationAc a/Source/WebCore/page/DragController.cpp_sec6
407
            m_numberOfItemsToBeAccepted = numberOfFiles != 1 ? 0 : 1;
407
            m_numberOfItemsToBeAccepted = numberOfFiles != 1 ? 0 : 1;
408
        }
408
        }
409
        
409
        
410
        return true;
410
        return DragHandlingMethod::Default;
411
    }
411
    }
412
    
412
    
413
    // We are not over an editable region. Make sure we're clearing any prior drag cursor.
413
    // We are not over an editable region. Make sure we're clearing any prior drag cursor.
Lines 415-421 bool DragController::tryDocumentDrag(const DragData& dragData, DragDestinationAc a/Source/WebCore/page/DragController.cpp_sec7
415
    if (m_fileInputElementUnderMouse)
415
    if (m_fileInputElementUnderMouse)
416
        m_fileInputElementUnderMouse->setCanReceiveDroppedFiles(false);
416
        m_fileInputElementUnderMouse->setCanReceiveDroppedFiles(false);
417
    m_fileInputElementUnderMouse = nullptr;
417
    m_fileInputElementUnderMouse = nullptr;
418
    return false;
418
    return DragHandlingMethod::None;
419
}
419
}
420
420
421
DragSourceAction DragController::delegateDragSourceAction(const IntPoint& rootViewPoint)
421
DragSourceAction DragController::delegateDragSourceAction(const IntPoint& rootViewPoint)
- a/Source/WebCore/page/DragController.h -2 / +4 lines
Lines 79-84 struct DragState; a/Source/WebCore/page/DragController.h_sec1
79
        const IntPoint& dragOffset() const { return m_dragOffset; }
79
        const IntPoint& dragOffset() const { return m_dragOffset; }
80
        DragSourceAction dragSourceAction() const { return m_dragSourceAction; }
80
        DragSourceAction dragSourceAction() const { return m_dragSourceAction; }
81
81
82
        enum class DragHandlingMethod { None, Default, NonDefault };
83
        bool documentIsHandlingNonDefaultDrag() const { return m_documentDragHandlingMethod == DragHandlingMethod::NonDefault; }
82
        Document* documentUnderMouse() const { return m_documentUnderMouse.get(); }
84
        Document* documentUnderMouse() const { return m_documentUnderMouse.get(); }
83
        DragDestinationAction dragDestinationAction() const { return m_dragDestinationAction; }
85
        DragDestinationAction dragDestinationAction() const { return m_dragDestinationAction; }
84
        DragSourceAction delegateDragSourceAction(const IntPoint& rootViewPoint);
86
        DragSourceAction delegateDragSourceAction(const IntPoint& rootViewPoint);
Lines 103-109 struct DragState; a/Source/WebCore/page/DragController.h_sec2
103
        bool concludeEditDrag(const DragData&);
105
        bool concludeEditDrag(const DragData&);
104
        DragOperation dragEnteredOrUpdated(const DragData&);
106
        DragOperation dragEnteredOrUpdated(const DragData&);
105
        DragOperation operationForLoad(const DragData&);
107
        DragOperation operationForLoad(const DragData&);
106
        bool tryDocumentDrag(const DragData&, DragDestinationAction, DragOperation&);
108
        DragHandlingMethod tryDocumentDrag(const DragData&, DragDestinationAction, DragOperation&);
107
        bool tryDHTMLDrag(const DragData&, DragOperation&);
109
        bool tryDHTMLDrag(const DragData&, DragOperation&);
108
        DragOperation dragOperation(const DragData&);
110
        DragOperation dragOperation(const DragData&);
109
        void clearDragCaret();
111
        void clearDragCaret();
Lines 130-136 struct DragState; a/Source/WebCore/page/DragController.h_sec3
130
        RefPtr<Document> m_dragInitiator; // The Document (if any) that initiated the drag.
132
        RefPtr<Document> m_dragInitiator; // The Document (if any) that initiated the drag.
131
        RefPtr<HTMLInputElement> m_fileInputElementUnderMouse;
133
        RefPtr<HTMLInputElement> m_fileInputElementUnderMouse;
132
        unsigned m_numberOfItemsToBeAccepted;
134
        unsigned m_numberOfItemsToBeAccepted;
133
        bool m_documentIsHandlingDrag;
135
        DragHandlingMethod m_documentDragHandlingMethod;
134
136
135
        DragDestinationAction m_dragDestinationAction;
137
        DragDestinationAction m_dragDestinationAction;
136
        DragSourceAction m_dragSourceAction;
138
        DragSourceAction m_dragSourceAction;
- a/Source/WebCore/platform/PasteboardStrategy.h +1 lines
Lines 49-54 public: a/Source/WebCore/platform/PasteboardStrategy.h_sec1
49
    virtual String readStringFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName) = 0;
49
    virtual String readStringFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName) = 0;
50
    virtual RefPtr<SharedBuffer> readBufferFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName) = 0;
50
    virtual RefPtr<SharedBuffer> readBufferFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName) = 0;
51
    virtual URL readURLFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName) = 0;
51
    virtual URL readURLFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName) = 0;
52
    virtual void getFilenamesForDataInteraction(Vector<String>& filenames, const String& pasteboardName) = 0;
52
#endif // PLATFORM(IOS)
53
#endif // PLATFORM(IOS)
53
#if PLATFORM(COCOA)
54
#if PLATFORM(COCOA)
54
    virtual void getTypes(Vector<String>& types, const String& pasteboardName) = 0;
55
    virtual void getTypes(Vector<String>& types, const String& pasteboardName) = 0;
- a/Source/WebCore/platform/PlatformPasteboard.h +1 lines
Lines 54-59 public: a/Source/WebCore/platform/PlatformPasteboard.h_sec1
54
    WEBCORE_EXPORT explicit PlatformPasteboard(const String& pasteboardName);
54
    WEBCORE_EXPORT explicit PlatformPasteboard(const String& pasteboardName);
55
#if PLATFORM(IOS)
55
#if PLATFORM(IOS)
56
    WEBCORE_EXPORT PlatformPasteboard();
56
    WEBCORE_EXPORT PlatformPasteboard();
57
    WEBCORE_EXPORT Vector<String> filenamesForDataInteraction();
57
#endif
58
#endif
58
    WEBCORE_EXPORT static String uniqueName();
59
    WEBCORE_EXPORT static String uniqueName();
59
60
- a/Source/WebCore/platform/ios/AbstractPasteboard.h +1 lines
Lines 50-55 WEBCORE_EXPORT @interface WebPasteboardItemData : NSObject a/Source/WebCore/platform/ios/AbstractPasteboard.h_sec1
50
- (void)setItemsFromObjectRepresentations:(NSArray<WebPasteboardItemData *> *)itemData;
50
- (void)setItemsFromObjectRepresentations:(NSArray<WebPasteboardItemData *> *)itemData;
51
- (void)setItems:(NSArray<NSDictionary *> *)items;
51
- (void)setItems:(NSArray<NSDictionary *> *)items;
52
@property (readonly, nonatomic) NSInteger numberOfFiles;
52
@property (readonly, nonatomic) NSInteger numberOfFiles;
53
@property (readonly, nonatomic) NSArray<NSURL *> *filenamesForDataInteraction;
53
54
54
@end
55
@end
55
56
- a/Source/WebCore/platform/ios/PasteboardIOS.mm -1 / +4 lines
Lines 377-383 Vector<String> Pasteboard::types() a/Source/WebCore/platform/ios/PasteboardIOS.mm_sec1
377
377
378
Vector<String> Pasteboard::readFilenames()
378
Vector<String> Pasteboard::readFilenames()
379
{
379
{
380
    return Vector<String>();
380
    Vector<String> filenames;
381
    // Currently, data interaction is the only case on iOS where the pasteboard may contain relevant filenames.
382
    platformStrategies()->pasteboardStrategy()->getFilenamesForDataInteraction(filenames, m_pasteboardName);
383
    return filenames;
381
}
384
}
382
385
383
}
386
}
- a/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm +12 lines
Lines 91-96 int PlatformPasteboard::numberOfFiles() a/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm_sec1
91
    return [m_pasteboard respondsToSelector:@selector(numberOfFiles)] ? [m_pasteboard numberOfFiles] : 0;
91
    return [m_pasteboard respondsToSelector:@selector(numberOfFiles)] ? [m_pasteboard numberOfFiles] : 0;
92
}
92
}
93
93
94
Vector<String> PlatformPasteboard::filenamesForDataInteraction()
95
{
96
    if (![m_pasteboard respondsToSelector:@selector(filenamesForDataInteraction)])
97
        return { };
98
99
    Vector<String> filenames;
100
    for (NSURL *fileURL in [m_pasteboard filenamesForDataInteraction])
101
        filenames.append(fileURL.path);
102
103
    return filenames;
104
}
105
94
String PlatformPasteboard::stringForType(const String& type)
106
String PlatformPasteboard::stringForType(const String& type)
95
{
107
{
96
    NSArray *values = [m_pasteboard valuesForPasteboardType:type inItemSet:[NSIndexSet indexSetWithIndex:0]];
108
    NSArray *values = [m_pasteboard valuesForPasteboardType:type inItemSet:[NSIndexSet indexSetWithIndex:0]];
- a/Source/WebCore/platform/ios/WebItemProviderPasteboard.h +3 lines
Lines 43-48 WEBCORE_EXPORT @interface WebItemProviderPasteboard : NSObject<AbstractPasteboar a/Source/WebCore/platform/ios/WebItemProviderPasteboard.h_sec1
43
@property (readonly, nonatomic) NSInteger numberOfItems;
43
@property (readonly, nonatomic) NSInteger numberOfItems;
44
@property (readonly, nonatomic) NSInteger changeCount;
44
@property (readonly, nonatomic) NSInteger changeCount;
45
45
46
// This will only be non-empty when an operation is being performed.
47
@property (readonly, nonatomic) NSArray<NSURL *> *filenamesForDataInteraction;
48
46
@property (readonly, nonatomic) BOOL hasPendingOperation;
49
@property (readonly, nonatomic) BOOL hasPendingOperation;
47
- (void)incrementPendingOperationCount;
50
- (void)incrementPendingOperationCount;
48
- (void)decrementPendingOperationCount;
51
- (void)decrementPendingOperationCount;
- a/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm -1 / +15 lines
Lines 84-89 static BOOL isImageType(NSString *type) a/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm_sec1
84
@implementation WebItemProviderPasteboard {
84
@implementation WebItemProviderPasteboard {
85
    RetainPtr<NSArray> _itemProviders;
85
    RetainPtr<NSArray> _itemProviders;
86
    RetainPtr<NSArray> _cachedTypeIdentifiers;
86
    RetainPtr<NSArray> _cachedTypeIdentifiers;
87
    RetainPtr<NSArray> _filenamesForDataInteraction;
87
}
88
}
88
89
89
+ (instancetype)sharedInstance
90
+ (instancetype)sharedInstance
Lines 102-107 static BOOL isImageType(NSString *type) a/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm_sec2
102
        _itemProviders = adoptNS([[NSArray alloc] init]);
103
        _itemProviders = adoptNS([[NSArray alloc] init]);
103
        _changeCount = 0;
104
        _changeCount = 0;
104
        _pendingOperationCount = 0;
105
        _pendingOperationCount = 0;
106
        _filenamesForDataInteraction = @[ ];
105
    }
107
    }
106
    return self;
108
    return self;
107
}
109
}
Lines 140-145 static BOOL isImageType(NSString *type) a/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm_sec3
140
    _itemProviders = itemProviders;
142
    _itemProviders = itemProviders;
141
    _changeCount++;
143
    _changeCount++;
142
    _cachedTypeIdentifiers = nil;
144
    _cachedTypeIdentifiers = nil;
145
    _filenamesForDataInteraction = @[ ];
143
}
146
}
144
147
145
- (NSInteger)numberOfItems
148
- (NSInteger)numberOfItems
Lines 254-259 static BOOL isImageType(NSString *type) a/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm_sec4
254
    return _changeCount;
257
    return _changeCount;
255
}
258
}
256
259
260
- (NSArray<NSURL *> *)filenamesForDataInteraction
261
{
262
    return _filenamesForDataInteraction.get();
263
}
264
257
- (NSInteger)numberOfFiles
265
- (NSInteger)numberOfFiles
258
{
266
{
259
    NSInteger numberOfFiles = 0;
267
    NSInteger numberOfFiles = 0;
Lines 285-290 static NSURL *temporaryFileURLForDataInteractionContent(NSString *fileExtension, a/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm_sec5
285
293
286
- (void)doAfterLoadingProvidedContentIntoFileURLs:(WebItemProviderFileLoadBlock)action
294
- (void)doAfterLoadingProvidedContentIntoFileURLs:(WebItemProviderFileLoadBlock)action
287
{
295
{
296
    auto changeCountBeforeLoading = _changeCount;
297
288
    auto itemProvidersWithFiles = adoptNS([[NSMutableArray alloc] init]);
298
    auto itemProvidersWithFiles = adoptNS([[NSMutableArray alloc] init]);
289
    auto contentTypeIdentifiersToLoad = adoptNS([[NSMutableArray alloc] init]);
299
    auto contentTypeIdentifiersToLoad = adoptNS([[NSMutableArray alloc] init]);
290
    auto loadedFileURLs = adoptNS([[NSMutableArray alloc] init]);
300
    auto loadedFileURLs = adoptNS([[NSMutableArray alloc] init]);
Lines 328-334 static NSURL *temporaryFileURLForDataInteractionContent(NSString *fileExtension, a/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm_sec6
328
        });
338
        });
329
    }
339
    }
330
340
331
    dispatch_group_notify(fileLoadingGroup.get(), dispatch_get_main_queue(), [fileLoadingGroup, loadedFileURLs, completionBlock = makeBlockPtr(action)] {
341
    RetainPtr<WebItemProviderPasteboard> retainedSelf = self;
342
    dispatch_group_notify(fileLoadingGroup.get(), dispatch_get_main_queue(), [retainedSelf, fileLoadingGroup, loadedFileURLs, completionBlock = makeBlockPtr(action), changeCountBeforeLoading] {
343
        if (changeCountBeforeLoading == retainedSelf->_changeCount)
344
            retainedSelf->_filenamesForDataInteraction = adoptNS([loadedFileURLs copy]);
345
332
        completionBlock(loadedFileURLs.get());
346
        completionBlock(loadedFileURLs.get());
333
    });
347
    });
334
}
348
}
- a/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h +1 lines
Lines 65-70 private: a/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h_sec1
65
    String readStringFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName) override;
65
    String readStringFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName) override;
66
    RefPtr<WebCore::SharedBuffer> readBufferFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName) override;
66
    RefPtr<WebCore::SharedBuffer> readBufferFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName) override;
67
    WebCore::URL readURLFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName) override;
67
    WebCore::URL readURLFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName) override;
68
    void getFilenamesForDataInteraction(Vector<String>& filenames, const String& pasteboardName) override;
68
#endif
69
#endif
69
    int getNumberOfFiles(const String& pasteboardName) override;
70
    int getNumberOfFiles(const String& pasteboardName) override;
70
    void getTypes(Vector<String>& types, const String& pasteboardName) override;
71
    void getTypes(Vector<String>& types, const String& pasteboardName) override;
- a/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm +5 lines
Lines 220-223 String WebPlatformStrategies::readStringFromPasteboard(int index, const String& a/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm_sec1
220
{
220
{
221
    return PlatformPasteboard(pasteboardName).readString(index, type);
221
    return PlatformPasteboard(pasteboardName).readString(index, type);
222
}
222
}
223
224
void WebPlatformStrategies::getFilenamesForDataInteraction(Vector<String>& filenames, const String& pasteboardName)
225
{
226
    filenames = PlatformPasteboard(pasteboardName).filenamesForDataInteraction();
227
}
223
#endif // PLATFORM(IOS)
228
#endif // PLATFORM(IOS)
- a/Source/WebKit2/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm +5 lines
Lines 183-188 void WebPasteboardProxy::getPasteboardItemsCount(const String& pasteboardName, u a/Source/WebKit2/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm_sec1
183
    itemsCount = PlatformPasteboard(pasteboardName).count();
183
    itemsCount = PlatformPasteboard(pasteboardName).count();
184
}
184
}
185
185
186
void WebPasteboardProxy::getFilenamesForDataInteraction(const String& pasteboardName, Vector<String>& filenames)
187
{
188
    filenames = PlatformPasteboard(pasteboardName).filenamesForDataInteraction();
189
}
190
186
#endif
191
#endif
187
192
188
} // namespace WebKit
193
} // namespace WebKit
- a/Source/WebKit2/UIProcess/WebPageProxy.cpp -1 / +4 lines
Lines 408-413 WebPageProxy::WebPageProxy(PageClient& pageClient, WebProcessProxy& process, uin a/Source/WebKit2/UIProcess/WebPageProxy.cpp_sec1
408
    , m_currentDragOperation(DragOperationNone)
408
    , m_currentDragOperation(DragOperationNone)
409
    , m_currentDragIsOverFileInput(false)
409
    , m_currentDragIsOverFileInput(false)
410
    , m_currentDragNumberOfFilesToBeAccepted(0)
410
    , m_currentDragNumberOfFilesToBeAccepted(0)
411
    , m_documentIsHandlingNonDefaultDrag(false)
411
#endif
412
#endif
412
    , m_pageLoadState(*this)
413
    , m_pageLoadState(*this)
413
    , m_delegatesScrolling(false)
414
    , m_delegatesScrolling(false)
Lines 1800-1812 void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag a/Source/WebKit2/UIProcess/WebPageProxy.cpp_sec2
1800
#endif
1801
#endif
1801
}
1802
}
1802
1803
1803
void WebPageProxy::didPerformDragControllerAction(uint64_t dragOperation, bool mouseIsOverFileInput, unsigned numberOfItemsToBeAccepted, const IntRect& insertionRect)
1804
void WebPageProxy::didPerformDragControllerAction(uint64_t dragOperation, bool mouseIsOverFileInput, unsigned numberOfItemsToBeAccepted, const IntRect& insertionRect, bool isHandlingNonDefaultDrag)
1804
{
1805
{
1805
    MESSAGE_CHECK(dragOperation <= DragOperationDelete);
1806
    MESSAGE_CHECK(dragOperation <= DragOperationDelete);
1806
1807
1807
    m_currentDragOperation = static_cast<DragOperation>(dragOperation);
1808
    m_currentDragOperation = static_cast<DragOperation>(dragOperation);
1808
    m_currentDragIsOverFileInput = mouseIsOverFileInput;
1809
    m_currentDragIsOverFileInput = mouseIsOverFileInput;
1809
    m_currentDragNumberOfFilesToBeAccepted = numberOfItemsToBeAccepted;
1810
    m_currentDragNumberOfFilesToBeAccepted = numberOfItemsToBeAccepted;
1811
    m_documentIsHandlingNonDefaultDrag = isHandlingNonDefaultDrag;
1810
    setDragCaretRect(insertionRect);
1812
    setDragCaretRect(insertionRect);
1811
}
1813
}
1812
1814
Lines 1843-1848 void WebPageProxy::resetCurrentDragInformation() a/Source/WebKit2/UIProcess/WebPageProxy.cpp_sec3
1843
{
1845
{
1844
    m_currentDragOperation = WebCore::DragOperationNone;
1846
    m_currentDragOperation = WebCore::DragOperationNone;
1845
    m_currentDragIsOverFileInput = false;
1847
    m_currentDragIsOverFileInput = false;
1848
    m_documentIsHandlingNonDefaultDrag = false;
1846
    m_currentDragNumberOfFilesToBeAccepted = 0;
1849
    m_currentDragNumberOfFilesToBeAccepted = 0;
1847
    setDragCaretRect({ });
1850
    setDragCaretRect({ });
1848
}
1851
}
- a/Source/WebKit2/UIProcess/WebPageProxy.h -1 / +3 lines
Lines 835-841 public: a/Source/WebKit2/UIProcess/WebPageProxy.h_sec1
835
    void dragExited(WebCore::DragData&, const String& dragStorageName = String());
835
    void dragExited(WebCore::DragData&, const String& dragStorageName = String());
836
    void performDragOperation(WebCore::DragData&, const String& dragStorageName, const SandboxExtension::Handle&, const SandboxExtension::HandleArray&);
836
    void performDragOperation(WebCore::DragData&, const String& dragStorageName, const SandboxExtension::Handle&, const SandboxExtension::HandleArray&);
837
837
838
    void didPerformDragControllerAction(uint64_t dragOperation, bool mouseIsOverFileInput, unsigned numberOfItemsToBeAccepted, const WebCore::IntRect& insertionRect);
838
    void didPerformDragControllerAction(uint64_t dragOperation, bool mouseIsOverFileInput, unsigned numberOfItemsToBeAccepted, const WebCore::IntRect& insertionRect, bool isHandlingNonDefaultDrag);
839
    void dragEnded(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition, uint64_t operation);
839
    void dragEnded(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition, uint64_t operation);
840
    void dragCancelled();
840
    void dragCancelled();
841
    void setDragCaretRect(const WebCore::IntRect&);
841
    void setDragCaretRect(const WebCore::IntRect&);
Lines 893-898 public: a/Source/WebKit2/UIProcess/WebPageProxy.h_sec2
893
    bool currentDragIsOverFileInput() const { return m_currentDragIsOverFileInput; }
893
    bool currentDragIsOverFileInput() const { return m_currentDragIsOverFileInput; }
894
    unsigned currentDragNumberOfFilesToBeAccepted() const { return m_currentDragNumberOfFilesToBeAccepted; }
894
    unsigned currentDragNumberOfFilesToBeAccepted() const { return m_currentDragNumberOfFilesToBeAccepted; }
895
    WebCore::IntRect currentDragCaretRect() const { return m_currentDragCaretRect; }
895
    WebCore::IntRect currentDragCaretRect() const { return m_currentDragCaretRect; }
896
    bool documentIsHandlingNonDefaultDrag() const { return m_documentIsHandlingNonDefaultDrag; }
896
    void resetCurrentDragInformation();
897
    void resetCurrentDragInformation();
897
    void didEndDragging();
898
    void didEndDragging();
898
#endif
899
#endif
Lines 1873-1878 private: a/Source/WebKit2/UIProcess/WebPageProxy.h_sec3
1873
    bool m_currentDragIsOverFileInput;
1874
    bool m_currentDragIsOverFileInput;
1874
    unsigned m_currentDragNumberOfFilesToBeAccepted;
1875
    unsigned m_currentDragNumberOfFilesToBeAccepted;
1875
    WebCore::IntRect m_currentDragCaretRect;
1876
    WebCore::IntRect m_currentDragCaretRect;
1877
    bool m_documentIsHandlingNonDefaultDrag;
1876
#endif
1878
#endif
1877
1879
1878
    PageLoadState m_pageLoadState;
1880
    PageLoadState m_pageLoadState;
- a/Source/WebKit2/UIProcess/WebPageProxy.messages.in -1 / +1 lines
Lines 295-301 messages -> WebPageProxy { a/Source/WebKit2/UIProcess/WebPageProxy.messages.in_sec1
295
295
296
    # Drag and drop messages
296
    # Drag and drop messages
297
#if ENABLE(DRAG_SUPPORT)
297
#if ENABLE(DRAG_SUPPORT)
298
    DidPerformDragControllerAction(uint64_t dragOperation, bool mouseIsOverFileInput, unsigned numberOfItemsToBeAccepted, WebCore::IntRect insertionRect)
298
    DidPerformDragControllerAction(uint64_t dragOperation, bool mouseIsOverFileInput, unsigned numberOfItemsToBeAccepted, WebCore::IntRect insertionRect, bool isHandlingNonDefaultDrag)
299
    DidEndDragging();
299
    DidEndDragging();
300
#endif
300
#endif
301
#if PLATFORM(COCOA) && ENABLE(DRAG_SUPPORT)
301
#if PLATFORM(COCOA) && ENABLE(DRAG_SUPPORT)
- a/Source/WebKit2/UIProcess/WebPasteboardProxy.h +1 lines
Lines 75-80 private: a/Source/WebKit2/UIProcess/WebPasteboardProxy.h_sec1
75
    void readURLFromPasteboard(uint64_t index, const String& pasteboardType, const String& pasteboardName, String&);
75
    void readURLFromPasteboard(uint64_t index, const String& pasteboardType, const String& pasteboardName, String&);
76
    void readBufferFromPasteboard(uint64_t index, const String& pasteboardType, const String& pasteboardName, SharedMemory::Handle&, uint64_t& size);
76
    void readBufferFromPasteboard(uint64_t index, const String& pasteboardType, const String& pasteboardName, SharedMemory::Handle&, uint64_t& size);
77
    void getPasteboardItemsCount(const String& pasteboardName, uint64_t& itemsCount);
77
    void getPasteboardItemsCount(const String& pasteboardName, uint64_t& itemsCount);
78
    void getFilenamesForDataInteraction(const String& pasteboardName, Vector<String>& filenames);
78
#endif
79
#endif
79
#if PLATFORM(COCOA)
80
#if PLATFORM(COCOA)
80
    void getNumberOfFiles(const String& pasteboardName, uint64_t& numberOfFiles);
81
    void getNumberOfFiles(const String& pasteboardName, uint64_t& numberOfFiles);
- a/Source/WebKit2/UIProcess/WebPasteboardProxy.messages.in +1 lines
Lines 29-34 messages -> WebPasteboardProxy { a/Source/WebKit2/UIProcess/WebPasteboardProxy.messages.in_sec1
29
    ReadURLFromPasteboard(uint64_t index, String pasteboardType, String pasteboardName) -> (String string)
29
    ReadURLFromPasteboard(uint64_t index, String pasteboardType, String pasteboardName) -> (String string)
30
    ReadBufferFromPasteboard(uint64_t index, String pasteboardType, String pasteboardName) -> (WebKit::SharedMemory::Handle handle, uint64_t size)
30
    ReadBufferFromPasteboard(uint64_t index, String pasteboardType, String pasteboardName) -> (WebKit::SharedMemory::Handle handle, uint64_t size)
31
    GetPasteboardItemsCount(String pasteboardName) -> (uint64_t itemsCount)
31
    GetPasteboardItemsCount(String pasteboardName) -> (uint64_t itemsCount)
32
    GetFilenamesForDataInteraction(String pasteboardName) -> (Vector<String> filenames)
32
#endif
33
#endif
33
34
34
#if PLATFORM(COCOA)
35
#if PLATFORM(COCOA)
- a/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp +5 lines
Lines 309-314 int WebPlatformStrategies::getPasteboardItemsCount(const String& pasteboardName) a/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp_sec1
309
    return itemsCount;
309
    return itemsCount;
310
}
310
}
311
311
312
void WebPlatformStrategies::getFilenamesForDataInteraction(Vector<String>& filenames, const String& pasteboardName)
313
{
314
    WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPasteboardProxy::GetFilenamesForDataInteraction(pasteboardName), Messages::WebPasteboardProxy::GetFilenamesForDataInteraction::Reply(filenames), 0);
315
}
316
312
RefPtr<WebCore::SharedBuffer> WebPlatformStrategies::readBufferFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName)
317
RefPtr<WebCore::SharedBuffer> WebPlatformStrategies::readBufferFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName)
313
{
318
{
314
    SharedMemory::Handle handle;
319
    SharedMemory::Handle handle;
- a/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h +1 lines
Lines 66-71 private: a/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h_sec1
66
    String readStringFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName) override;
66
    String readStringFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName) override;
67
    RefPtr<WebCore::SharedBuffer> readBufferFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName) override;
67
    RefPtr<WebCore::SharedBuffer> readBufferFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName) override;
68
    WebCore::URL readURLFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName) override;
68
    WebCore::URL readURLFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName) override;
69
    void getFilenamesForDataInteraction(Vector<String>& filenames, const String& pasteboardName) override;
69
#endif
70
#endif
70
#if PLATFORM(COCOA)
71
#if PLATFORM(COCOA)
71
    int getNumberOfFiles(const String& pasteboardName) override;
72
    int getNumberOfFiles(const String& pasteboardName) override;
- a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp -7 / +7 lines
Lines 3536-3542 bool WebPage::handleEditingKeyboardEvent(KeyboardEvent* evt) a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp_sec1
3536
void WebPage::performDragControllerAction(uint64_t action, const IntPoint& clientPosition, const IntPoint& globalPosition, uint64_t draggingSourceOperationMask, WebSelectionData&& selection, uint32_t flags)
3536
void WebPage::performDragControllerAction(uint64_t action, const IntPoint& clientPosition, const IntPoint& globalPosition, uint64_t draggingSourceOperationMask, WebSelectionData&& selection, uint32_t flags)
3537
{
3537
{
3538
    if (!m_page) {
3538
    if (!m_page) {
3539
        send(Messages::WebPageProxy::DidPerformDragControllerAction(DragOperationNone, false, 0, { }));
3539
        send(Messages::WebPageProxy::DidPerformDragControllerAction(DragOperationNone, false, 0, { }, false));
3540
        return;
3540
        return;
3541
    }
3541
    }
3542
3542
Lines 3544-3555 void WebPage::performDragControllerAction(uint64_t action, const IntPoint& clien a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp_sec2
3544
    switch (action) {
3544
    switch (action) {
3545
    case DragControllerActionEntered: {
3545
    case DragControllerActionEntered: {
3546
        DragOperation resolvedDragOperation = m_page->dragController().dragEntered(dragData);
3546
        DragOperation resolvedDragOperation = m_page->dragController().dragEntered(dragData);
3547
        send(Messages::WebPageProxy::DidPerformDragControllerAction(resolvedDragOperation, m_page->dragController().mouseIsOverFileInput(), m_page->dragController().numberOfItemsToBeAccepted(), { }));
3547
        send(Messages::WebPageProxy::DidPerformDragControllerAction(resolvedDragOperation, m_page->dragController().mouseIsOverFileInput(), m_page->dragController().numberOfItemsToBeAccepted(), { }, false));
3548
        break;
3548
        break;
3549
    }
3549
    }
3550
    case DragControllerActionUpdated: {
3550
    case DragControllerActionUpdated: {
3551
        DragOperation resolvedDragOperation = m_page->dragController().dragEntered(dragData);
3551
        DragOperation resolvedDragOperation = m_page->dragController().dragEntered(dragData);
3552
        send(Messages::WebPageProxy::DidPerformDragControllerAction(resolvedDragOperation, m_page->dragController().mouseIsOverFileInput(), m_page->dragController().numberOfItemsToBeAccepted(), { }));
3552
        send(Messages::WebPageProxy::DidPerformDragControllerAction(resolvedDragOperation, m_page->dragController().mouseIsOverFileInput(), m_page->dragController().numberOfItemsToBeAccepted(), { }, false));
3553
        break;
3553
        break;
3554
    }
3554
    }
3555
    case DragControllerActionExited:
3555
    case DragControllerActionExited:
Lines 3569-3593 void WebPage::performDragControllerAction(uint64_t action, const IntPoint& clien a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp_sec3
3569
void WebPage::performDragControllerAction(uint64_t action, const WebCore::DragData& dragData, const SandboxExtension::Handle& sandboxExtensionHandle, const SandboxExtension::HandleArray& sandboxExtensionsHandleArray)
3569
void WebPage::performDragControllerAction(uint64_t action, const WebCore::DragData& dragData, const SandboxExtension::Handle& sandboxExtensionHandle, const SandboxExtension::HandleArray& sandboxExtensionsHandleArray)
3570
{
3570
{
3571
    if (!m_page) {
3571
    if (!m_page) {
3572
        send(Messages::WebPageProxy::DidPerformDragControllerAction(DragOperationNone, false, 0, { }));
3572
        send(Messages::WebPageProxy::DidPerformDragControllerAction(DragOperationNone, false, 0, { }, false));
3573
        return;
3573
        return;
3574
    }
3574
    }
3575
3575
3576
    switch (action) {
3576
    switch (action) {
3577
    case DragControllerActionEntered: {
3577
    case DragControllerActionEntered: {
3578
        DragOperation resolvedDragOperation = m_page->dragController().dragEntered(dragData);
3578
        DragOperation resolvedDragOperation = m_page->dragController().dragEntered(dragData);
3579
        send(Messages::WebPageProxy::DidPerformDragControllerAction(resolvedDragOperation, m_page->dragController().mouseIsOverFileInput(), m_page->dragController().numberOfItemsToBeAccepted(), m_page->dragCaretController().caretPosition().absoluteCaretBounds()));
3579
        send(Messages::WebPageProxy::DidPerformDragControllerAction(resolvedDragOperation, m_page->dragController().mouseIsOverFileInput(), m_page->dragController().numberOfItemsToBeAccepted(), m_page->dragCaretController().caretPosition().absoluteCaretBounds(), m_page->dragController().documentIsHandlingNonDefaultDrag()));
3580
        break;
3580
        break;
3581
3581
3582
    }
3582
    }
3583
    case DragControllerActionUpdated: {
3583
    case DragControllerActionUpdated: {
3584
        DragOperation resolvedDragOperation = m_page->dragController().dragUpdated(dragData);
3584
        DragOperation resolvedDragOperation = m_page->dragController().dragUpdated(dragData);
3585
        send(Messages::WebPageProxy::DidPerformDragControllerAction(resolvedDragOperation, m_page->dragController().mouseIsOverFileInput(), m_page->dragController().numberOfItemsToBeAccepted(), m_page->dragCaretController().caretPosition().absoluteCaretBounds()));
3585
        send(Messages::WebPageProxy::DidPerformDragControllerAction(resolvedDragOperation, m_page->dragController().mouseIsOverFileInput(), m_page->dragController().numberOfItemsToBeAccepted(), m_page->dragCaretController().caretPosition().absoluteCaretBounds(), m_page->dragController().documentIsHandlingNonDefaultDrag()));
3586
        break;
3586
        break;
3587
    }
3587
    }
3588
    case DragControllerActionExited:
3588
    case DragControllerActionExited:
3589
        m_page->dragController().dragExited(dragData);
3589
        m_page->dragController().dragExited(dragData);
3590
        send(Messages::WebPageProxy::DidPerformDragControllerAction(DragOperationNone, false, 0, { }));
3590
        send(Messages::WebPageProxy::DidPerformDragControllerAction(DragOperationNone, false, 0, { }, false));
3591
        break;
3591
        break;
3592
        
3592
        
3593
    case DragControllerActionPerformDragOperation: {
3593
    case DragControllerActionPerformDragOperation: {

Return to Bug 170880