Fix bug 333623, about:blank's favicon is draggable from location bar, but not from tabs. Patch by Chris Lawson <bugzilla@chrislawson.net>

This commit is contained in:
nick.kreeger%park.edu 2006-06-06 20:42:40 +00:00
parent d5803665d8
commit 4597bc5c39

View File

@ -92,12 +92,13 @@
{
NSString* urlString = nil;
NSString* titleString = nil;
id parentWindowController = [[self window] windowController];
if ([parentWindowController isKindOfClass:[BrowserWindowController class]])
[[(BrowserWindowController*)parentWindowController getBrowserWrapper] getTitle:&titleString andHref:&urlString];
if (!urlString)
// don't allow dragging of proxy icon for empty pages
if ((!urlString) || [MainController isBlankURL:urlString])
return;
NSString *cleanedTitle = [titleString stringByReplacingCharactersInSet:[NSCharacterSet controlCharacterSet] withString:@" "];
@ -106,7 +107,7 @@
[pboard declareURLPasteboardWithAdditionalTypes:[NSArray array] owner:self];
[pboard setDataForURL:urlString title:cleanedTitle];
[self dragImage: [MainController createImageForDragging:[self image] title:titleString]
at: NSMakePoint(0,0) offset: NSMakeSize(0,0)
event: event pasteboard: pboard source: self slideBack: YES];