Bug 64895 - Wrong URL loaded into child frame after back/forward navigation
: Wrong URL loaded into child frame after back/forward navigation
Status: RESOLVED FIXED
: WebKit
WebCore Misc.
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2011-07-20 14:11 PST by
Modified: 2011-08-17 13:18 PST (History)


Attachments
patch (5.42 KB, patch)
2011-07-20 14:25 PST, Nate Chapin
no flags Review Patch | Details | Formatted Diff | Diff
Patch for landing (5.56 KB, patch)
2011-07-22 11:14 PST, Nate Chapin
no flags Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2011-07-20 14:11:11 PST
Original report at http://code.google.com/p/chromium/issues/detail?id=59576.

Repro steps:
1. Display a web page
2. In the web page, display an iframe or object containing html
3. Navigate back & forward
4. In the same web page, display another iframe containing a different html page

The problem is in the logic in FrameLoader::loadURLIntoChildFrame to load a child frame from a HistoryItem instead of from the url.  I think we only want to load from a HistoryItem before the load event.

Note that this problem is prevented by the page cache because the old contents of the child frame are immediately present and the display of a  new frame will typically add a new Frame rather than overwrite.
------- Comment #1 From 2011-07-20 14:25:11 PST -------
Created an attachment (id=101509) [details]
patch
------- Comment #2 From 2011-07-20 18:25:57 PST -------
(From update of attachment 101509 [details])
View in context: https://bugs.webkit.org/attachment.cgi?id=101509&action=review

Is the current behavior (that the URL is restored for iframes for back-forward navigations) tested anywhere?

> LayoutTests/fast/loader/child-frame-add-after-back-forward.html:9
> +    layoutTestController.overridePreference('WebKitUsesPageCachePreferenceKey', 0);

You may want to add an unload handler too, so that the page cache is disabled when running the test in Safari too.
------- Comment #3 From 2011-07-21 15:13:05 PST -------
(In reply to comment #2)
> (From update of attachment 101509 [details] [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=101509&action=review
> 
> Is the current behavior (that the URL is restored for iframes for back-forward navigations) tested anywhere?

Yeah, if I comment out the if() statement and everything inside, 2 tests each in fast/history and http/tests/navigation fail.

> 
> > LayoutTests/fast/loader/child-frame-add-after-back-forward.html:9
> > +    layoutTestController.overridePreference('WebKitUsesPageCachePreferenceKey', 0);
> 
> You may want to add an unload handler too, so that the page cache is disabled when running the test in Safari too.

Good point.
------- Comment #4 From 2011-07-22 11:14:03 PST -------
Created an attachment (id=101743) [details]
Patch for landing
------- Comment #5 From 2011-07-22 12:02:11 PST -------
(From update of attachment 101743 [details])
Clearing flags on attachment: 101743

Committed r91583: <http://trac.webkit.org/changeset/91583>
------- Comment #6 From 2011-07-22 12:02:15 PST -------
All reviewed patches have been landed.  Closing bug.
------- Comment #7 From 2011-08-17 13:18:15 PST -------
*** Bug 64402 has been marked as a duplicate of this bug. ***