Date: 2009-09-13 07:33:58 -0700 (Sun, 13 Sep 2009)
This fixes the problem that if two text components share the same textFlow there is an infinite loop involving updateDisplayList -> damageHandler -> invalidateDisplaylist -> back to updateDisplayList. The bug file was for TextArea which is RET but the same bug was in RichText as well.
This example with a renderer exposed it because the typicalItem that is composed to figure out sizes and the actual first item in the list share the same textFlow. It actually has nothing to do with useVirtualDisplay other than it was sharing a textFlow.
It turns out that the TextFlowFactory dispatches damage events every time the textFlow is composed. Unlike when the flowComposer is used, it always considers the flow damaged. It was exacerbated by each of the two components having a damage handler for the same textFlow.
The solution is to use the textFlow generation number. In the damageHandler if the generation is the last known generation number, assume no changes, and return immediately from the damage handler.
QE notes: There are 1 TextArea, 6 TextInput and 2 NumericStepper failuers, with or without my changes. The common link seems to be DispatchKeyEvent. Most were testing maxChar, displayAsPassword and restrict. I tested these and they seem to be working correctly.
Tests run: checkintests, TextArea, TextInput and NumericStepper
Is noteworthy for integration: no