Bug 25211 - Navigation policy delegate performs the action on the second time through regardless of policy decision
Summary: Navigation policy delegate performs the action on the second time through reg...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: All OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-15 10:36 PDT by David Carson
Modified: 2009-04-28 10:43 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Carson 2009-04-15 10:36:58 PDT
In the FrameLoader.cpp:
void FrameLoader::checkNavigationPolicy(const ResourceRequest& request, DocumentLoader* loader,
    PassRefPtr<FormState> formState, NavigationPolicyDecisionFunction function, void* argument)
{
....
    // Don't ask more than once for the same request or if we are loading an empty URL.
    // This avoids confusion on the part of the client.
    if (equalIgnoringHeaderFields(request, loader->lastCheckedRequest()) || (!request.isNull() && request.url().isEmpty())) {
        function(argument, request, 0, true);
        loader->setLastCheckedRequest(request);
        return;
    }
...
    m_client->dispatchDecidePolicyForNavigationAction(&FrameLoader::continueAfterNavigationPolicy,
        action, request, formState);
...
}
On the second call to checkNavigationPolicy(), the action is just taken.

This is specifically noticeable with HTML that jumps to a fragment. If the user clicks a link such as <a href="#page2"> and the client application responded Ignore to the policy and the user clicks the same link again, we will scroll to the anchor position.