Setting CSS props and timers from JavaScript

Koos Vriezen koos.vriezen at xs4all.nl
Sun Nov 3 17:58:12 GMT 2002


On Sun, 3 Nov 2002, Dirk Mueller wrote:

> On Son, 03 Nov 2002, David Faure wrote:
>
> > I don't know the proper term. I mean something that remains at the same
> > position on screen, even when you scroll up and down.
> > This is what makeStatic is about AFAICS - and I think CSS can do it much
> > better (without polling ;)
>
> fixed positioning. it would be at least factor 10 faster :(
>
> But web programmers only learn CSS to employ it more in their crappy JS.

I can imagine, a designer is quite happy making a menubar that floats
behind scrolling (not thinking of consequences of course).

> Is the CSS style calculating the most expensive part? otherwise I wouldn't
> bother trying to optimize it. the relayout is quite optimized already for
> such cases.

It marks the document as changed and DocumentImpl::recalcStyle has
    if ( changed() ) {
        renderer()->setLayouted( false );
        renderer()->setMinMaxKnown( false );
        renderer()->layout();
        renderer()->repaint();
    }
So yes, it is expensive.

Koos





More information about the kfm-devel mailing list