Bug 18658 - Unable to access DocumentLoader inside dispatchDecidePolicyForNavigationAction
Summary: Unable to access DocumentLoader inside dispatchDecidePolicyForNavigationAction
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac All
: P3 Trivial
Assignee: Darin Fisher (:fishd, Google)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-21 09:15 PDT by Darin Fisher (:fishd, Google)
Modified: 2008-04-21 10:53 PDT (History)
0 users

See Also:


Attachments
patch (3.57 KB, patch)
2008-04-21 09:17 PDT, Darin Fisher (:fishd, Google)
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Fisher (:fishd, Google) 2008-04-21 09:15:37 PDT
Unable to access DocumentLoader inside dispatchDecidePolicyForNavigationAction

When the FrameLoaderClient's dispatchDecidePolicyForNavigationAction method is called, the FrameLoader's provisionalDocumentLoader will be NULL.  This happens because the provisionalDocumentLoader is promoted to the FrameLoader's policyDocumentLoader before dispatchDecidePolicyForNavigationAction is called.  However, the FrameLoader's policyDocumentLoader is a private member, which lacks a public accessor.  So, this bug is about adding a public accessor for the policyDocumentLoader.

Why would this be useful?  A FrameLoaderClient that subclasses DocumentLoader (via the createDocumentLoader method) may want to access DocumentLoader specific fields during FrameLoaderClient callbacks.
Comment 1 Darin Fisher (:fishd, Google) 2008-04-21 09:17:06 PDT
Created attachment 20728 [details]
patch

This patch adds FrameLoader::policyDocumentLoader, and it also changes the signature of FrameLoader::provisionalDocumentLoader to be const.  That was done for consistency with the other related methods.
Comment 2 Darin Fisher (:fishd, Google) 2008-04-21 09:17:47 PDT
FYI, I discussed this patch with andersca on #webkit, and at the time he agreed that this was a good idea.
Comment 3 Eric Seidel (no email) 2008-04-21 10:47:21 PDT
Comment on attachment 20728 [details]
patch

r=me
Comment 4 Eric Seidel (no email) 2008-04-21 10:53:24 PDT
	M	WebCore/ChangeLog
	M	WebCore/WebCore.base.exp
	M	WebCore/WebCore.order
	M	WebCore/loader/FrameLoader.cpp
	M	WebCore/loader/FrameLoader.h
Committed r32320