[Webkit-unassigned] [Bug 188464] Support drag-and-drop for input[type=color]

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 15 09:54:24 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=188464

--- Comment #35 from Wenson Hsieh <wenson_hsieh at apple.com> ---
Comment on attachment 347168
  --> https://bugs.webkit.org/attachment.cgi?id=347168
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=347168&action=review

> Source/WebKit/UIProcess/ios/DragDropInteractionState.mm:305
> +                UIDragPreviewParameters *parameters = [[[UIDragPreviewParameters alloc] initWithTextLineRects:@[[NSValue valueWithCGRect:[imageView bounds]]]] autorelease];

Nit - I think we usually put spaces around the inside of the outer square brackets in array initialized like this: `@[ … ]`.

> Tools/TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:111
> +TEST(DragAndDropTests, ColorInputInputEvent)

I think you could consider consolidating this and ColorInputChangeEvent into a single test that checks for both events, since their setup and steps are identical.

> Tools/TestWebKitAPI/Tests/WebKitCocoa/color-drop.html:10
> +    setTimeout(() => window.webkit.messageHandlers.testHandler.postMessage("change"), 0);

Hm...I don't see why we need to schedule these on a timer.

> Tools/TestWebKitAPI/Tests/mac/DragAndDropTestsMac.mm:62
> +TEST(DragAndDropPasteboardTests, DropColor)

Nit - s/DragAndDropPasteboardTests/DragAndDropTests/

> Tools/TestWebKitAPI/Tests/mac/DragAndDropTestsMac.mm:72
> +    auto hostWindow = adoptNS([[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 400, 400) styleMask:0 backing:NSBackingStoreBuffered defer:NO]);

I don't think we need to add the web view in this window, since TestWKWebView is hosted in an NSWindow by default.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180815/32154903/attachment.html>


More information about the webkit-unassigned mailing list