Bug 129752 - ObjC exception when dropping files into a WKView: drag and drop uses code from WebKit.framework
Summary: ObjC exception when dropping files into a WKView: drag and drop uses code fro...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-03-05 11:51 PST by Simon Fraser (smfr)
Modified: 2014-03-05 12:10 PST (History)
4 users (show)

See Also:


Attachments
Patch (15.43 KB, patch)
2014-03-05 11:54 PST, Simon Fraser (smfr)
enrica: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2014-03-05 11:51:09 PST
ObjC exception when dropping files into a WKView: drag and drop uses code from WebKit.framework
Comment 1 Simon Fraser (smfr) 2014-03-05 11:51:39 PST
<rdar://problem/9197507>
Comment 2 Simon Fraser (smfr) 2014-03-05 11:54:27 PST
Created attachment 225897 [details]
Patch
Comment 3 Enrica Casucci 2014-03-05 12:02:42 PST
Comment on attachment 225897 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=225897&action=review

Looks good

> Source/WebCore/platform/mac/WebCoreNSURLExtras.mm:722
> +    NSURLRequest *request = [[NSURLRequest alloc] initWithURL:URL];

RetainPtr and avoid release?

> Source/WebCore/platform/mac/WebCoreNSURLExtras.mm:920
> +            */

Comment style

> Source/WebCore/platform/mac/WebCoreNSURLExtras.mm:934
> +    return rangeOfURLScheme(stringByTrimmingWhitespace(string)).location != NSNotFound;

Maybe you could use CFStringTrimWhitespace.
Comment 4 Simon Fraser (smfr) 2014-03-05 12:10:57 PST
https://trac.webkit.org/r165118