Commit bdd90f05 authored by edchin's avatar edchin Committed by Commit Bot

[ios] Use URLInfo instead of NSURL in tab grid drop

URLs dragged from bookmarks are wrapped in URLInfo,
so drops onto the tab grid must unwrap URLInfo.

Change-Id: I8c1eb8b4e3c8b9b8222473313919066fb659e7e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2436521
Commit-Queue: edchin <edchin@chromium.org>
Auto-Submit: edchin <edchin@chromium.org>
Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811846}
parent fbe46607
......@@ -459,10 +459,9 @@ web::WebState* GetWebStateWithId(WebStateList* web_state_list,
}
// Handle URLs from within Chrome synchronously using a local object.
if ([dragItem.localObject isKindOfClass:[NSURL class]]) {
NSURL* droppedURL = static_cast<NSURL*>(dragItem.localObject);
[self insertNewItemAtIndex:destinationIndex
withURL:net::GURLWithNSURL(droppedURL)];
if ([dragItem.localObject isKindOfClass:[URLInfo class]]) {
URLInfo* droppedURL = static_cast<URLInfo*>(dragItem.localObject);
[self insertNewItemAtIndex:destinationIndex withURL:droppedURL.URL];
return;
}
}
......
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