[Webkit-unassigned] [Bug 136867] Should have a way to register GResources in web process

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Sep 21 23:48:47 PDT 2014


--- Comment #1 from Carlos Garcia Campos <cgarcia at igalia.com>  2014-09-21 23:48:48 PST ---
(In reply to comment #0)
> Created an attachment (id=238207)
 --> (https://bugs.webkit.org/attachment.cgi?id=238207&action=review) [details]
> Sample package demonstrating the problem
> Currently, for loading an HTML page from a GResource, such as:
> webkit_web_view_load_uri (view, "resource:///com/example/my/resource/index.html");
> you need to write a WebKitWebExtension and either compile the GResource into the extension, or call g_resource_load() and g_resources_register() in the extension's init function.

And that wouldn't be enough either, if you use multi-webprocess model, the network process needs to access the gresource as well.

> It would be convenient to provide some API such as webkit_web_view_register_gresource(view, "/path/to/my.gresource").

This might work, since we would notify the networking process to load the resources.

> See the attached tarball for a little program that demonstrates the problem. If you do not load the extension, then you get this message:
> > The resource at '/com/example/WebKitTestGResource/resource.html' does not exist
> Of course a workaround would be to load the contents of the GResource URI in the calling program, and feed it to WebKit with webkit_web_view_load_html(), but that disallows the HTML page from referencing other files in the GResource (which is why I included a CSS file in the example GResource as well.)

You could use a custom uri scheme, but all gresources would be loaded by the UI process and sent to the networking process.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list