[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    History continued....
From:       Waldo Bastian <bastian () kde ! org>
Date:       2000-09-30 6:35:28
[Download RAW message or body]

First of all thank you David and Simon for your explanations.
Due to them I managed to find the following problem:
When KHTMlPart::openURL is called it doesn't directly change the URL (m_url). 
It delays that to begin(). When you select "back" very fast what happens is 
that basically openURL() is called twice in a row, and only in the end 
begin() is called. And to make it worse, before the second openURL() is 
called, saveState() is called as well. Visually:

If the history looks like: url1, url2, url3.

*user presses back (1st)*
*user presses back (2nd)*
saveState() m_url == url3
openURL(url2)
saveState() m_url == url3
openURL(url1)
begin() m_url = url1

After this the history is sort of corrupted because when you now go forward 
again you end up with the content of url2 being reported as url3.

The patch below made way back in May seems to cause this.
When you revert it (and don't forget to do the same in the new restoreURL() 
as well!) things work much better when going through the history fast.
Obviously this patch was done for a reason, but I don't know which "relative 
links" it was supposed to fix. (HTTP Redirections??)

I would like to revert the patch and fix these rrelative links in some other 
way. Maybe by introducing m_referrer_url to kparts?

Cheers,
Waldo

Index: khtml_part.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/khtml_part.cpp,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -r1.115 -r1.116
--- khtml_part.cpp      2000/05/20 17:38:28     1.115
+++ khtml_part.cpp      2000/05/26 15:02:42     1.116
@@ -358,7 +358,9 @@
 
   d->m_workingURL = url;
 
-  m_url = url;
+  // initializing m_url to the new url breaks relative links when opening 
such a link after this call and _before_ begin() is called (when the first
+  // data arrives) (Simon)
+  //  m_url = url;
   kdDebug( 6050 ) << "KHTMLPart::openURL now (before started) m_url = " << 
m_url.url() << endl;
 
   emit started( d->m_job );                                                  
                            
-- 
KDE/Linux, you make the choice.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic