[webkit-help] Loading and viewing a .webarchive file with webkit

Frederic Gos frederic.gos at gmail.com
Thu Jun 3 08:26:23 PDT 2010


I've built a simple test program that uses webkit to show html files. I've
used the COM api from c++ under windows.

I'm able to display html comming from the web via IWebUrlRequest with both a
http: url and a file: url. this works great.
I did have to copy the CFNEtwork.resources files for the file: url to work,

Now, I need to try to make it display a .webacrhive file. I've created that
file with safari and can also load it again
with safari and it displays it fine.

In my program, when i make a file: url to the .webarchive file and use
'initWithUrl' like I did for a html file, the display is blank...

I then researched a bit more and found that IWebFrame has this loadArchive
method and thought uuuuuh ;) But alas,
now I need to build a IWebArchive object (i think) and load the data from
the .webarchive into that. I've looked at the code and
seen that the only method which is implemented in the COM api is
initFromNode (IDOMNode* etc).

So now I need to build a DOMDocument and create a node in it and load the
data into that? Is this correct? I presume this is done with
libxml2.lib kind of code? Is this the right track or am i on a wild goose

Even better, maybe someone has a sample doing just that?

I'm pretty sure it can be done since safari displays webarchive files fine.
But maybe safari isn't using webkit through the COM api and goes directly
to WebCore?

Anyway, ' ll quit babbling for now and hope someone can help push me in the
right directioin.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20100603/289034fc/attachment.html>

More information about the webkit-help mailing list