Re: OnStateChange not called when navigating locally?

2009-07-24 Thread Babele Dunnit
> Your code needs to be called on anchor scrolls?  

yep, also. everytime something moves, I need to re-register updated
areas and positions in order for everything to be eye-trackable.

>If so, OnLocationChange
> is the only notification you'll get.

ok. I'll work it out. thanks!


___
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding


Re: OnStateChange not called when navigating locally?

2009-07-23 Thread Boris Zbarsky

Babele Dunnit wrote:

but, now, if OnStateChange is (correctly) never called, how can I
detect the "end of load" (which is not a real load, ok..)? from where
should I call my post-load code in these cases?


Your code needs to be called on anchor scrolls?  If so, OnLocationChange 
is the only notification you'll get.


-Boris
___
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding


Re: OnStateChange not called when navigating locally?

2009-07-23 Thread Babele Dunnit
On Jul 22, 6:52 pm, Boris Zbarsky  wrote:
> Babele Dunnit wrote:
> > I just discovered that, when clicking on an already-navigated link on
> > a local (i.e. file://) URI
>
> You mean an anchor link?  The sort that just scrolls the document but
> does nothing else?  If so:

errr... yep! I just realized that...

> > OnStateChange callback is never called
>
> Right; no state changes.
>
> > and onLocationChange request is always NULL.
>
> Right; no network access.

doh.

in Italian, one would say your explaination "does not make a wrinkle".
don't know if in english is the same. it means it is concise, rock-
solid, absolutely logical, nothing more to add. Thanks.

but, now, if OnStateChange is (correctly) never called, how can I
detect the "end of load" (which is not a real load, ok..)? from where
should I call my post-load code in these cases?





___
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding


Re: OnStateChange not called when navigating locally?

2009-07-22 Thread Boris Zbarsky

Babele Dunnit wrote:

I just discovered that, when clicking on an already-navigated link on
a local (i.e. file://) URI


You mean an anchor link?  The sort that just scrolls the document but 
does nothing else?  If so:



OnStateChange callback is never called


Right; no state changes.


and onLocationChange request is always NULL.


Right; no network access.

-Boris
___
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding


Re: OnStateChange not called when navigating locally?

2009-07-22 Thread steve lu

Prehaps you are casting it to a nsIHttpChannel first?

// don't want to do this
nsCOMPtr< nsIHttpChannel > httpChannel = do_QueryInterface( request );


NS_IMETHODIMP Browser::OnStateChange( nsIWebProgress* progress, 
nsIRequest* request,

PRUint32 progressStateFlags, nsresult status )
{
nsCOMPtr aURL;
nsCOMPtr aChannel = do_QueryInterface( request );
if (aChannel)
{
result = aChannel->GetOriginalURI(getter_AddRefs(aURL));
if (NS_SUCCEEDED(result))
{
nsEmbedCString str;
aURL->GetScheme(str);
if (str.Equals("file"))
{
// loading local file just fine.
}
}
}

Steve

Babele Dunnit wrote:

Hi,

I just discovered that, when clicking on an already-navigated link on
a local (i.e. file://) URI, OnStateChange callback is never called,
and onLocationChange request is always NULL. Is this a bug? Or is this
behaviour related to reading from cache an already clicked link? I
have some important initialization and finalization code in
OnStateChange and it is never called...

___
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

  


___
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding