DOMNode::getValueProperty and IE extensions and KHTMLView::layout()
Koos Vriezen
koos.vriezen at xs4all.nl
Sun Nov 10 17:32:22 GMT 2002
Hi,
Found a case that makes my cpu go wild, by getting these properties with
JS polling. It's this line 'docimpl->view()->layout();' in
DOMNode::getValueProperty, that is the cause of it.
KHTMLView::layout forces a relayout. Can't this be prevented somehow? eg.
'if ( docimpl && docimpl->hasChangedChild())' instead of 'if ( docimpl ))'
in ecma/kjs_dom.cpp:256
(Btw, doing this breaks that 'makeStatic()' floating menubar. Which
suggest that DOMNode::getValueProperty compensates for not correctly
updating after DOMNode::putValueProperty somehow.)
Another thing is that calling KHTMLView::layout() that way, it isn't
protected against d->layoutSchedulingEnabled and root->layout() does
trigger some KHTMLView::scheduleRelayout().
In KHTMLView, layout is called as
d->layoutSchedulingEnabled=false;
layout();
d->layoutSchedulingEnabled=true;
It helps a lot to move this layout protection to the beginning and end of
KHTMLView::layout() instead.
Are there any reasons to do a scheduleRelayout() while layouting?
Sorry no diff's for known reasons.
Koos
More information about the kfm-devel
mailing list