make the tokenizer periodically relinquish control, going back to the
event loop, for increased responsiveness.
This give stylesheets more opportunities to load and make sure the UI
does not freeze.
There are actually two yeld delays. A short one is used at the beginning
of parsing, and until the first successful painting has happened, then
a longer delay is used (unless the view ceased to paint for a full
roundtrip, in which case the delay reverts to short).
This for two reasons:
1 - when painting has happened, it necessarily means all stylesheets have
loaded, so a longer delay may be used to make sure the page still
completes its load as fast as possible - now that meaningful informations
are displayed.
2 - when a view is not interacted with (such as when loaded in a
background tab) and not even painted, it must affect as little as possible
the responsiveness of pages being actually painted/scrolled. Thus the
need to keep a short delay for the whole parsing of those.
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/KDE/kdelibs@867195 283d02a7-25f6-0310-bc7c-ecb5cbfe19da