New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 753331 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Bug



Sign in to add a comment

Add Drag and Drop to the omnibox

Project Member Reported by jif@chromium.org, Aug 8 2017

Issue description

We should be able to drop URLs, and possibly text, to the omnibox.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7f7424773cd566fe1b2204d41afc882bc09714fa

commit 7f7424773cd566fe1b2204d41afc882bc09714fa
Author: Jean-François Geyelin <jif@chromium.org>
Date: Wed Aug 09 11:54:29 2017

[iOS] Add drag-n-drop to the omnibox.

The purpose of the DropAndNavigateInteraction class is to be added to
any view where it would make sense to receive a URL.
For now, that class only handles drags containing URLs, but it could
optionally generate queries for drags only containing NSStrings,
UIImages, etc...

Bug:  753331 
Change-Id: I9643a40b617fcddbb521ebab4746b4bdb36c0273
Reviewed-on: https://chromium-review.googlesource.com/606648
Commit-Queue: Jean-François Geyelin <jif@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#492944}
[modify] https://crrev.com/7f7424773cd566fe1b2204d41afc882bc09714fa/ios/chrome/browser/BUILD.gn
[add] https://crrev.com/7f7424773cd566fe1b2204d41afc882bc09714fa/ios/chrome/browser/drag_and_drop/BUILD.gn
[add] https://crrev.com/7f7424773cd566fe1b2204d41afc882bc09714fa/ios/chrome/browser/drag_and_drop/OWNERS
[add] https://crrev.com/7f7424773cd566fe1b2204d41afc882bc09714fa/ios/chrome/browser/drag_and_drop/drop_and_navigate_delegate.h
[add] https://crrev.com/7f7424773cd566fe1b2204d41afc882bc09714fa/ios/chrome/browser/drag_and_drop/drop_and_navigate_interaction.h
[add] https://crrev.com/7f7424773cd566fe1b2204d41afc882bc09714fa/ios/chrome/browser/drag_and_drop/drop_and_navigate_interaction.mm
[add] https://crrev.com/7f7424773cd566fe1b2204d41afc882bc09714fa/ios/chrome/browser/drag_and_drop/drop_and_navigate_interaction_unittest.mm
[modify] https://crrev.com/7f7424773cd566fe1b2204d41afc882bc09714fa/ios/chrome/browser/ui/toolbar/BUILD.gn
[modify] https://crrev.com/7f7424773cd566fe1b2204d41afc882bc09714fa/ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm

Project Member

Comment 2 by bugdroid1@chromium.org, Aug 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/93298ef3ef5fcfd59a375654465cfe0c857fbd07

commit 93298ef3ef5fcfd59a375654465cfe0c857fbd07
Author: Sylvain Defresne <sdefresne@chromium.org>
Date: Wed Aug 09 12:32:22 2017

Revert "[iOS] Add drag-n-drop to the omnibox."

This reverts commit 7f7424773cd566fe1b2204d41afc882bc09714fa.

Reason for revert: break compilation with iOS 11 SDK.

../../ios/chrome/browser/drag_and_drop/drop_and_navigate_interaction_unittest.mm:17:33: error: unused variable 'interaction' [-Werror,-Wunused-variable]
    DropAndNavigateInteraction* interaction =
                                ^
1 error generated.


Original change's description:
> [iOS] Add drag-n-drop to the omnibox.
> 
> The purpose of the DropAndNavigateInteraction class is to be added to
> any view where it would make sense to receive a URL.
> For now, that class only handles drags containing URLs, but it could
> optionally generate queries for drags only containing NSStrings,
> UIImages, etc...
> 
> Bug:  753331 
> Change-Id: I9643a40b617fcddbb521ebab4746b4bdb36c0273
> Reviewed-on: https://chromium-review.googlesource.com/606648
> Commit-Queue: Jean-François Geyelin <jif@chromium.org>
> Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
> Reviewed-by: Justin Cohen <justincohen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#492944}

TBR=jif@chromium.org,sdefresne@chromium.org,justincohen@chromium.org

