XML Patch For FOUC
Alexander Kellett
lypanov@kde.org
Wed, 15 Jan 2003 12:15:06 +0100
On Wed, Jan 15, 2003 at 10:22:32PM +1030, Peter Kelly wrote:
> On Wed, 15 Jan 2003, Alexander Kellett wrote:
> > quick question to cvs khtml people, why is parentNode()->renderer()
> > asserted in some attach() methods but not in others?, bugs?
>
> IIRC, The way that the attaching process works is that children are
> always suposed to be attached after their parents, and detached before
> their parents. So you can never have a situation where a child is attached
> but not a parent.
>
> So the asserts could probably be put in all places - it's probably just
> been overlooked when some methods were written.
okay now i'm really confused :). why are there lots of parentNode()->renderer()
codepaths being added in that case?. from what i see parentNode() is the
parent (logically :)), and therefore given how you describe the attach process
(thanks for the explanation btw!)
but the parentNode()->renderer() otoh is not always there from what i see.
therefore the renderer()'s are created in a delayed fashion once all the
pending stylesheets are loaded. thus, the attach() methods are called twice?
once for the addChild and once for the rendering style addition? or are the
setStyle's done via some other hierarchical/recursive process once the
stylesheets are available?, is this maybe the purpose of the addition to
+++ html/html_documentimpl.cpp 15 Jan 2003 11:57:47 -0000
@@ -302,6 +302,13 @@ void HTMLDocumentImpl::close()
getDocument()->dispatchWindowEvent(EventImpl::LOAD_EVENT, false, false);
updateRendering();
+
+ // Always do a layout/repaint after loading.
+ if (renderer()) {
+ if (!renderer()->layouted())
+ renderer()->layout();
+ renderer()->repaint();
+ }
}
}
okay, so, i'm quite amazingly confused now :)
Alex
p.s: code pointers are just as good as explanations :)
--
"[...] Konqueror open source project. Weighing in at less than
one tenth the size of another open source renderer"
Apple, Jan 2003 (http://www.apple.com/safari/)