[webkit-gtk] Passing resources from memory to an embedded Webkit

Rupert Swarbrick rswarbrick at gmail.com
Tue Apr 5 05:12:39 PDT 2011


Hi,

I'm working on adding CHM support to Yelp, which embeds WebKit. CHM
files are basically archives of HTML documents along with supporting
images, CSS etc.

At the moment, when my code loads an HTML file into the WebKitWebView,
the loaded document might refer to an image (say). Then I can catch the
resource-request-starting signal happily.

On option would be to extract the relevant image or whatever to a
temporary file and then use the above hook to change the uri to
file://blah and everything would work. It'd be really nasty though, and
I don't see any reason everything can't stay in memory so...

Is there a way to give WebKit a hunk of memory at this point? I dimly
remember doing this embedding gecko back in the day and one added a
custom protocol along with a handler for it, but I'm not sure if that's
the way to do it here. Any suggestions?


Thanks,

Rupert


P.S. I asked this question on StackOverflow yesterday
     (http://goo.gl/eVQlK) and got pointed to data:// uris. If possible,
     I'd love to come up with something less icky...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 315 bytes
Desc: not available
URL: <http://lists.webkit.org/pipermail/webkit-gtk/attachments/20110405/43ccd428/attachment.bin>


More information about the webkit-gtk mailing list