From kfm-devel Mon Jun 24 20:03:06 2002 From: Koos Vriezen Date: Mon, 24 Jun 2002 20:03:06 +0000 To: kfm-devel Subject: Re: Text Selection Speed X-MARC-Message: https://marc.info/?l=kfm-devel&m=102494929400312 On Mon, 24 Jun 2002, Dirk Mueller wrote: > On Son, 23 Jun 2002, Koos Vriezen wrote: > > > On Sun, 23 Jun 2002, Dirk Mueller wrote: > > > > > On Son, 23 Jun 2002, Koos Vriezen wrote: > > > > > > > movies. The whole page is repainted all the time when repainting is > > > > delayed to 40 ms (which speed up text selection). > > > > BTW what do you think of not re-rescheduling repainting of rectangles? > > > > > > Sorry ? > > QUpperLeftRect.unite(QLowerRightRect) > > Well, collapsing several rectangular repaint requests certainly makes sense, > thats why we introduced the "scheduling". Making one big rectangle out of two far away small rectangles. > > > But nodeAtPoint is virtual, and is reimplmented in RenderFlow. > > How common is that to have specialObjects? > > Very. There is basically no non-trivial page without dozens of them. > > > Don't use the cache in that > > case or make it a separate function that could be called first. > > Possible. but you have to check them in the right order.. just checking the > specialobjects alone isn't enough. Ok, making the cache a bit smarter. Add a RenderObject* to RenderObject::InnerNode and: void breakCache(RenderObject *ro, int _tx, int _ty) { if (!m_breakcache) { m_breakcache = ro; tx = _tx; ty = _ty; } } In RenderFlow::nodeAtPoint if (containsSpecial()) info.breakCache(this, _tx, _ty); And in DocumentImpl::prepareMouseEvent if (d->cachedInnerNode && ((d->cachedInnerNode->m_breakcache && d->cachedInnerNode->m_breakcache->nodeAtPoint(....)) || (!d->cachedInnerNode->m_breakcache && d->cachedInnerNode->innerNode()->renderer()->nodeAtPoint(...))) { ........ Should solve that. Koos