Change-Id: I4c9c5cd7b998ad47f4e5535e5b2af1b02110e0fe
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  753331 
Reviewed-on: https://chromium-review.googlesource.com/608207
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#492951}
[modify] https://crrev.com/93298ef3ef5fcfd59a375654465cfe0c857fbd07/ios/chrome/browser/BUILD.gn
[delete] https://crrev.com/7f5bd0c1249f73ebbc5270c3ead2057558b19f6c/ios/chrome/browser/drag_and_drop/BUILD.gn
[delete] https://crrev.com/7f5bd0c1249f73ebbc5270c3ead2057558b19f6c/ios/chrome/browser/drag_and_drop/OWNERS
[delete] https://crrev.com/7f5bd0c1249f73ebbc5270c3ead2057558b19f6c/ios/chrome/browser/drag_and_drop/drop_and_navigate_delegate.h
[delete] https://crrev.com/7f5bd0c1249f73ebbc5270c3ead2057558b19f6c/ios/chrome/browser/drag_and_drop/drop_and_navigate_interaction.h
[delete] https://crrev.com/7f5bd0c1249f73ebbc5270c3ead2057558b19f6c/ios/chrome/browser/drag_and_drop/drop_and_navigate_interaction.mm
[delete] https://crrev.com/7f5bd0c1249f73ebbc5270c3ead2057558b19f6c/ios/chrome/browser/drag_and_drop/drop_and_navigate_interaction_unittest.mm
[modify] https://crrev.com/93298ef3ef5fcfd59a375654465cfe0c857fbd07/ios/chrome/browser/ui/toolbar/BUILD.gn
[modify] https://crrev.com/93298ef3ef5fcfd59a375654465cfe0c857fbd07/ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm

Drive-by: why don't you use the AutocompleteClassifier to do this, just like how it's done on desktop?  Desktop smartly decides whether you're dragging something that can be interpreted as a URL--in which case it navigates--or something else--in which case it searches.  AutocompleteClassifier is also the same thing that powers the context menus, deciding whether to display "Paste and search" or "Paste and go" in the omnibox context menu based on what you have in your clipboard.  It also powers web content context menus depending on the text highlighted (searching versus navigating) as well.
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fc457d672bd6cec3693cf236fc5e63be76dbd391

commit fc457d672bd6cec3693cf236fc5e63be76dbd391
Author: Jean-François Geyelin <jif@chromium.org>
Date: Wed Aug 09 19:23:38 2017

[iOS][Reland] Add drag-n-drop to the omnibox.

The purpose of the DropAndNavigateInteraction class is to be added to
any view where it would make sense to receive a URL.
For now, that class only handles drags containing URLs, but it could
optionally generate queries for drags only containing NSStrings,
UIImages, etc...

Bug:  753331 
Change-Id: I5ddc44079e4adeb86b0b9b62eca4153c8a46b5d2
TBR: justincohen@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/608131
Commit-Queue: Jean-François Geyelin <jif@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493094}
[modify] https://crrev.com/fc457d672bd6cec3693cf236fc5e63be76dbd391/ios/chrome/browser/BUILD.gn
[add] https://crrev.com/fc457d672bd6cec3693cf236fc5e63be76dbd391/ios/chrome/browser/drag_and_drop/BUILD.gn
[add] https://crrev.com/fc457d672bd6cec3693cf236fc5e63be76dbd391/ios/chrome/browser/drag_and_drop/OWNERS
[add] https://crrev.com/fc457d672bd6cec3693cf236fc5e63be76dbd391/ios/chrome/browser/drag_and_drop/drop_and_navigate_delegate.h
[add] https://crrev.com/fc457d672bd6cec3693cf236fc5e63be76dbd391/ios/chrome/browser/drag_and_drop/drop_and_navigate_interaction.h
[add] https://crrev.com/fc457d672bd6cec3693cf236fc5e63be76dbd391/ios/chrome/browser/drag_and_drop/drop_and_navigate_interaction.mm
[add] https://crrev.com/fc457d672bd6cec3693cf236fc5e63be76dbd391/ios/chrome/browser/drag_and_drop/drop_and_navigate_interaction_unittest.mm
[modify] https://crrev.com/fc457d672bd6cec3693cf236fc5e63be76dbd391/ios/chrome/browser/ui/toolbar/BUILD.gn
[modify] https://crrev.com/fc457d672bd6cec3693cf236fc5e63be76dbd391/ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm
[modify] https://crrev.com/fc457d672bd6cec3693cf236fc5e63be76dbd391/ios/chrome/test/BUILD.gn

Comment 5 by jif@chromium.org, Aug 10 2017

#3>
I was planning on extracting and reusing |loadURLForQuery:| [1], which uses some Autocomplete code.
Is that what you had in mind?

[1]
https://cs.chromium.org/chromium/src/ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm?rcl=f42635edb52227789ce46fdc559757af69d83093&l=1795
jif@ using loadURLForQuery sounds good to me.
jif@ please what's the status on this blocker? We aim to fix our blockers as early in the cycle as possible.

Comment 8 by jif@chromium.org, Sep 7 2017

Status: Fixed (was: Started)
Labels: Merge-TBD
[Auto-generated comment by a script] We noticed that this issue is targeted for M-62; it appears the fix may have landed after branch point, meaning a merge might be required. Please confirm if a merge is required here - if so add Merge-Request-62 label, otherwise remove Merge-TBD label. Thanks.

Comment 10 by jif@chromium.org, Sep 7 2017

Labels: -Merge-TBD
Status: Verified (was: Fixed)
Drag and Drop is available in M62.0.3202.43 beta, iOS11 and iPads.

Sign in to add a comment