[PATCH] When is KHTMLView done with rendering?
Jeroen Wijnhout
Jeroen.Wijnhout at kdemail.net
Fri Jun 18 16:44:53 BST 2004
Hi,
It's me again :-) So the last patch did not fix all the bugs mentioned in
57360 (it is actually a bunch of duplicate bugs). The problem lies in
detecting whether to skip loading the page and jump to the anchor directly,
or to jump after loading.
I propose the following:
o If url.hasRef() is true, we should jump to an anchor, either delayed or
directly.
o If urlcmp( url.url(), m_url.url(), true, true ) && !args.reload &&
!args.redirectedRequest() && !args.doPost() && !isFrameSet
is true, we can be sure the page is not modified, reloading is not
necessary.
I'm not too sure about the !isFrameSet, what is it for?
best,
Jeroen
-- Index: khtml_part.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/khtml_part.cpp,v
retrieving revision 1.1006
diff -u -p -r1.1006 khtml_part.cpp
--- khtml_part.cpp 17 Jun 2004 19:57:48 -0000 1.1006
+++ khtml_part.cpp 18 Jun 2004 15:29:24 -0000
@@ -535,12 +535,13 @@ bool KHTMLPart::openURL( const KURL &url
isFrameSet = htmlDoc->body() && (htmlDoc->body()->id() == ID_FRAMESET);
}
- if ( !isFrameSet && !args.redirectedRequest() &&
- url.hasRef() && !args.doPost() && !args.reload )
+ if ( url.hasRef() )
{
- //if new url == old url, jump to anchor straight away, no need to reload
- if (urlcmp( url.url(), m_url.url(), true, true ))
+ //if new url == old url, jump to anchor straight away
+ //no need to reload unless explicitly asked
+ if (urlcmp( url.url(), m_url.url(), true, true ) && !args.reload &&
+ !args.redirectedRequest() && !args.doPost() && !isFrameSet )
{
kdDebug( 6050 ) << "KHTMLPart::openURL, jumping to anchor. m_url = "
<< url.url() << endl;
Kile - an Integrated LaTeX Environment for KDE
http://kile.sourceforge.net
More information about the kfm-devel
mailing list