[Webkit-unassigned] [Bug 136867] New: Should have a way to register GResources in web process
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Sep 16 13:56:02 PDT 2014
https://bugs.webkit.org/show_bug.cgi?id=136867
Summary: Should have a way to register GResources in web
process
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Enhancement
Priority: P2
Component: WebKit Gtk
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: philip.chimento at gmail.com
Created an attachment (id=238207)
--> (https://bugs.webkit.org/attachment.cgi?id=238207&action=review)
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. It would be convenient to provide some API such as webkit_web_view_register_gresource(view, "/path/to/my.gresource").
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.)
--
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