This creates ways for strings that didn't look like file URLs at first to become file URLs after security checks have cleared them.
I tracked the origins of this code to <http://trac.webkit.org/changeset/4662>. It's not clear if there was any reason for doing this - I couldn't find any evidence of any Foundation or AppKit methods doing much with such NSURLs.
Created attachment 122345 [details]
I suggest waiting to see if any non-Safari clients break because of this. We can then add more relaxed conversion for APIs that are used this way.
Comment on attachment 122345 [details]
Seems good to do this. I agree we can add code to add "file:" prefix in the WebKit level later if we find we need it for compatibility.
Forgot about matching CF code. Filed bug 76251 about it.