RESOLVED FIXED 138929
Add -[WKWebView loadData:MIMEType:textEncodingName:baseURL:]
https://bugs.webkit.org/show_bug.cgi?id=138929
Summary Add -[WKWebView loadData:MIMEType:textEncodingName:baseURL:]
Anders Carlsson
Reported 2014-11-20 10:20:40 PST
Add -[WKWebView loadData:MIMEType:textEncodingName:baseURL:]
Attachments
Patch (5.94 KB, patch)
2014-11-20 10:22 PST, Anders Carlsson
no flags
Patch (6.00 KB, patch)
2014-11-20 11:58 PST, Anders Carlsson
mitz: review+
Anders Carlsson
Comment 1 2014-11-20 10:22:39 PST
mitz
Comment 2 2014-11-20 10:31:02 PST
Comment on attachment 241957 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=241957&action=review > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h:111 > + @param encodingName The encoding of the data. I think this should say “text encoding of the data”, but also, since this is an NSString, perhaps it should say that it should be an IANA name, or whatever is applicable here. > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h:112 > + @param baseURL A URL that is used to resolve relative URLs within the document. Will anything work if this is a file URL (i.e. will a there be read access to the URL)? If not, this is worth mentioning in the @discussion. Besides being used to resolve relative URLs, does this URL also control access to cookies and other things?
Anders Carlsson
Comment 3 2014-11-20 10:33:27 PST
(In reply to comment #2) > Comment on attachment 241957 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=241957&action=review > > > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h:111 > > + @param encodingName The encoding of the data. > > I think this should say “text encoding of the data”, but also, since this is > an NSString, perhaps it should say that it should be an IANA name, or > whatever is applicable here. How about "The IANA registered text encoding of the data"? > > > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h:112 > > + @param baseURL A URL that is used to resolve relative URLs within the document. > > Will anything work if this is a file URL (i.e. will a there be read access > to the URL)? If not, this is worth mentioning in the @discussion. Besides > being used to resolve relative URLs, does this URL also control access to > cookies and other things? Not yet, that's tracked by another bug (including modifying the header documentation to clarify this).
mitz
Comment 4 2014-11-20 10:46:39 PST
(In reply to comment #3) > (In reply to comment #2) > > Comment on attachment 241957 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=241957&action=review > > > > > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h:111 > > > + @param encodingName The encoding of the data. > > > > I think this should say “text encoding of the data”, but also, since this is > > an NSString, perhaps it should say that it should be an IANA name, or > > whatever is applicable here. > > How about "The IANA registered text encoding of the data"? Looking at the HTML spec, this is usually called “character encoding” and the names come from <https://encoding.spec.whatwg.org>, where they are referred to as “names” and “labels”, so an IANA reference may be outdated. Perhaps the selector should be -loadData:MIMEType:characterEncoding:baseURL:. The comment could say “The data's character encoding name”.
Anders Carlsson
Comment 5 2014-11-20 11:58:36 PST
Anders Carlsson
Comment 6 2014-11-20 12:01:28 PST
Note You need to log in before you can comment on or make changes to this bug.