Bug 53785

Summary: WebKit2: Pages with dynamically inserted iframes can add extraneous back/forward items.
Product: WebKit Reporter: Brady Eidson <beidson>
Component: WebKit2Assignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: darin
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch + layout test (v1) andersca: review+

Description Brady Eidson 2011-02-04 10:17:23 PST
WebKit2: Pages with dynamically inserted iframes can add extraneous back/forward items.

First noticed at http://www.cnn.com/ with dynamically appended iframes related to facebook.

Turns out this is because the "decidePolicyForNavigationAction" policy delegate is asynchronous, and WebCore can't handle that too well.  The answer to that policy delegate is what sets up the provisional DocumentLoader in the FrameLoader, and if it's not synchronous, the FrameLoader can't tell the DocumentLoader "this is a quick redirect - you shouldn't add a back/forward history item"

Making the delegate call synchronous is the cleanest way to fix this for now.

LayoutTest will be included in the upcoming patch.

In radar as <rdar://problem/8636239>
Comment 1 Brady Eidson 2011-02-04 12:24:42 PST
Created attachment 81263 [details]
Patch + layout test (v1)
Comment 2 Brady Eidson 2011-02-04 12:39:03 PST
http://trac.webkit.org/changeset/77657