[webkit-dev] FrameLoaderClient notifications

Patrick Hanna phanna at email.unc.edu
Thu Mar 13 06:36:51 PDT 2008


Can you get the provisionalDocumentLoader from the FrameLoader and use  
that url?

Patrick

On Mar 13, 2008, at 9:19 AM, Artem Ananiev wrote:

> Hi, Patrick,
>
> in Java port we do the same: store Frame* in FrameLoaderClient.  
> However, this frame's loader URL can't be used, for example, in  
> postProgressStartedNotification as it contains the current URL, not  
> the URL which is about to be loaded...
>
> Thanks,
>
> Artem
>
> Patrick Hanna wrote:
>> Artem,
>> For our port, we construct the FrameLoaderClient with a pointer to  
>> the Frame object. So in all the progress notification callbacks we  
>> can say m_frame->loader()->url() or whatever to get the current url  
>> of the frame.
>> Patrick
>> On Mar 13, 2008, at 7:11 AM, Artem Ananiev wrote:
>>> Hi,
>>>
>>> I work on dispatching web load/progress events for Java port and  
>>> have some questions about notifications in FrameLoaderClient class.
>>>
>>> 1. What is the right method to implement to get a 'page load  
>>> started' and 'page load finished' events? I tried the following  
>>> methods:
>>>
>>> postProgressStartedNotification()
>>> postProgressFinishedNotification()
>>>
>>> and the problem is they don't accept any params, so I can't get an  
>>> URL being loaded. If I obtain the URL from frame->loader- 
>>> >documentLoader, it works for 'progress finished' notification,  
>>> but returns an old URL for 'progress started'.
>>>
>>> 2. What is the right method to implement to get a 'main document  
>>> load started'? I see the method
>>>
>>> dispatchDidLoadMainResource()
>>>
>>> but there is no similar method about starting...
>>>
>>> 3. As I understand, the right way to handle resources (for  
>>> example, images) loading is to track methods
>>>
>>> assignIdentifierToInitialRequest()
>>> dispatchWillSendRequest()
>>> dispatchDidFinishLoading()
>>>
>>> The latter two methods provide request identifiers which are  
>>> assigned in the former one. However, sometimes I see two  
>>> 'dispatchWillSendRequest' calls with the same ids and different  
>>> URLs. For example, when loading www.google.com I the first URL is www.google.com 
>>>  and the second is www.google.co.uk. How is this situation should  
>>> be handled?
>>>
>>> 4. There are several notifications about resource loading is  
>>> finished:
>>>
>>> dispatchDidFinishLoading()
>>> dispatchDidFinishLoad()
>>> dispatchDidFinishDocumentLoad()
>>>
>>> didFinishLoad() - is this a notification?
>>> finishedLoading() - is this a notification?
>>>
>>> Some of them provide DocumentLoader instances, others have no  
>>> parameters passed. What is the difference between these methods?  
>>> Are some of them outdated and shouldn't be used at all?
>>>
>>> Thanks,
>>>
>>> Artem
>>> _______________________________________________
>>> webkit-dev mailing list
>>> webkit-dev at lists.webkit.org
>>> http://lists.webkit.org/mailman/listinfo/webkit-dev



More information about the webkit-dev mailing list