Bug 12870

Summary: REGRESSION: Safari accepts and attempts to load any file dragged into it
Product: WebKit Reporter: Matt Lilek <dev+webkit>
Component: WebCore Misc.Assignee: Oliver Hunt <oliver>
Status: RESOLVED FIXED    
Severity: Normal CC: oliver
Priority: P1 Keywords: Regression
Version: 523.x (Safari 3)   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
instamatic fix aroben: review+

Description Matt Lilek 2007-02-23 08:23:52 PST
Safari now claims to accept (shows the cursor with the green + orb) and seems to try to load anything dragged into it - things like application bundles, folders or zip files.  The title is blanked and history functionality for that tab/window is dead.
Comment 1 Oliver Hunt 2007-02-23 17:21:10 PST
Created attachment 13356 [details]
instamatic fix

Okay, the problem is that the drag and drop code had an "improvement" that short circuited the evaluation of _web_best_URL if the dragging  Pasteboard contained any url.  _web_best_URL filters out insane URLs (eg. directories) so this was bad.  This fix stops directories from being accepted.

All other files are accepted, and will bring up the finder if the dropped file isn't viewable with webkit.
Comment 2 Adam Roben (:aroben) 2007-02-23 17:29:17 PST
Comment on attachment 13356 [details]
instamatic fix

+			Drag a file that WebKit doesn't recognise -- eg. a disk image, tarball, etc.<p>

   Would be better to either wrap this in a <p></p> pair, or use <br>

   r=me
Comment 3 Oliver Hunt 2007-02-23 17:39:06 PST
Landed in r19382 (ChangeLog corrected in r19833 *sigh*)