Add -[WKWebView loadData:MIMEType:textEncodingName:baseURL:]
Created attachment 241957 [details] Patch
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?
(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).
(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”.
Created attachment 241968 [details] Patch
Committed r176408: <http://trac.webkit.org/changeset/176408>