2013-04-11 08:25:51 +00:00
|
|
|
resources/first-page.html - willSendRequest <NSURLRequest URL resources/first-page.html, main document URL resources/first-page.html, http method GET> redirectResponse (null)
|
2013-08-09 18:40:48 +00:00
|
|
|
go-back-cached-main-resource.html - didFinishLoading
|
2013-04-11 08:25:51 +00:00
|
|
|
resources/first-page.html - didReceiveResponse <NSURLResponse resources/first-page.html, http status code 0>
|
|
|
|
resources/first-page.html - didFinishLoading
|
|
|
|
resources/other-page.html - willSendRequest <NSURLRequest URL resources/other-page.html, main document URL resources/other-page.html, http method GET> redirectResponse (null)
|
|
|
|
resources/other-page.html - didReceiveResponse <NSURLResponse resources/other-page.html, http status code 0>
|
|
|
|
resources/other-page.html - didFinishLoading
|
|
|
|
resources/first-page.html - willSendRequest <NSURLRequest URL resources/first-page.html, main document URL resources/first-page.html, http method GET> redirectResponse (null)
|
|
|
|
resources/first-page.html - didReceiveResponse <NSURLResponse resources/first-page.html, http status code 0>
|
|
|
|
resources/first-page.html - didFinishLoading
|
|
|
|
resources/other-page.html - willSendRequest <NSURLRequest URL resources/other-page.html, main document URL resources/other-page.html, http method GET> redirectResponse (null)
|
|
|
|
resources/other-page.html - didReceiveResponse <NSURLResponse resources/other-page.html, http status code 0>
|
|
|
|
resources/other-page.html - didFinishLoading
|
Inconsistencies in main resource load delegates when loading from history
https://bugs.webkit.org/show_bug.cgi?id=150927
Reviewed by Michael Catanzaro.
Source/WebCore:
When restoring a page from the page cache, even though there
isn't an actual load of resources, we are still emitting the load
delegates to let the API layer know there are contents being
loaded in the web view. This makes the page cache restoring
transparent for the API layer. However, when restoring a page from
the cache, all the delegates are emitted after the load is
committed. This is not consistent with real loads, where we first
load the main resource and once we get a response we commit the
load. This inconsistency is problematic if the API layer expects
to always have a main resource with a response when the load is
committed. This is the case of the GTK+ port, for example. So,
this patch ensures that when a page is restored from the page
cache, the main resource load delegates that are emitted until a
response is received in normal loads, are emitted before the load
is committed.
Test: http/tests/loading/main-resource-delegates-on-back-navigation.html
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad): When loading from
the page cache, send delegate messages up to didReceiveResponse
for the main resource before the load is committed, and the
remaining messages afterwards.
LayoutTests:
Add test to check that main resource load delegates are emitted in
the same order before the load is committed when loading a page
from history with the page cache enabled and disabled.
* http/tests/loading/main-resource-delegates-on-back-navigation-expected.txt: Added.
* http/tests/loading/main-resource-delegates-on-back-navigation.html: Added.
* http/tests/loading/resources/page-go-back-onload.html: Added.
* loader/go-back-cached-main-resource-expected.txt:
Canonical link: https://commits.webkit.org/171092@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-01-12 08:23:36 +00:00
|
|
|
resources/first-page.html - willSendRequest <NSURLRequest URL resources/first-page.html, main document URL resources/first-page.html, http method GET> redirectResponse (null)
|
2013-04-11 08:25:51 +00:00
|
|
|
resources/first-page.html - didReceiveResponse <NSURLResponse resources/first-page.html, http status code 0>
|
|
|
|
resources/first-page.html - didFinishLoading
|
|
|
|
This test check the following situation:
|
|
|
|
|
|
|
|
First you navigate to a page (first-page.html).
|
|
|
|
Then you go to another page (other-page.html).
|
|
|
|
You repeat previous steps again (going to first-page.html and then to other-page.html).
|
|
|
|
Finally you click back.
|
|
|
|
The problem was that the resource load callbacks when going back to the cached main resource were not being called.
|
|
|
|
|
|
|
|
See bug #112418.
|