New issue
Advanced search Search tips

Issue 856469 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 25
Cc:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug
M-X



Sign in to add a comment

[MacViews Browser] .webloc drop onto tab strip doesn't load the site

Project Member Reported by a...@chromium.org, Jun 26 2018

Issue description

Yep. Regression from Cocoa.
 

Comment 1 by a...@chromium.org, Jun 26 2018

Labels: OS-Mac
Owner: lgrey@chromium.org
Status: Assigned (was: Untriaged)
[mac bug triage] Assigning to lgrey@ to investigate
Labels: M-X Hotlist-PlatformExcellence
Labels: Group-Views_Regressions_from_Cocoa
What's going on is that in Cocoa, the chrome/browser/ui/cocoa/tabs/tab_strip_view.mm was an URLDropTarget, which called PopulateURLAndTitleFromPasteboard, which called out to the code that read .webloc files.

In Views, the OSExchangeDataProvider is used, and the Mac version doesn't call PopulateURLAndTitleFromPasteboard. I tried a simple fix (https://chromium-review.googlesource.com/c/chromium/src/+/1148797) but it makes all kinds of things break.
Based on the CQ failures, we could patch third_party/mozilla/NSPasteboard+Utils.mm to do what Views wants assuming we're OK with slightly changing the Cocoa behavior. Or did other stuff break too?
Owner: a...@chromium.org
Status: Started (was: Assigned)
I have a fix.
(And looking at the pasteboard code and having filed bug 867553, I'll probably take ownership of the pasteboard code in general.)
Project Member

Comment 9 by bugdroid1@chromium.org, Jul 25

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

commit f70278fe826d0c212852ca2c0c23ca23952b0a8d
Author: Avi Drissman <avi@chromium.org>
Date: Wed Jul 25 20:45:15 2018

Load .webloc files correctly.

If a user drops a .webloc file onto the tabstrip, load the URL
inside the .webloc file, not the contents of the .webloc file
itself.

BUG= 856469 

Change-Id: Id581936a712180b188ff0f4f92ae10bb4353e5e6
Reviewed-on: https://chromium-review.googlesource.com/1148797
Reviewed-by: Leonard Grey <lgrey@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578047}
[modify] https://crrev.com/f70278fe826d0c212852ca2c0c23ca23952b0a8d/ui/base/dragdrop/os_exchange_data_provider_mac.mm

Status: Fixed (was: Started)
Labels: Needs-Feedback
@avi@chromium.org : It would be really helpful if a sample Test file/URL is provided, so that we can verifying the fix.

Thanks...!
Repro:
1. Go to a webpage with a link on the page.
2. Drag the link to the desktop. Confirm that the file created is a .webloc file.
3. Drag that .webloc file to the titlebar, confirm that the link that was the source from step 2 is loaded.

Sign in to add a comment