if (!(textRun->GetFlags() & gfxTextRunWordCache::TEXT_IN_CACHE)) {
// Remove it now because it's not doing anything useful
gTextRuns->RemoveFromCache(textRun);
delete textRun;
So we only remove it from gTextRuns (an nsExpirationTracker) if the textrun is NOT referenced from the gfxTextRunWordCache.
(In reply to comment #29)
> If I hit enter a few lines from the end I get two textruns constructed per line
> between me and the end. roc, is that expected?
No, that sounds like a definite problem. What should happen is that in CharacterDataChanged we clear the textruns from the caret to the end, then when we reflow the line with the caret (or maybe the line before the caret), we reconstruct text runs for those lines, and then no more textrun construction happens.
Are you talking about ClearTextRun?
if (!(textRun- >GetFlags( ) & gfxTextRunWordC ache::TEXT_ IN_CACHE) ) { >RemoveFromCach e(textRun) ;
// Remove it now because it's not doing anything useful
gTextRuns-
delete textRun;
So we only remove it from gTextRuns (an nsExpirationTra cker) if the textrun is NOT referenced from the gfxTextRunWordC ache.
(In reply to comment #29)
> If I hit enter a few lines from the end I get two textruns constructed per line
> between me and the end. roc, is that expected?
No, that sounds like a definite problem. What should happen is that in CharacterDataCh anged we clear the textruns from the caret to the end, then when we reflow the line with the caret (or maybe the line before the caret), we reconstruct text runs for those lines, and then no more textrun construction happens.