WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
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
Details
Formatted Diff
Diff
Patch
(6.00 KB, patch)
2014-11-20 11:58 PST
,
Anders Carlsson
mitz: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Anders Carlsson
Comment 1
2014-11-20 10:22:39 PST
Created
attachment 241957
[details]
Patch
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
Created
attachment 241968
[details]
Patch
Anders Carlsson
Comment 6
2014-11-20 12:01:28 PST
Committed
r176408
: <
http://trac.webkit.org/changeset/176408
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug