[prev in list] [next in list] [prev in thread] [next in thread]
List: kfm-devel
Subject: Re: Table rendering problem, feature or normal ?
From: Martijn Klingens <mklingens () yahoo ! com>
Date: 2001-11-24 16:37:58
[Download RAW message or body]
On Saturday 24 November 2001 13:29, Martijn Klingens wrote:
> I already asked about this before (read the archives). If I understand the
> code that does the relayouting and I can come up with a decent scheme that
> adjusts itself better to the environment then I might try to patch it a
> bit.
I looked a bit in rendering/render_root.cpp/h as suggested by Peter Kelly in
my earlier thread. The code is not completely clear to me, but my first
impression is that a relayout is triggered very early during page loading:
rendering/render_root.cpp line 264+:
if (parsing())
{
if (!updateTimer.isNull() && updateTimer.elapsed() < timeout)
return;
else
updateTimer.start();
}
I wonder if it wouldn't be better to suppress all relayouting until we are
either done loading the page completely or at least 2 seconds have expired.
I haven't actually tried yet, but my suspicion is that now upon the very
first time when entering this function the updateTimer is still a null timer.
Given the rest of this function that would mean that instead of waiting for
the first timeout (which is set later in this function to a minimum of 2
seconds) this very first call will always relayout.
Would the attached (and _untested_!) diff at least help delaying the first
relayout until a sane moment?
Or am I at the completely wrong track here?
Martijn
PS: Sorry for not testing this code, but my current KDE 3 is not exactly in a
functioning state. And I don't feel like hacking my stable KDE 2.2 that I'm
using now...
["render_root.diff" (text/x-diff)]
Index: render_root.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/rendering/render_root.cpp,v
retrieving revision 1.89
diff -b -u -p -r1.89 render_root.cpp
--- render_root.cpp 2001/11/21 13:22:25 1.89
+++ render_root.cpp 2001/11/24 16:32:33
@@ -266,7 +266,16 @@ void RenderRoot::updateHeight()
if (!updateTimer.isNull() && updateTimer.elapsed() < timeout)
return;
else
+ if( updateTimer.isNull() )
+ {
+ // This is our first relayout, delay until either the
+ // page is loaded or at least two seconds have expired
updateTimer.start();
+ timeout = 2000;
+ return;
+ }
+ else
+ updateTimer.start();
}
int oldHeight = docHeight();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic