Bug 17598
Summary: | FrameLoader should treat all location changes during onload as redirects | ||
---|---|---|---|
Product: | WebKit | Reporter: | Peter Kasting <pkasting> |
Component: | Page Loading | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | abarth, grahamperrin, mihaip, sam |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | All |
Peter Kasting
Currently the FrameLoader treats some types of location changes as redirects: meta refresh 0, setting document.location.href (I think this is treated as a redirect at any time, though perhaps it should only be treated as such before/during onload). Other cases can fall through the cracks, however. For example, a page that has an onload handler that does a form.submit with a form action that's a different URL to load should be treated as a client redirect, but is not.
I think any location change before/during onload should be treated as a redirect, but the example above is the only concrete case where I know this doesn't happen; maybe there are others.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Brady Eidson
Interesting.
Wonder how hard it would be to concoct a series of tests to demonstrate Firefox and even IE's behavior, to compare against WebKit
Peter Kasting
abarth has been doing some work on FrameLoader.
Mihai Parparita
I've been working on implementing this for my fix for bug 42861. The bug comments have test cases that compare Chrome, Safari, Firefox and IE's behavior in a bunch of scenarios, but briefly, changes to window.location.href up until the onload handler finishes running shouldn't generate a session history entry, but programmatic form submits should (if we want to be consistent with other browsers, the HTML 5 spec is silent on this matter).
*** This bug has been marked as a duplicate of bug 42861 ***