RESOLVED INVALID 136526
Committed URL is not reset when a new load starts
https://bugs.webkit.org/show_bug.cgi?id=136526
Summary Committed URL is not reset when a new load starts
Carlos Garcia Campos
Reported 2014-09-04 03:37:02 PDT
The committed URL of PageLoadState and frame is not reset when a new load starts. One of the problems I've noticed is that if the page fails, the active URL after didFailProvisionalLoadWithErrorForFrame() is the one from previous load. In the PageLoadBasic unit test we check that the committed URL is null in didStartProvisionalLoadForFrame(), it works because it's the first load, if we start a new load the test fails.
Attachments
Patch (17.36 KB, patch)
2014-09-04 03:42 PDT, Carlos Garcia Campos
ap: review-
Carlos Garcia Campos
Comment 1 2014-09-04 03:42:08 PDT
Created attachment 237616 [details] Patch I've rewritten the unit tests to use a test class and make easier to add more test cases.
Alexey Proskuryakov
Comment 2 2014-09-04 11:00:20 PDT
Comment on attachment 237616 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=237616&action=review > Source/WebKit2/ChangeLog:8 > + Reset the committed URL when a new load starts. I don't see how this can be right. When a load hasn't been committed yet, the current page is unchanged - this is the very reason for having an uncommitted state. If the user starts a load and immediately hits Esc to cancel, the page should remain in the same state that it was before load.
Carlos Garcia Campos
Comment 3 2014-09-10 00:38:58 PDT
(In reply to comment #2) > (From update of attachment 237616 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=237616&action=review > > > Source/WebKit2/ChangeLog:8 > > + Reset the committed URL when a new load starts. > > I don't see how this can be right. When a load hasn't been committed yet, the current page is unchanged - this is the very reason for having an uncommitted state. If the user starts a load and immediately hits Esc to cancel, the page should remain in the same state that it was before load. I see your point, and I agree that's the last committed URL in the page/frame, but I'm not so sure that's the active URL. I guess we need to define what the active URL is, though. This is what we have in the WebKitGTK+ API documentation: http://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebView.html#webkit-web-view-get-uri It doesn't say anything about the active URL when the provisional load fails, what do you think it should be?
Carlos Garcia Campos
Comment 4 2014-09-18 03:25:01 PDT
I agree we should not reset the commited URL on new load, closing as invalid.
Note You need to log in before you can comment on or make changes to this bug.