WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
Bug 78510
[WK2] Implement WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache()
https://bugs.webkit.org/show_bug.cgi?id=78510
Summary
[WK2] Implement WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache()
Carlos Garcia Campos
Reported
2012-02-13 11:32:21 PST
It's currently unimplemented in WebKit2. It's needed to keep track of loaded resources in the UI process.
Attachments
Add attachment
proposed patch, testcase, etc.
Sam Weinig
Comment 1
2012-02-13 13:51:12 PST
Why do you want to track loaded resources in the UI Process. I would like to reduce the API surface area that does this as much as possible going forward.
Carlos Garcia Campos
Comment 2
2012-02-14 00:27:20 PST
We want to provide a web_view_get_subresources() API similar to WebKit1, typically used to implement save(). Resources are cached by the web view and released before every load. When reloading, cached resources are still loaded (with 304 http response), but when loading the same url twice, resources in memory are not loaded at all. In this case, we release the resources cached by the web view before the second load, and the view only sees the resources that are not in memory. So the effect is basically: loadURI(
http://foo.com
) n_resources1 = getResources().size() loadURI(
http://foo.com
) n_resources2 = getResources().size() n_resources1 != n_resources2
Sam Weinig
Comment 3
2012-02-14 12:03:43 PST
(In reply to
comment #2
)
> We want to provide a web_view_get_subresources() API similar to WebKit1, typically used to implement save(). Resources are cached by the web view and released before every load. When reloading, cached resources are still loaded (with 304 http response), but when loading the same url twice, resources in memory are not loaded at all. In this case, we release the resources cached by the web view before the second load, and the view only sees the resources that are not in memory. So the effect is basically: > > loadURI(
http://foo.com
) > n_resources1 = getResources().size() > loadURI(
http://foo.com
) > n_resources2 = getResources().size() > > n_resources1 != n_resources2
This is not something that we want to support in the UIProcess, at least at this time.
Carlos Garcia Campos
Comment 4
2012-02-14 23:28:57 PST
(In reply to
comment #3
)
> This is not something that we want to support in the UIProcess, at least at this time.
Would you accept at least adding only injected bundle api for it? I understand it's actually a corner case, there's only a problem when the same url is loaded twice (reloading wouldn't be affected).
Martin Robinson
Comment 5
2012-02-14 23:41:56 PST
(In reply to
comment #3
)
> This is not something that we want to support in the UIProcess, at least at this time.
Our port doesn't use Web Archives, so we'll need some method to save bundles of web content to avoid feature regressions in the Gnome platform. I believe in WebKit1 we implement this by freezing the contents of all resources to disk. Is the best approach here just to add GTK-only IPC calls between the WebProcess and UIProcess to support saving all subresources of a page?
Carlos Garcia Campos
Comment 6
2012-02-23 10:27:40 PST
I've noticed that for some resources loaded from memory cache the loader client callbacks are still emitted, but for CSSImageValue images they are not. I'm not sure if there are more resources affected, though. Is that expected or a bug? If normal resource load callback are amitted we don't need WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache() at all.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug