Summary: | [Qt] Allow applications to register their own local URL scheme | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Yael <yael> | ||||||||
Component: | WebKit Qt | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | behrooz.noorizadeh, hausmann | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | PC | ||||||||||
OS: | All | ||||||||||
Attachments: |
|
Description
Yael
2009-08-12 16:59:06 PDT
Created attachment 34709 [details]
Patch
Comment on attachment 34709 [details] Patch I agree with the need for this API, but I have a few suggestions and comments for the implementation: > +/*! > + Allow applications to use a custome scheme instead of file: scheme, > + without being subjected to cross domain restrictions. > +*/ > +void QWebSecurityOrigin::addLocalScheme(QString& scheme) The QString argument should be a const QString &, not a QString &. I think we may also need a function to remove a local scheme, i.e. void removeLocalScheme(const QString &scheme); as well as a function to return a list of all known local schemes: QStringList QWebSecurityOrigin::localSchemes(); I forgot to add: We need an autotest for this feature. But it should be relatively easy to test I think. Created attachment 34804 [details]
Patch
Add the requested API, and an automated test
Created attachment 34833 [details]
Patch
Added additional automated test at Ariya's request.
Comment on attachment 34833 [details]
Patch
r=me
It would be nice to have \since 4.6 tags in the documentation for the new functions.
If you have the time then it would also be nice to have a test that verifies that the local schemes actually work :)
|