0 Replies Latest reply on Sep 13, 2009 7:34 AM by Carol L. Frampton

    [svn:fx-trunk] 10214: 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.

    Carol L. Frampton

      Revision: 10214

      Author:   cframpto@adobe.com

      Date:     2009-09-13 07:33:58 -0700 (Sun, 13 Sep 2009)

       

      Log Message:

      ***********

      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.

       

      Doc notes:

      Bugs: SDK-23002

      Reviewer: Gordon

      Tests run: checkintests, TextArea, TextInput and NumericStepper

      Is noteworthy for integration: no

       

      Ticket Links:

      ************

          http://bugs.adobe.com/jira/browse/SDK-23002

       

      Modified Paths:

      **************

          flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichEditableText.as

          flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichText.as

          flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/RichEditable TextContainerManager.as