Transferred from the Adobe Open Source Subversion Repository

Revision: 3430
Author:   gruehle@adobe.com
Date:     2008-09-30T23:43:13.377931Z

Log Message:
-----------
This is a collection of minor component changes, done for consistency.

* Data is always "pushed" into skin parts. We were doing this in some places like ItemsComponent.contentGroup, but not in other places. Affected components are TextInput, TextArea, NumericStepper, and Button.

* Button (and every subclass) has an optional "labelField" SkinPart. The Button "label" property is pushed into this part if it is defined.

* Added skin states to the following components:
  TrackBase (includes H/VScrollBar and H/VSlider): States "normal" and "disabled".
  Spinner (includes NumericStepper): States "normal" and "disabled".
  ContainerBase (includes ItemsComponent, Selector, and List): States "normal" and "disabled".

  The appearance of "disabled" states is controlled by the skin. The behavior of "disabled" states is still controlled by the component (ie ScrollBar disables the thumb, track and arrow when it is disabled).

* Added new ContainerBase class, which is the base class for ItemsComponent and DataComponent. The base class manages the skin states and puts up a mouse shield when disabled.

* Thumb positioning code in slider and scrollbar always rounds to the nearest pixel boundary. Sub-pixel positioning makes the thumbs look blurry.

* TextView measurement is rounded to integer values. It was commonly returning non-integer values which was causing subsequent components in relative layouts to be positioned on sub-pixel boundaries.

Bugs: SDK-16933 Make Label be an optional part of Button and related components
QE: The pixel alignment changes may result in bitmap comparison failures. The bitmaps should be regenerated with the pixel alignment. There should be no functional changes to any of the components.
Reviewer: Chet, Ryan

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/RadioButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/HSliderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/DataComponentSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/PanelSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ApplicationSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ItemsComponentSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/NumericStepperSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/VSliderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ButtonSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/ContainerBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ToggleButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/TextAreaSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/CheckBoxSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/DataComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/HScrollBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/ItemsComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/TextInputSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/VScrollBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ListSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/SpinnerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/SelectorSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ComplexPanelSkin.mxml</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1280016 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -771,13 +771,13 @@
     {
         super.measure();

-        measuredWidth = getStyle("paddingLeft") +
+        measuredWidth = Math.round(getStyle("paddingLeft") +
                         widthInChars * charWidth +
-                        getStyle("paddingRight");
+                        getStyle("paddingRight"));

-        measuredHeight = getStyle("paddingTop") +
+        measuredHeight = Math.round(getStyle("paddingTop") +
                          heightInLines * (ascent + descent) +
-                         getStyle("paddingBottom");
+                         getStyle("paddingBottom"));

         //trace("measure", measuredWidth, measuredHeight);
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 6683
Author:   cframpto@adobe.com
Date:     2009-05-06T14:10:51.953172Z

Log Message:
-----------
Re-submit 6637/6639 with some mods to implement proxy model from SkinnableDataGroup in TextBase.

Fix misnamed tlf internal variable so pasting text with restrict, maxChars or displayAsPassword properties doesn't RTE.

Fix TextArea event dispatching so text/content bindings are triggered when the properties change. Previously all the bindings were only triggered if the text was interactively modified.  They weren't triggered correctly if either text or content was initially set on the TextArea.

Doc Notes:
Bugs: SDK-19980
Reviewers: Gordon

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/TextInput.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1280095 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -782,7 +782,7 @@
     /**
      *  @private
      *  The default is true.
-     *  TODO! The default should be true.
+     *  TODO! The default should be true but the code needs to be fixed first.
      */
     private var _autoSize:Boolean = false;

@@ -1652,11 +1652,11 @@

         // Don't trigger a damage event since we know we're recomposing.
         _inputManager.removeEventListener(
-        	DamageEvent.DAMAGE, inputManager_damageHandler);
+           	DamageEvent.DAMAGE, inputManager_damageHandler);

         // If autoSize, the text flow is already composed (although there are
         // certain styles that require a recompose since the composition width
-        // and height matter).  Setting the composition size since it will
+        // and height matter).  Setting the composition size will
         // trigger a damage event.
         if (!_autoSize || recomposeForStyles())
         {
@@ -1917,7 +1917,20 @@
      */
     private function getSelectionManager():ISelectionManager
     {
-    	return SelectionManager(_inputManager.beginInteraction());
+        // This triggers a damage event if the interactionManager is
+        // changed.  Since changing the interactionManager doesn't change
+        // the text, there is no need to trigger the damage event.
+
+        _inputManager.removeEventListener(
+            DamageEvent.DAMAGE, inputManager_damageHandler);
+
+    	var selectionManager:SelectionManager =
+    	   SelectionManager(_inputManager.beginInteraction());
+
+        _inputManager.addEventListener(
+            DamageEvent.DAMAGE, inputManager_damageHandler);
+
+        return selectionManager;
     }

     /**
@@ -1934,7 +1947,10 @@
      */
     private function getEditManager():IEditManager
     {
-    	return EditManager(_inputManager.beginInteraction());
+        // This triggers a damage event if the interactionManager is
+        // changed.
+
+        return EditManager(_inputManager.beginInteraction());
     }

     /**
@@ -2392,7 +2408,7 @@

         selectionManager.setSelection(anchorPosition, activePosition);

-        // Update the display with the new selection.
+        // Refresh the selection.  This does not cause a damage event.
         selectionManager.refreshSelection();

         releaseSelectionManager();
@@ -2423,11 +2439,12 @@

         // If no selection, then it's an append.
          if (!editManager.hasSelection())
-            editManager.setSelection(int.MAX_VALUE, int.MAX_VALUE);
+            editManager.setSelection(int.MAX_VALUE, int.MAX_VALUE);
+
+        // Our damage handler should be active.  Inserting the text invokes
+        // our damage handler to invalidate the text, maybe the size, and
+        // the display list.
         editManager.insertText(text);
-
-        // Update TLF display.  This initiates the InsertTextOperation.
-        _inputManager.updateContainer();

         // All done with edit manager.
         releaseEditManager();
@@ -2461,10 +2478,11 @@

         // An append is an insert with the selection set to the end.
         editManager.setSelection(int.MAX_VALUE, int.MAX_VALUE);
+
+        // Our damage handler should be active.  Inserting the text invokes
+        // our damage handler to invalidate the text, maybe the size, and
+        // the display list.
         editManager.insertText(text);
-
-        // Update TLF display.  This initiates the InsertTextOperation.
-        _inputManager.updateContainer();

         // All done with edit manager.
         releaseEditManager();
@@ -2677,8 +2695,11 @@
             return;

         var textScrap:TextScrap = op.scrapToPaste();
+
+        // If copied/cut from displayAsPassword field the pastedText
+        // is '*' characters but this is correct.
         var pastedText:String = TextUtil.extractText(
-            tlf_internal::textScrap.textFlow);
+            textScrap.tlf_internal::textFlow);

         // We know it's an EditManager or we wouldn't have gotten here.
         var editManager:IEditManager = getEditManager();
@@ -2906,7 +2927,7 @@
      */
     private function inputManager_damageHandler(event:DamageEvent):void
     {
-        //trace("damageHandler", event.damageStart, event.damageLength);
+        //trace("damageHandler", event.damageAbsoluteStart, event.damageLength);

         // The text flow changed.  It could have been either/or content or
         // styles within the flow.


Transferred from the Adobe Open Source Subversion Repository

Revision: 17485
Author:   aharui@adobe.com
Date:     2010-08-26T04:05:56.622744Z

Log Message:
-----------
Add 'typicalText' measurement to TextInput, TextArea and RET. We will update NumericStepper later.

Also add 'textInput' event metadata.

QE notes: none
Doc notes: new typicalText property
Bugs: SDK-26180, SDK-25542
Reviewer: Gordon
Tests run: checkintests mustella/gumbo/RichEditableText, TextInput, TextArea
Is noteworthy for integration: yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/TextInput.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1280235 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -31,6 +31,7 @@
     import flash.ui.Keyboard;

     import flashx.textLayout.compose.ISWFContext;
+	import flashx.textLayout.compose.TextLineRecycler;
     import flashx.textLayout.container.TextContainerManager;
     import flashx.textLayout.conversion.ConversionType;
     import flashx.textLayout.conversion.ITextExporter;
@@ -51,6 +52,8 @@
     import flashx.textLayout.events.FlowOperationEvent;
     import flashx.textLayout.events.SelectionEvent;
     import flashx.textLayout.events.StatusChangeEvent;
+	import flashx.textLayout.factory.StringTextLineFactory;
+	import flashx.textLayout.factory.TextFlowTextLineFactory;
     import flashx.textLayout.formats.BlockProgression;
     import flashx.textLayout.formats.Category;
     import flashx.textLayout.formats.ITextLayoutFormat;
@@ -310,9 +313,13 @@
      *  maxWidth as you type. It grows in height when you
      *  press the Enter key to start a new line.

      *
-     *
The widthInChars and heightInChars
+     *
The widthInChars and heightInLines
      *  properties provide a convenient way to specify the width and height
      *  in a way that scales with the font size.
+	 *  You can use the typicalText property as well.
+	 *  Note that if you use typicalText, the
+     *  widthInChars and heightInLines
+     *  are ignored.
      *  You can also specify an explicit width or height in pixels,
      *  or use a percent width and height, or use constraints such as
      *  left and right
@@ -398,6 +405,7 @@
      *    selectionHighlighting="TextSelectionHighlighting.WHEN_FOCUSED"
      *    text=""
      *    textFlow="TextFlow"
+     *    typicalText=null
      *    verticalScrollPosition="0"
      *    widthInChars="NaN"
      *
@@ -524,6 +532,23 @@
          */
         private static var staticConfiguration:Configuration;

+		/**
+		 *  @private
+		 *  This TLF object composes TextLines from a text String.
+		 *  We use it when the 'typicalText' property is set to a String
+		 *  that doesn't contain linebreaks.
+		 */
+		private static var staticStringFactory:StringTextLineFactory;
+
+		/**
+		 *  @private
+		 *  This TLF object composes TextLines from a TextFlow.
+		 *  We use it when the 'typicalText is set to a String
+		 *  that contains linebreaks (and therefore is interpreted
+		 *  as multiple paragraphs).
+		 */
+		private static var staticTextFlowFactory:TextFlowTextLineFactory;
+
         /**
          *  @private
          *  This TLF object is used to import a 'text' String
@@ -637,6 +662,12 @@
         //
         //--------------------------------------------------------------------------

+		/**
+		 *  @private
+		 *  The composition bounds used when creating the TextLines.
+		 */
+		mx_internal var unbounded:Rectangle = new Rectangle(0, 0, NaN, NaN);
+
         /**
          *  @private
          *  The hostFormat object in the _textContainerManager determines the
@@ -1491,10 +1522,13 @@
          *  a percent height, or both top and bottom
          *  constraints.

          *
+		 *
This property will also be ignored if the typicalText
+		 *  property is specified.

+		 *
          *
RichEditableText's measure() method uses
          *  widthInChars and heightInLines
          *  to determine the measuredWidth
-         *  and measuredHeight.
+         *  and measuredHeight.
          *  These are similar to the cols and rows
          *  of an HTML TextArea.

          *
@@ -2189,6 +2223,70 @@
             dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
         }

+		//----------------------------------
+		//  typicalText
+		//----------------------------------
+
+		/**
+		 *  @private
+		 */
+		private var typicalTextChanged:Boolean;
+
+		/**
+		 *  @private
+		 */
+		private var _typicalText:String;
+
+		/**
+		 *  @private
+		 *  Used when _typicalText is multiline
+		 */
+		private var _typicalTextFlow:TextFlow;
+
+		/**
+		 *  Text that is used to determine
+		 *  the default width and height of the control,
+		 *  without actually being displayed.
+		 *
+		 *
This property will be ignored if you specify an explicit width,
+		 *  a percent width, or both left and right
+		 *  constraints.

+		 *
+		 *
Use of this property causes the widthInChars
+		 *  and heightInLines properties to be ignored.
+		 *
+		 *  @default null
+		 *
+		 *  @see spark.primitives.heightInLines
+		 *  @see spark.primitives.widthInChars
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.0
+		 *  @productversion Flex 4.5
+		 */
+		public function get typicalText():String
+		{
+			return _typicalText;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function set typicalText(value:String):void
+		{
+			if (value == _typicalText)
+				return;
+
+			_typicalText = value;
+
+			typicalTextChanged = true;
+
+			invalidateProperties();
+			invalidateSize();
+			invalidateDisplayList();
+		}
+
         //----------------------------------
         //  widthInChars
         //----------------------------------
@@ -2226,6 +2324,9 @@
          *  a percent width, or both left and right
          *  constraints.

          *
+		 *
This property will also be ignored if the typicalText
+		 *  property is specified.

+		 *
          *
RichEditableText's measure() method uses
          *  widthInChars and heightInLines
          *  to determine the measuredWidth
@@ -2502,6 +2603,8 @@
          */
         override protected function measure():void
         {
+			var bounds:Rectangle;
+
             // If the damage handler is called while measuring text, this means
             // the text lines are damaged and the display needs to be updated.
             // This flag tells the handler to invalidate just the display list.
@@ -2522,21 +2625,85 @@
             if (isMeasureFixed())
             {
                 autoSize = false;
-
-                // Go large.  For performance reasons, want to avoid a scrollRect
-                // whenever possible in drawBackgroundAndSetScrollRect().  This is
-                // particularly true for 1 line TextInput components.
-                measuredWidth = !isNaN(explicitWidth) ? explicitWidth :
-                    Math.ceil(calculateWidthInChars());
-                measuredHeight = !isNaN(explicitHeight) ? explicitHeight :
-                    Math.ceil(calculateHeightInLines());
+
+				if (typicalText)
+				{
+					if (typicalTextChanged)
+					{
+						// If the text has linebreaks (CR, LF, or CF+LF)
+						// create a multi-paragraph TextFlow from it
+						// and use the TextFlowTextLineFactory to render it.
+						// Otherwise the StringTextLineFactory will put
+						// all of the lines into a single paragraph
+						// and FTE performance will degrade on a large paragraph.
+						if (_typicalText.indexOf("\n") != -1 || _typicalText.indexOf("\r") != -1)
+						{
+							_typicalTextFlow = staticPlainTextImporter.importToFlow(_typicalText);
+							// this helped get the factory to generate the same bounds as the
+							// composer
+							_typicalTextFlow.hostFormat = _textContainerManager.hostFormat;
+						}
+						else
+							_typicalTextFlow = null;
+						typicalTextChanged = false;
+					}
+					// if multiline...
+					if (_typicalTextFlow)
+					{
+						// create the factory if needed
+						if (!staticTextFlowFactory)
+						{
+							staticTextFlowFactory = new TextFlowTextLineFactory();
+							// set bounds to natural bounds
+							staticTextFlowFactory.compositionBounds = unbounded;
+						}
+						if (_typicalTextFlow.flowComposer)
+						{
+							_typicalTextFlow.flowComposer.swfContext =
+								ISWFContext(embeddedFontContext);
+						}
+						staticTextFlowFactory.swfContext = ISWFContext(embeddedFontContext);
+						// create the textlines
+						staticTextFlowFactory.createTextLines(tossTextLine, _typicalTextFlow);
+						// get the bounds
+						bounds = staticTextFlowFactory.getContentBounds();
+					}
+					else // single line
+					{
+						// create the factory if needed
+						if (!staticStringFactory)
+						{
+							staticStringFactory = new StringTextLineFactory();
+							// set bounds to natural bounds
+							staticStringFactory.compositionBounds = unbounded;
+						}
+						// create the textlines
+						staticStringFactory.text = _typicalText;
+						staticStringFactory.textFlowFormat = _textContainerManager.hostFormat;
+						staticStringFactory.swfContext = ISWFContext(embeddedFontContext);
+						staticStringFactory.createTextLines(tossTextLine);
+						// get the bounds
+						bounds = staticStringFactory.getContentBounds();
+					}
+
+					measuredWidth = Math.ceil(bounds.width);
+					measuredHeight = Math.ceil(bounds.height);
+				}
+				else
+				{
+	                // Go large.  For performance reasons, want to avoid a scrollRect
+	                // whenever possible in drawBackgroundAndSetScrollRect().  This is
+	                // particularly true for 1 line TextInput components.
+	                measuredWidth = !isNaN(explicitWidth) ? explicitWidth :
+	                    Math.ceil(calculateWidthInChars());
+	                measuredHeight = !isNaN(explicitHeight) ? explicitHeight :
+	                    Math.ceil(calculateHeightInLines());
+				}
             }
             else
             {
                 var composeWidth:Number;
                 var composeHeight:Number;
-
-                var bounds:Rectangle;

                 // If we're here, then at one or both of the width and height can
                 // grow to fit the text.  It is important to figure out whether
@@ -3429,6 +3596,9 @@
                 return true;
             }

+			if (typicalText != null)
+				return true;
+
             // Is there some sort of width and some sort of height?
             return  (!isNaN(explicitWidth) || !isNaN(_widthInChars) ||
                 !isNaN(widthConstraint)) &&
@@ -3548,6 +3718,10 @@
             // there is no room for text.
             if (width == 0 || height == 0)
                 return false;
+
+			// if we're using typical text, no need to remeasure
+			if (typicalText != null)
+				return false;

             if (!isNaN(widthConstraint))
             {
@@ -4541,6 +4715,15 @@
             }
         }

+		/**
+		 *  @private
+		 *  release the textline as it is temporary.
+		 */
+		private function tossTextLine(textLine:DisplayObject):void
+		{
+			TextLineRecycler.addLineForReuse(TextLine(textLine));
+		}
+
     }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 7407
Author:   aharui@adobe.com
Date:     2009-05-29T04:52:29.832809Z

Log Message:
-----------
Repair embeddedfont handling in RichEditableText.  Also switch all text primitives to using the embedded font lookup when fontLookup is FontLookup.EMBEDDED_CFF

QE Notes: None
Doc Notes: None
Bugs: SDK-21427
Reviewer: gordon
tests: checkintests mustella/gumbo/TextInput,TextArea

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1280112 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -69,7 +69,6 @@
 import mx.core.EmbeddedFont;
 import mx.core.IEmbeddedFontRegistry;
 import mx.core.IFlexModuleFactory;
-import mx.core.IFontContextComponent;
 import mx.core.IIMESupport;
 import mx.core.IUIComponent;
 import mx.core.Singleton;
@@ -221,7 +220,7 @@
  *  @productversion Flex 4
  */
 public class RichEditableText extends UIComponent
-	implements IViewport, IFontContextComponent, IIMESupport
+	implements IViewport, IIMESupport
 {
     include "../core/Version.as";

@@ -565,37 +564,6 @@

         invalidateProperties();
         invalidateDisplayList();
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Properties: IFontContextComponent
-    //
-    //--------------------------------------------------------------------------
-
-    //----------------------------------
-    //  fontContext
-    //----------------------------------
-
-    /**
-     *  @private
-     */
-    private var _fontContext:IFlexModuleFactory;
-
-    /**
-     *  @private
-     */
-    public function get fontContext():IFlexModuleFactory
-    {
-        return _fontContext;
-    }
-
-    /**
-     *  @private
-     */
-    public function set fontContext(value:IFlexModuleFactory):void
-    {
-        _fontContext = value;
     }

     //--------------------------------------------------------------------------
@@ -1974,28 +1942,28 @@
 	 */
 	private function getEmbeddedFontContext():IFlexModuleFactory
 	{
-		var moduleFactory:IFlexModuleFactory;
+		var fontContext:IFlexModuleFactory;

 		var fontLookup:String = getStyle("fontLookup");
-		if (fontLookup == "auto")
+		if (fontLookup != FontLookup.DEVICE)
         {
 			var font:String = getStyle("fontFamily");
 			var bold:Boolean = getStyle("fontWeight") == "bold";
 			var italic:Boolean = getStyle("fontStyle") == "italic";

-            moduleFactory = embeddedFontRegistry.getAssociatedModuleFactory(
-            	font, bold, italic, this, fontContext);
+            fontContext = embeddedFontRegistry.getAssociatedModuleFactory(
+            	font, bold, italic, this, moduleFactory);

             // If we found the font, then it is embedded.
             // But some fonts are not listed in info()
             // and are therefore not in the above registry.
             // So we call isFontFaceEmbedded() which gets the list
             // of embedded fonts from the player.
-            if (!moduleFactory)
+            if (!fontContext)
             {
                 var sm:ISystemManager;
-                if (fontContext != null && fontContext is ISystemManager)
-                	sm = ISystemManager(fontContext);
+                if (moduleFactory != null && moduleFactory is ISystemManager)
+                	sm = ISystemManager(moduleFactory);
                 else if (parent is IUIComponent)
                 	sm = IUIComponent(parent).systemManager;

@@ -2004,17 +1972,18 @@
                 staticTextFormat.italic = italic;

                 if (sm != null && sm.isFontFaceEmbedded(staticTextFormat))
-                    moduleFactory = sm;
+                    fontContext = sm;
             }
         }
-        else
-        {
-            moduleFactory = fontLookup == FontLookup.EMBEDDED_CFF ?
-                			fontContext :
-            				null;
-        }
-
-        return moduleFactory;
+
+        if (!fontContext && fontLookup == FontLookup.EMBEDDED_CFF)
+        {
+            // if we couldn't find the font and somebody insists it is
+            // embedded, try the default moduleFactory
+            fontContext = moduleFactory;
+        }
+
+        return fontContext;
 	}

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 10651
Author:   smgilson@adobe.com
Date:     2009-09-28T18:15:02.205799Z

Log Message:
-----------
Fix typos in ASdoc comments

QE notes: -
Doc notes: -
Bugs: -
Reviewer: -
Tests run: - checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/TLFTextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1280179 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -850,7 +850,9 @@
     private var clipAndEnableScrollingChanged:Boolean = false;

     /**
-     *  @copy mx.layout.LayoutBase#clipAndEnableScrolling
+     *  @copy spark.core.IViewport#clipAndEnableScrolling
+     *
+     *  @default false
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -891,16 +893,16 @@

     /**
      *  The height of the text.
-	 *
-	 *
Due to the fact that the Text Layout Framework
-	 *  virtualizes TextLines for performance,
-	 *  this height will initially be an estimate
-	 *  if the component cannot display all of the text.
-	 *  If you scroll to the end of the text,
-	 *  all the TextLines will get composed
-	 *  and the contentHeight will be exact.

-	 *
-	 *
To scroll over the text vertically, vary the
+     *
+     *
Due to the fact that the Text Layout Framework
+     *  virtualizes TextLines for performance,
+     *  this height will initially be an estimate
+     *  if the component cannot display all of the text.
+     *  If you scroll to the end of the text,
+     *  all the TextLines will get composed
+     *  and the contentHeight will be exact.

+     *
+     *
To scroll over the text vertically, vary the
      *  verticalScrollPosition between 0 and
      *  contentHeight - height.

      *
@@ -927,15 +929,15 @@

     /**
      *  The width of the text.
-	 *
-	 *
Due to the fact that the Text Layout Framework
-	 *  virtualizes TextLines for performance,
-	 *  this width will initially be an estimate
-	 *  if the component cannot display all of the text.
-	 *  If you scroll to the end of the text,
-	 *  all the TextLines will get composed
-	 *  and the contentWidth will be exact.

-	 *
+     *
+     *
Due to the fact that the Text Layout Framework
+     *  virtualizes TextLines for performance,
+     *  this width will initially be an estimate
+     *  if the component cannot display all of the text.
+     *  If you scroll to the end of the text,
+     *  all the TextLines will get composed
+     *  and the contentWidth will be exact.

+     *
      *
To scroll over the text horizontally, vary the
      *  horizontalScrollPosition between 0 and
      *  contentWidth - width.

@@ -968,12 +970,12 @@

     /**
      *  The number of pixels by which the text is scrolled horizontally.
-	 *
+     *
      *
To scroll over the text horizontally, vary the
      *  horizontalScrollPosition between 0 and
      *  contentWidth - width.

-	 *
-	 *  @default 0
+     *
+     *  @default 0
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -1025,12 +1027,12 @@

     /**
      *  The number of pixels by which the text is scrolled vertically.
-	 *
-	 *
To scroll over the text vertically, vary the
+     *
+     *
To scroll over the text vertically, vary the
      *  verticalScrollPosition between 0 and
      *  contentHeight - height.

-	 *
-	 *  @default 0
+     *
+     *  @default 0
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -1102,50 +1104,50 @@
      */
     [RichTextContent]

-	/**
-	 *  This property is intended for use in MXML at compile time;
-	 *  to get or set rich text content at runtime,
-	 *  please use the textFlow property instead.
-	 *
-	 *
The content property is the default property
-	 *  for RichEditableText, so that you can write MXML such as
-	 *

-	 *  <s:RichEditableText>Hello <s:span fontWeight="bold"/>World</s:span></s:RichEditableText>
-	 *

-	 *  and have the String and SpanElement that you specify
-	 *  as the content be used to create a TextFlow.

-	 *
-	 *
This property is typed as Object because you can set it to
-	 *  to a String, a FlowElement, or an Array of Strings and FlowElements.
-	 *  In the example above, you are specifying the content
-	 *  to be a 2-element Array whose first element is the String
-	 *  "Hello" and whose second element is a SpanElement with the text
-	 *  "World" in boldface.

-	 *
-	 *
No matter how you specify the content, it gets converted
-	 *  into a TextFlow, and when you get this property, you will get
-	 *  the resulting TextFlow.

-	 *
-	 *
Adobe recommends using textFlow property
-	 *  to get and set rich text content at runtime,
-	 *  because it is strongly typed as a TextFlow
-	 *  rather than as an Object.
-	 *  A TextFlow is the canonical representation
-	 *  for rich text content in the Text Layout Framework.

-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
-	public function get content():Object
-	{
-		return textFlow;
-	}
-
-	/**
-	 *  @private
-	 */
+    /**
+     *  This property is intended for use in MXML at compile time;
+     *  to get or set rich text content at runtime,
+     *  please use the textFlow property instead.
+     *
+     *
The content property is the default property
+     *  for RichEditableText, so that you can write MXML such as
+     *

+     *  <s:RichEditableText>Hello <s:span fontWeight="bold"/>World</s:span></s:RichEditableText>
+     *

+     *  and have the String and SpanElement that you specify
+     *  as the content be used to create a TextFlow.

+     *
+     *
This property is typed as Object because you can set it to
+     *  to a String, a FlowElement, or an Array of Strings and FlowElements.
+     *  In the example above, you are specifying the content
+     *  to be a 2-element Array whose first element is the String
+     *  "Hello" and whose second element is a SpanElement with the text
+     *  "World" in boldface.

+     *
+     *
No matter how you specify the content, it gets converted
+     *  into a TextFlow, and when you get this property, you will get
+     *  the resulting TextFlow.

+     *
+     *
Adobe recommends using textFlow property
+     *  to get and set rich text content at runtime,
+     *  because it is strongly typed as a TextFlow
+     *  rather than as an Object.
+     *  A TextFlow is the canonical representation
+     *  for rich text content in the Text Layout Framework.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get content():Object
+    {
+        return textFlow;
+    }
+
+    /**
+     *  @private
+     */
     public function set content(value:Object):void
     {
         // Treat setting the 'content' to null
@@ -1238,14 +1240,14 @@

     /**
      *  A flag indicating whether the user is allowed
-	 *  to edit the text in this control.
-	 *
-	 *
If true, the mouse cursor will change to an i-beam
+     *  to edit the text in this control.
+     *
+     *
If true, the mouse cursor will change to an i-beam
      *  when over the bounds of this control.
      *  If false, the mouse cursor will remain an arrow.

      *
      *
If this property is true,
-	 *  the selectable property is ignored.

+     *  the selectable property is ignored.

      *
      *  @default true
      *
@@ -1344,38 +1346,38 @@

     /**
      *  The default height of the control, measured in lines.
-	 *
+     *
      *
The control's formatting styles, such as fontSize
-	 *  and lineHeight, are used to calculate the line height
-	 *  in pixels.

-	 *
-	 *
You would, for example, set this property to 5 if you want
-	 *  the height of the RichEditableText to be sufficient
-	 *  to display five lines of text.

-	 *
-	 *
If this property is NaN (the default),
-	 *  then the component's default height will be determined
-	 *  from the text to be displayed.

+     *  and lineHeight, are used to calculate the line height
+     *  in pixels.

+     *
+     *
You would, for example, set this property to 5 if you want
+     *  the height of the RichEditableText to be sufficient
+     *  to display five lines of text.

+     *
+     *
If this property is NaN (the default),
+     *  then the component's default height will be determined
+     *  from the text to be displayed.

      *
-	 *
This property will be ignored if you specify an explicit height,
-	 *  a percent height, or both top and bottom
-	 *  constraints.

+     *
This property will be ignored if you specify an explicit height,
+     *  a percent height, or both top and bottom
+     *  constraints.

      *
      *
RichEditableText's measure() method uses
-	 *  widthInChars and heightInLines
+     *  widthInChars and heightInLines
      *  to determine the measuredWidth
-	 *  and measuredHeight.
+     *  and measuredHeight.
      *  These are similar to the cols and rows
-	 *  of an HTML TextArea.

-	 *
-	 *
Since both widthInChars and heightInLines
-	 *  default to NaN, RichTextEditable "autosizes" by default:
-	 *  it starts out very small if it has no text, grows in width as you
-	 *  type, and grows in height when you press Enter to start a new line.

-	 *
-	 *  @default NaN
-	 *
-	 *  @see spark.components.RichEditableText#widthInChars
+     *  of an HTML TextArea.

+     *
+     *
Since both widthInChars and heightInLines
+     *  default to NaN, RichTextEditable "autosizes" by default:
+     *  it starts out very small if it has no text, grows in width as you
+     *  type, and grows in height when you press Enter to start a new line.

+     *
+     *  @default NaN
+     *
+     *  @see spark.components.RichEditableText#widthInChars
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -1489,7 +1491,7 @@

     /**
      *  Determines whether the user can enter multiline text.
-	 *
+     *
      *
If true, the Enter key starts a new paragraph.
      *  If false, the Enter key doesn't affect the text
      *  but causes the RichEditableText to dispatch an "enter"
@@ -1565,11 +1567,11 @@
      *  A flag indicating whether the content is selectable
      *  with the mouse, or with the keyboard when the control
      *  has the keyboard focus.
-	 *
+     *
      *
Making the text selectable lets you copy text from the control.

-	 *
-	 *
This property is ignored if the editable
-	 *  property is true.

+     *
+     *
This property is ignored if the editable
+     *  property is true.

      *
      *  @default true
      *
@@ -1611,23 +1613,23 @@

     /**
      *  A character position, relative to the beginning of the
-	 *  text String, specifying the end of the selection
+     *  text String, specifying the end of the selection
      *  that moves when the selection is extended with the arrow keys.
      *
      *
The active position may be either the start
      *  or the end of the selection.

-	 *
-	 *
For example, if you drag-select from position 12 to position 8,
-	 *  then selectionAnchorPosition will be 12
-	 *  and selectionActivePosition will be 8,
-	 *  and when you press Left-Arrow selectionActivePosition
-	 *  will become 7.

-	 *
-	 *
A value of -1 indicates "not set".

+     *
+     *
For example, if you drag-select from position 12 to position 8,
+     *  then selectionAnchorPosition will be 12
+     *  and selectionActivePosition will be 8,
+     *  and when you press Left-Arrow selectionActivePosition
+     *  will become 7.

+     *
+     *
A value of -1 indicates "not set".

      *
      *  @default -1
-	 *
-	 *  @see spark.components.RichEditableText#selectionAnchorPosition
+     *
+     *  @see spark.components.RichEditableText#selectionAnchorPosition
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -1652,23 +1654,23 @@

     /**
      *  A character position, relative to the beginning of the
-	 *  text String, specifying the end of the selection
+     *  text String, specifying the end of the selection
      *  that stays fixed when the selection is extended with the arrow keys.
-	 *
+     *
      *
The anchor position may be either the start
      *  or the end of the selection.

-	 *
-	 *
For example, if you drag-select from position 12 to position 8,
-	 *  then selectionAnchorPosition will be 12
-	 *  and selectionActivePosition will be 8,
-	 *  and when you press Left-Arrow selectionActivePosition
-	 *  will become 7.

-	 *
-	 *
A value of -1 indicates "not set".

+     *
+     *
For example, if you drag-select from position 12 to position 8,
+     *  then selectionAnchorPosition will be 12
+     *  and selectionActivePosition will be 8,
+     *  and when you press Left-Arrow selectionActivePosition
+     *  will become 7.

+     *
+     *
A value of -1 indicates "not set".

      *
      *  @default -1
-	 *
-	 *  @see spark.components.RichEditableText#selectionActivePosition
+     *
+     *  @see spark.components.RichEditableText#selectionActivePosition
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -1707,15 +1709,15 @@
      *  and TextSelectionHighlighting.ALWAYS.

      *
      *
WHEN_FOCUSED means show the text selection
-	 *  only when the component has keyboard focus.

+     *  only when the component has keyboard focus.

      *
      *
WHEN_ACTIVE means show the text selection whenever
      *  the component's window is active, even if the component
      *  doesn't have the keyboard focus.

      *
      *
ALWAYS means show the text selection,
-	 *  even if the component doesn't have the keyboard focus
-	 *  or if the component's window isn't the active window.

+     *  even if the component doesn't have the keyboard focus
+     *  or if the component's window isn't the active window.

      *
      *  @default TextSelectionHighlighting.WHEN_FOCUSED
      *
@@ -1764,14 +1766,14 @@

     /**
      *  The text String displayed by this component.
-	 *
-	 *
Setting this property affects the textFlow property
+     *
+     *
Setting this property affects the textFlow property
      *  and vice versa.

      *
      *
If you set the text to a String such as
-	 *  "Hello World" and get the textFlow,
-	 *  it will be a TextFlow containing a single ParagraphElement
-	 *  with a single SpanElement.

+     *  "Hello World" and get the textFlow,
+     *  it will be a TextFlow containing a single ParagraphElement
+     *  with a single SpanElement.

      *
      *
If the text contains explicit line breaks --
      *  CR ("\r"), LF ("\n"), or CR+LF ("\r\n") --
@@ -1779,15 +1781,15 @@
      *  which contains multiple paragraphs, each with one span.

      *
      *
If you set the textFlow and get the text,
-	 *  the text in each paragraph will be separated by a single
+     *  the text in each paragraph will be separated by a single
      *  LF ("\n").

      *
      *
Setting this property also affects the properties
      *  specifying the control's scroll position and the text selection.
      *  It resets the horizontalScrollPosition
-	 *  and verticalScrollPosition to 0,
+     *  and verticalScrollPosition to 0,
      *  and it sets the selectionAnchorPosition
-	 *  and selectionActivePosition
+     *  and selectionActivePosition
      *  to -1 to clear the selection.

      *
      *  @default ""
@@ -1911,25 +1913,25 @@
      *  in the Text Layout Framework (TLF).
      *  It is the root of a tree of FlowElements
      *  representing rich text content.

-	 *
-	 *
You normally create a TextFlow from TLF markup
-	 *  using the TextFlowUtil.importFromString()
-	 *  or TextFlowUtil.importFromXML() methods.
-	 *  Alternately, you can use TLF's TextConverter class
-	 *  (which can import a subset of HTML) or build a TextFlow
-	 *  using methods like addChild() on TextFlow.

-     *
-	 *
Setting this property affects the text property
+     *
+     *
You normally create a TextFlow from TLF markup
+     *  using the TextFlowUtil.importFromString()
+     *  or TextFlowUtil.importFromXML() methods.
+     *  Alternately, you can use TLF's TextConverter class
+     *  (which can import a subset of HTML) or build a TextFlow
+     *  using methods like addChild() on TextFlow.

+     *
+     *
Setting this property affects the text property
      *  and vice versa.

      *
      *
If you set the textFlow and get the text,
-	 *  the text in each paragraph will be separated by a single
+     *  the text in each paragraph will be separated by a single
      *  LF ("\n").

      *
      *
If you set the text to a String such as
-	 *  "Hello World" and get the textFlow,
-	 *  it will be a TextFlow containing a single ParagraphElement
-	 *  with a single SpanElement.

+     *  "Hello World" and get the textFlow,
+     *  it will be a TextFlow containing a single ParagraphElement
+     *  with a single SpanElement.

      *
      *
If the text contains explicit line breaks --
      *  CR ("\r"), LF ("\n"), or CR+LF ("\r\n") --
@@ -1939,23 +1941,23 @@
      *
Setting this property also affects the properties
      *  specifying the control's scroll position and the text selection.
      *  It resets the horizontalScrollPosition
-	 *  and verticalScrollPosition to 0,
+     *  and verticalScrollPosition to 0,
      *  and it sets the selectionAnchorPosition
-	 *  and selectionActivePosition
+     *  and selectionActivePosition
      *  to -1 to clear the selection.

-	 *
-	 *
To turn a TextFlow object into TLF markup,
-	 *  use the TextFlowUtil.export() markup.

-	 *
-	 *
A single TextFlow cannot be shared by multiple instances
-	 *  of RichEditableText.
-	 *  To display the same text in a second instance, you must create
-	 *  a second TextFlow, either by using TextFlowUtil.export()
-	 *  and TextFlowUtil.importFromXML() or by using
-	 *  the deepCopy() method on TextFlow.

-	 *
-	 *  @see spark.utils.TextFlowUtil#importFromString()
-	 *  @see spark.utils.TextFlowUtil#importFromXML()
+     *
+     *
To turn a TextFlow object into TLF markup,
+     *  use the TextFlowUtil.export() markup.

+     *
+     *
A single TextFlow cannot be shared by multiple instances
+     *  of RichEditableText.
+     *  To display the same text in a second instance, you must create
+     *  a second TextFlow, either by using TextFlowUtil.export()
+     *  and TextFlowUtil.importFromXML() or by using
+     *  the deepCopy() method on TextFlow.

+     *
+     *  @see spark.utils.TextFlowUtil#importFromString()
+     *  @see spark.utils.TextFlowUtil#importFromXML()
      *  @see spark.components.RichEditableText#text
      *  @see spark.components.RichEditableText#horizontalScrollPosition
      *  @see spark.components.RichEditableText#verticalScrollPosition
@@ -2001,9 +2003,9 @@
     }

     /**
-	 *  @private
-	 */
-	public function set textFlow(value:TextFlow):void
+     *  @private
+     */
+    public function set textFlow(value:TextFlow):void
     {
         // Treat setting the 'textFlow' to null
         // as if 'text' were being set to the empty String
@@ -2053,41 +2055,41 @@

     /**
      *  The default width of the control, measured in em units.
-	 *
-	 *
An em is a unit of typographic measurement
-	 *  equal to the point size.
-	 *  It is not necessarily exactly the width of the "M" character,
-	 *  but in many fonts the "M" is about one em wide.
+     *
+     *
An em is a unit of typographic measurement
+     *  equal to the point size.
+     *  It is not necessarily exactly the width of the "M" character,
+     *  but in many fonts the "M" is about one em wide.
      *  The control's fontSize style is used,
-	 *  to calculate the em unit in pixels.

-	 *
-	 *
You would, for example, set this property to 20 if you want
-	 *  the width of the RichEditableText to be sufficient
-	 *  to display about 20 characters of text.

-	 *
-	 *
If this property is NaN (the default),
-	 *  then the component's default width will be determined
-	 *  from the text to be displayed.

-	 *
-	 *
This property will be ignored if you specify an explicit width,
-	 *  a percent width, or both left and right
-	 *  constraints.

-	 *
+     *  to calculate the em unit in pixels.

+     *
+     *
You would, for example, set this property to 20 if you want
+     *  the width of the RichEditableText to be sufficient
+     *  to display about 20 characters of text.

+     *
+     *
If this property is NaN (the default),
+     *  then the component's default width will be determined
+     *  from the text to be displayed.

+     *
+     *
This property will be ignored if you specify an explicit width,
+     *  a percent width, or both left and right
+     *  constraints.

+     *
      *
RichEditableText's measure() method uses
-	 *  widthInChars and heightInLines
+     *  widthInChars and heightInLines
      *  to determine the measuredWidth
-	 *  and measuredHeight.
+     *  and measuredHeight.
      *  These are similar to the cols and rows
-	 *  of an HTML TextArea.

-	 *
-	 *
Since both widthInChars and heightInLines
-	 *  default to NaN, RichTextEditable "autosizes" by default:
-	 *  it starts out very samll if it has no text, grows in width as you
-	 *  type, and grows in height when you press Enter to start a new line.

-	 *
-	 *  @default NaN
-	 *
-	 *  @see spark.primitives.heightInLines
+     *  of an HTML TextArea.

+     *
+     *
Since both widthInChars and heightInLines
+     *  default to NaN, RichTextEditable "autosizes" by default:
+     *  it starts out very samll if it has no text, grows in width as you
+     *  type, and grows in height when you press Enter to start a new line.

+     *
+     *  @default NaN
+     *
+     *  @see spark.primitives.heightInLines
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -2795,16 +2797,16 @@

     /**
      *  Inserts the specified text into the RichEditableText
-	 *  as if you had typed it.
-	 *
+     *  as if you had typed it.
+     *
      *
If a range was selected, the new text replaces the selected text.
      *  If there was an insertion point, the new text is inserted there.

-	 *
+     *
      *
An insertion point is then set after the new text.
-	 *  If necessary, the text will scroll to ensure
+     *  If necessary, the text will scroll to ensure
      *  that the insertion point is visible.

-	 *
-	 *  @param text The text to be inserted.
+     *
+     *  @param text The text to be inserted.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -2819,12 +2821,12 @@
     /**
      *  Appends the specified text to the end of the RichEditableText,
      *  as if you had clicked at the end and typed.
-	 *
+     *
      *
An insertion point is then set after the new text.
-	 *  If necessary, the text will scroll to ensure
+     *  If necessary, the text will scroll to ensure
      *  that the insertion point is visible.

-	 *
-	 *  @param text The text to be appended.
+     *
+     *  @param text The text to be appended.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -2855,14 +2857,14 @@

     /**
      *  Selects a specified range of characters.
-	 *
-	 *
If either position is negative, it will deselect the text range.

-	 *
-	 *  @param anchorPosition The character position specifying the end
-	 *  of the selection that stays fixed when the selection is extended.
-	 *
-	 *  @param activePosition The character position specifying the end
-	 *  of the selection that moves when the selection is extended.
+     *
+     *
If either position is negative, it will deselect the text range.

+     *
+     *  @param anchorPosition The character position specifying the end
+     *  of the selection that stays fixed when the selection is extended.
+     *
+     *  @param activePosition The character position specifying the end
+     *  of the selection that moves when the selection is extended.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -2904,25 +2906,25 @@

     /**
      *  Returns a TextLayoutFormat object specifying the formats
-	 *  for the specified range of characters.
-	 *
+     *  for the specified range of characters.
+     *
      *
If a format is not consistently set across the entire range,
      *  its value will be undefined.

-	 *
+     *
      *
You can specify a Vector of Strings containing the names of the
-	 *  formats that you care about; if you don't, all formats
-	 *  will be computed.

-	 *
+     *  formats that you care about; if you don't, all formats
+     *  will be computed.

+     *
      *
If you don't specify a range, the selected range is used.

-	 *
-	 *  @param requestedFormats A Vector of Strings specifying the the names
-	 *  of the requested formats, or null to request all formats.
-	 *
-	 *  @param anchorPosition A character position specifying
-	 *  the fixed end of the selection.
-	 *
-	 *  @param activePosition A character position specifying
-	 *   the movable end of the selection.
+     *
+     *  @param requestedFormats A Vector of Strings specifying the the names
+     *  of the requested formats, or null to request all formats.
+     *
+     *  @param anchorPosition A character position specifying
+     *  the fixed end of the selection.
+     *
+     *  @param activePosition A character position specifying
+     *   the movable end of the selection.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -3044,18 +3046,18 @@

     /**
      *  Applies the specified format to the specified range.
-	 *
-	 *
The supported formats are those in TextFormatLayout.
+     *
+     *
The supported formats are those in TextFormatLayout.
      *  A value of undefined does not get applied.
-	 *  If you don't specify a range, the selected range is used.

-	 *
+     *  If you don't specify a range, the selected range is used.

+     *
      *
For example, calling
-	 *

+     *

      *  var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();
      *  textLayoutFormat.fontSize = 12;
      *  textLayoutFormat.color = 0xFF0000;
      *  setFormatOfRange(textLayoutFormat);
-	 *

+     *

      *  will set the fontSize and color of the selection.

      *
      *  @langversion 3.0
@@ -3532,16 +3534,16 @@
         else if (content is Array)
         {
             textFlow = new TextFlow();
-			textFlow.whiteSpaceCollapse = getStyle("whiteSpaceCollapse");
+            textFlow.whiteSpaceCollapse = getStyle("whiteSpaceCollapse");
             textFlow.mxmlChildren = content as Array;
-			textFlow.whiteSpaceCollapse = undefined;
+            textFlow.whiteSpaceCollapse = undefined;
         }
         else
         {
             textFlow = new TextFlow();
-			textFlow.whiteSpaceCollapse = getStyle("whiteSpaceCollapse");
+            textFlow.whiteSpaceCollapse = getStyle("whiteSpaceCollapse");
             textFlow.mxmlChildren = [ content ];
-			textFlow.whiteSpaceCollapse = undefined;
+            textFlow.whiteSpaceCollapse = undefined;
         }

         return textFlow;


Transferred from the Adobe Open Source Subversion Repository

Revision: 2698
Author:   gosmith@adobe.com
Date:     2008-08-01T00:19:14.317096Z

Log Message:
-----------
TextView now has zero default padding, to match TextBox and TextGraphic.

This means that skins like TextInputSkin and TextAreaSkin now need to set padding on their TextView, to avoid having the text displayed too close to the border. You can't just inset the TextView from the border using left/top/right/bottom because then clicks in the area between the border and the text wouldn't be detected.

Reviewer: Glenn
Bug: SDK-16290
QA: No
Doc: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/TextAreaSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/TextInputSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/graphicsClasses/TextGraphicElement.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1279998 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -16,6 +16,9 @@
 import flash.events.Event;
 import flash.text.engine.ElementFormat;
 import flash.text.engine.FontDescription;
+import flash.text.engine.FontPosture;
+import flash.text.engine.FontWeight;
+import flash.text.engine.Kerning;
 import flash.text.engine.TextBlock;
 import flash.text.engine.TextElement;
 import flash.text.engine.TextLine;
@@ -38,18 +41,25 @@
 import text.edit.SplitParOperation;
 import text.edit.StyleChangeOperation;
 import text.importExport.TextFilter;
+import text.model.BlockProgression;
 import text.model.CharacterAttributes;
 import text.model.ContainerAttributes;
+import text.model.Direction;
 import text.model.FlowElement;
 import text.model.ICharacterAttributes;
 import text.model.IContainerAttributes;
 import text.model.IParagraphAttributes;
 import text.model.LeafElement;
+import text.model.LineBreak;
 import text.model.ModelChangeEvent;
 import text.model.Paragraph;
 import text.model.ParagraphAttributes;
 import text.model.Span;
+import text.model.TextAlign;
+import text.model.TextDecoration;
 import text.model.TextFlow;
+import text.model.VerticalAlign;
+import text.model.WhitespaceCollapse;

 //--------------------------------------
 //  Events
@@ -268,7 +278,7 @@
     /**
      *  @private
      */
-    private var _blockProgression:String = "lr";
+    private var _blockProgression:String = BlockProgression.TOP_TO_BOTTOM;

     /**
      *  Documentation is not currently available.
@@ -336,7 +346,7 @@
     /**
      *  @private
      */
-    private var _direction:String = "ltr";
+    private var _direction:String = Direction.LEFT_TO_RIGHT;

     /**
      *  Documentation is not currently available.
@@ -441,7 +451,7 @@
     /**
      *  @private
      */
-    private var _fontStyle:String = "normal";
+    private var _fontStyle:String = FontPosture.NORMAL;

     /**
      *  Determines whether the text is italic.
@@ -478,7 +488,7 @@
     /**
      *  @private
      */
-    private var _fontWeight:String = "normal";
+    private var _fontWeight:String = FontWeight.NORMAL;

     /**
      *  Determines whether the text is boldface.
@@ -515,7 +525,7 @@
     /**
      *  @private
      */
-    private var _kerning:String = "auto";
+    private var _kerning:String = Kerning.AUTO;

     /**
      *  Documentation is not currrently available.
@@ -549,7 +559,7 @@
     /**
      *  @private
      */
-    private var _lineBreak:String = "toFit";
+    private var _lineBreak:String = LineBreak.TO_FIT;

     /**
      *  Documentation is not currrently available.
@@ -787,7 +797,7 @@
     /**
      *  @private
      */
-    private var _paddingBottom:Number = 4;
+    private var _paddingBottom:Number = 0;

     /**
      *  Documentation is not currently available.
@@ -821,7 +831,7 @@
     /**
      *  @private
      */
-    private var _paddingLeft:Number = 4;
+    private var _paddingLeft:Number = 0;

     /**
      *  Documentation is not currently available.
@@ -855,7 +865,7 @@
     /**
      *  @private
      */
-    private var _paddingRight:Number = 4;
+    private var _paddingRight:Number = 0;

     /**
      *  Documentation is not currently available.
@@ -889,7 +899,7 @@
     /**
      *  @private
      */
-    private var _paddingTop:Number = 4;
+    private var _paddingTop:Number = 0;

     /**
      *  Documentation is not currently available.
@@ -923,7 +933,7 @@
     /**
      *  @private
      */
-    private var _textAlign:String = "left";
+    private var _textAlign:String = TextAlign.START;

     /**
      *  Documentation is not currrently available.
@@ -957,7 +967,7 @@
     /**
      *  @private
      */
-    private var _textAlignLast:String = "left";
+    private var _textAlignLast:String = TextAlign.START;

     /**
      *  Documentation is not currrently available.
@@ -1025,7 +1035,7 @@
     /**
      *  @private
      */
-    private var _textDecoration:String = "none";
+    private var _textDecoration:String = TextDecoration.NONE;

     /**
      *  Documentation is not currrently available.
@@ -1127,7 +1137,7 @@
     /**
      *  @private
      */
-    private var _verticalAlign:String = "top";
+    private var _verticalAlign:String = VerticalAlign.TOP;

     /**
      *  Documentation is not currrently available.
@@ -1161,7 +1171,7 @@
     /**
      *  @private
      */
-    private var _whiteSpaceCollapse:String = "preserve";
+    private var _whiteSpaceCollapse:String = WhitespaceCollapse.PRESERVE;

     /**
      *  Documentation is not currrently available.


ps: bugfix - not breaking the embed

ps: bugfix - not breaking the embed

git-svn-id: 3f608e5a9a704dd448217c0a64c508e7f145cfa1@87211 6b8eccd3-e8c5-4e7d-8186-e12b5326b719

--- plugins/kalturaSharePlugin/src/kalturaSharePlugin.as
+++ plugins/kalturaSharePlugin/src/kalturaSharePlugin.as
@@ -127,16 +127,6 @@

 		private function getWidget(entry_id:String,player_id:String):void
 		{
-			if(dynamicLink)
-			{
-				directLink = dynamicLink;
-				if(_refferencer.hasOwnProperty("directLink"))
-					(_refferencer["directLink"] as KLabel).text = directLink;
-
-				return;
-			}
-
-
 			var kw:KalturaWidget = new KalturaWidget();

 			var media:Object = facade.retrieveProxy("mediaProxy");
@@ -244,6 +234,14 @@
 			 else
 				directLink = "Plugin is not configured correctly. Generator page prefix is not set";

+
+			if(dynamicLink)
+			{
+				directLink = dynamicLink;
+			}
+
+
+
 			if(_refferencer.hasOwnProperty("directLink"))
 				(_refferencer["directLink"] as KLabel).text = directLink;


Removed useless RenderStatesManager class.

--- src/aerys/minko/render/state/RenderStatesManager.as
+++ src/aerys/minko/render/state/RenderStatesManager.as
@@ -1,154 +0,0 @@
-package aerys.minko.render.state
-{
-	import aerys.minko.ns.minko;
-	import aerys.minko.render.shader.DefaultShader3D;
-	import aerys.minko.render.shader.Shader3D;
-	import aerys.minko.type.vertex.format.IVertex3DFormat;
-	import aerys.minko.type.vertex.format.Vertex3DFormat;
-
-	import flash.display3D.Context3D;
-	import flash.display3D.Context3DBlendFactor;
-	import flash.display3D.Context3DTriangleFace;
-
-	public final class RenderStatesManager
-	{
-		use namespace minko;
-
-		private static const BLENDING_STR	: Vector.<String>	= Vector.<String>([Context3DBlendFactor.DESTINATION_ALPHA,
-																				   Context3DBlendFactor.DESTINATION_COLOR,
-																				   Context3DBlendFactor.ONE,
-																				   Context3DBlendFactor.ONE_MINUS_DESTINATION_ALPHA,
-																				   Context3DBlendFactor.ONE_MINUS_DESTINATION_COLOR,
-																				   Context3DBlendFactor.ONE_MINUS_SOURCE_ALPHA,
-																				   Context3DBlendFactor.SOURCE_ALPHA,
-																				   Context3DBlendFactor.SOURCE_COLOR,
-																				   Context3DBlendFactor.ZERO]);
-
-		private static const CULLING_STR	: Vector.<String>	= Vector.<String>([Context3DTriangleFace.NONE,
-																				   Context3DTriangleFace.BACK,
-																				   Context3DTriangleFace.FRONT]);
-
-		public static const BLENDING			: uint	= RenderState.BLENDING;
-		public static const SHADER				: uint	= RenderState.SHADER;
-		public static const FORMAT				: uint	= RenderState.VERTEX_FORMAT;
-		public static const WRITE_MASK			: uint	= RenderState.WRITE_MASK;
-		public static const TRIANGLE_CULLING	: uint	= RenderState.TRIANGLE_CULLING;
-		public static const ALL					: uint	= RenderState.ALL;
-
-		private var _set		: RenderState	= new RenderState();
-		private var _popFlags	: uint				= 0;
-
-		public function get shader() : Shader3D
-		{
-			return _set.shader;
-		}
-
-		public function get blending() : uint
-		{
-			return _set.blending;
-		}
-
-		public function get vertexFormat() : IVertex3DFormat
-		{
-			return _set.vertexFormat;
-		}
-
-		public function get writeMask() : uint
-		{
-			return _set.writeMask;
-		}
-
-		public function get triangleCulling() : uint
-		{
-			return _set.triangleCulling;
-		}
-
-		public function set vertexFormat(value : IVertex3DFormat) : void
-		{
-			_set.vertexFormat = value;
-		}
-
-		public function set shader(value : Shader3D) : void
-		{
-			_set.shader = value;
-		}
-
-		public function set blending(value : uint) : void
-		{
-			_set.blending = value;
-		}
-
-		public function set writeMask(value : uint) : void
-		{
-			_set.writeMask = value;
-		}
-
-		public function set triangleCulling(value : uint) : void
-		{
-			_set.triangleCulling = value;
-		}
-
-		public function RenderStatesManager()
-		{
-			blending = Blending.NORMAL;
-			shader = new DefaultShader3D();
-			writeMask = WriteMask.ALL;
-			triangleCulling = TriangleCulling.BACK;
-			vertexFormat = null;//Vertex3DFormat.XYZ_UV;
-		}
-
-		public function push() : void
-		{
-			_set = RenderState.push(_set);
-		}
-
-		public function pop() : void
-		{
-			_popFlags |= _set.setFlags;
-			_set = RenderState.pop(_set);
-		}
-
-		public function apply(context : Context3D) : void
-		{
-			var flags : uint = _popFlags | _set.setFlags;
-
-			_popFlags = 0;
-
-			if (flags & SHADER)
-				_set.shader.prepare(context);
-
-			if (flags & TRIANGLE_CULLING)
-			{
-				var culling : uint = _set.triangleCulling;
-
-				if ((culling & TriangleCulling.FRONT)
-					&& (culling & TriangleCulling.BACK))
-				{
-					context.setCulling(Context3DTriangleFace.FRONT_AND_BACK);
-				}
-				else
-				{
-					context.setCulling(CULLING_STR[culling]);
-				}
-			}
-
-			if (flags & WRITE_MASK)
-			{
-				var mask : uint = _set.writeMask;
-
-				context.setColorMask((mask & WriteMask.COLOR_RED) != 0,
-									 (mask & WriteMask.COLOR_GREEN) != 0,
-									 (mask & WriteMask.COLOR_BLUE) != 0,
-									 (mask & WriteMask.COLOR_ALPHA) != 0);
-			}
-
-			if (flags & BLENDING)
-			{
-				var blending : uint = _set.blending;
-
-				context.setBlendFactors(BLENDING_STR[int(blending & 0xffff)],
-										BLENDING_STR[int(blending >> 16)]);
-			}
-		}
-	}
-}


changed ParserOptions.effect to ParserOptions.material according to Feature #1108 ParserOptions.defaultEffect should be ParserOptions.defaultMaterial

--- src/aerys/minko/type/loader/parser/ParserOptions.as
+++ src/aerys/minko/type/loader/parser/ParserOptions.as
@@ -1,6 +1,7 @@
 package aerys.minko.type.loader.parser
 {
 	import aerys.minko.render.Effect;
+	import aerys.minko.render.material.Material;
 	import aerys.minko.scene.node.Mesh;
 	import aerys.minko.type.animation.SkinningMethod;
 	import aerys.minko.type.loader.ILoader;
@@ -24,6 +25,7 @@
 		private var _skinningMethod				: uint;
 		private var _mipmapTextures				: Boolean;
 		private var _meshEffect					: Effect;
+		private var _material					: Material;
 		private var _vertexStreamUsage			: uint;
 		private var _indexStreamUsage			: uint;
 		private var _parser						: Class;
@@ -68,16 +70,16 @@
 			_vertexStreamUsage = value;
 		}

-		public function get effect() : Effect
+		public function get material():Material
 		{
-			return _meshEffect;
+			return _material;
 		}

-		public function set effect(value : Effect) : void
+		public function set material(value:Material):void
 		{
-			_meshEffect = value;
+			_material = value;
 		}
-
+
 		public function get mipmapTextures() : Boolean
 		{
 			return _mipmapTextures;
@@ -115,7 +117,7 @@
                 _loadSkin,
 				_skinningMethod,
 				_mipmapTextures,
-				_meshEffect,
+				_material,
 				_vertexStreamUsage,
 				_indexStreamUsage,
 				_parser
@@ -126,7 +128,7 @@
                                       loadSkin                  : Boolean 	= true,
 									  skinningMethod			: uint		= 2,
 									  mipmapTextures			: Boolean 	= true,
-									  meshEffect				: Effect 	= null,
+									  material					: Material 	= null,
 									  vertexStreamUsage			: uint 		= 0,
 									  indexStreamUsage			: uint 		= 0,
 									  parser					: Class 	= null)
@@ -135,7 +137,7 @@
             _loadSkin                   = loadSkin;
 			_skinningMethod				= skinningMethod;
 			_mipmapTextures				= mipmapTextures;
-			_meshEffect					= meshEffect || Mesh.DEFAULT_MATERIAL.effect;
+			_material					= _material || new Material();
 			_vertexStreamUsage			= vertexStreamUsage;
 			_indexStreamUsage			= indexStreamUsage;
 			_parser						= parser;


Fixed potential race condition

Fixed potential race condition

--- src/org/openvv/OVVAsset.as
+++ src/org/openvv/OVVAsset.as
@@ -193,6 +193,16 @@

 		private var _vpaidEventsDispatcher:IEventDispatcher = null;

+		/**
+		 * True if VPAID AdVideoStarted event has been received
+		 */
+		private var videoStarted:Boolean;
+		/**
+		 * True if JS is ready, and beacons are loaded if needed.
+		 */
+		private var jsReady:Boolean;
+
+
         ////////////////////////////////////////////////////////////
         //   CONSTRUCTOR
         ////////////////////////////////////////////////////////////
@@ -382,6 +392,10 @@
          * this function is called so that the ad can wait for the beacons to load before dispatching AdLoaded
          */
 		public function onJsReady(): void {
+			jsReady = true;
+			if ( videoStarted ) {
+				startImpressionTimer();
+			}
 			raiseReady();
 		}
 		/**
@@ -542,7 +556,10 @@
 					_intervalTimer = null;
 					break;
 				case VPAIDEvent.AdVideoStart:
-					startImpressionTimer();
+					videoStarted = true;
+					if ( jsReady ) {
+						startImpressionTimer();
+					}
 					break;
 				default:
 					// do nothing


Prevent 3rd-party pixel request from stalling video playback

--- src/org/openvv/OVVAsset.as
+++ src/org/openvv/OVVAsset.as
@@ -483,14 +483,14 @@
 				if (!externalInterfaceIsAvailable()) {
 					return;
 				}
-
-				var injectTag:String =
-					"var tag = document.createElement('script');"
-					+ "tag.type = \"text/javascript\";"
-					+ "tag.src = \"" + tagUrl + "\";"
-					+ "document.body.insertBefore(tag, document.body.firstChild);";
-
-				ExternalInterface.call("eval", injectTag);
+
+				var injectTag:String =
+					'function () {' +
+					'var tag = document.createElement("script");' +
+					'tag.src = "' + tagUrl + '";' +
+					'tag.type="text/javascript";' +
+					'document.getElementsByTagName("head")[0].appendChild(tag); }';
+				ExternalInterface.call( injectTag );
 			  };
 		}


adding CustomSelectableButton skins to SkinStub

--- test/fixtures/SkinStub.as
+++ test/fixtures/SkinStub.as
@@ -14,6 +14,24 @@
 		[Embed(source="assets/Play1Pressed.png")]
 		public var CustomButtonDownState:Class;

+		[Embed(source="assets/Play1Normal.png")]
+		public var CustomSelectableButtonUpState:Class;
+
+		[Embed(source="assets/Play1Hot.png")]
+		public var CustomSelectableButtonOverState:Class;
+
+		[Embed(source="assets/Play1Pressed.png")]
+		public var CustomSelectableButtonDownState:Class;
+
+		[Embed(source="assets/PauseNormal.png")]
+		public var CustomSelectableButtonUpSelectedState:Class;
+
+		[Embed(source="assets/PauseHot.png")]
+		public var CustomSelectableButtonOverSelectedState:Class;
+
+		[Embed(source="assets/PausePressed.png")]
+		public var CustomSelectableButtonDownSelectedState:Class;
+
 		public function getBitmap(alias:String):DisplayObject {
 			if(hasOwnProperty(alias)) {
 				return new this[alias]() as DisplayObject;


Transferred from the Adobe Open Source Subversion Repository

Revision: 2851
Author:   dloverin@adobe.com
Date:     2008-08-15T14:55:23.351931Z

Log Message:
-----------
API Review: The ISystemManager2 interface been copied into ISystemManger.
ISystemManager2 has been removed.
ISystemManager2.getFocus() was removed.

QE:YES
Doc: YES
Checkintests: YES
Reviewer: Alex
Bugs:

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/ToolTipManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/containers/Panel.as</path>
<path kind="file" action="D">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/ISystemManager2.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/dragClasses/DragProxy.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/Alert.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/scrollClasses/ScrollThumb.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/SystemManagerProxy.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/sliderClasses/SliderThumb.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/ISystemManager.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/DragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/utils/SandboxUtil.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/scrollClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1263013 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/utils/SecurityUtil.as
+++ frameworks/projects/framework/src/mx/utils/SecurityUtil.as
@@ -12,9 +12,10 @@
 package mx.utils
 {

+import flash.events.IEventDispatcher;
+
 import mx.sandbox.ISandboxBridgeGroup;
-import mx.managers.ISystemManager2;
-import flash.events.IEventDispatcher;
+import mx.managers.ISystemManager;

 /**
  *  Utilities for working with sandboxes.
@@ -32,7 +33,7 @@
 	/**
 	 *  Tests if there is mutual trust between a SystemManager and its parent.
 	 */
-	public static function hasMutualTrustWithParent(sm:ISystemManager2):Boolean
+	public static function hasMutualTrustWithParent(sm:ISystemManager):Boolean
 	{
 		var sandboxBridgeGroup:ISandboxBridgeGroup = sm.sandboxBridgeGroup;

@@ -52,7 +53,7 @@
      *  and one of its bridged applications.
 	 */
 	public static function hasMutualTrustWithChild(
-                                sm:ISystemManager2,
+                                sm:ISystemManager,
                                 bridge:IEventDispatcher):Boolean
 	{
 		var sandboxBridgeGroup:ISandboxBridgeGroup = sm.sandboxBridgeGroup;


Transferred from the Adobe Open Source Subversion Repository

Revision: 9467
Author:   gosmith@adobe.com
Date:     2009-08-21T21:46:43.117874Z

Log Message:
-----------
Completed the ASDoc for the nine documented Spark text classes. No more "Documentation is not currently available." Instead, there may now be too much of it. :)

QE notes: Please review the new doc and give me feedback
Doc notes: Please review and edit
Bugs: None
Reviewer: None
Tests run: ant checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextSelectionHighlighting.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/SimpleText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/events/TextOperationEvent.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1280366 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/RichText.as
+++ frameworks/projects/spark/src/spark/components/RichText.as
@@ -64,29 +64,141 @@
 [IconFile("RichText.png")]

 /**
- *  Defines text in FXG.
- *
- *
This class can display richly-formatted text, with multiple character and paragraph formats.
- *  However, it is non-interactive: it doesn't support scrolling, selection, or editing.

- *
- *
A RichText element defines a text box, specified in the parent Group element's coordinate space,
- *  to contain the provided text. The text box is specified using the x/y and width/height attributes on the RichText element.

- *
- *
Text is rendered as a graphic element similar to paths and shapes, but with a restricted subset of rendering options.
- *  RichText elements are always rendered using a solid fill color, modified by any opacity, blend mode, and color transformation
- *  defined by parent elements, and clipped to any clipping content defined on its parent elements. RichText content is only filled,
- *  not stroked.

- *
- *
RichText does not support drawing a background or border; it only renders text and inline graphics. If you want a simpler text class,
- *  use the SimpleText class. If you want a text control with more capabilities, use the RichEditableText class.

- *
- *
The RichText element automatically clips the text rendering to the bounds of the text box.

- *
- *
If you do not specify the value of the width or height properties, or if the specified value
- *  of these properties is 0, the width and height are calculated based on the text content.

- *
- *  @see mx.components.RichEditableText
- *  @see mx.graphics.SimpleText
+ *  RichText is a GraphicElement that can display one or more lines
+ *  of richly-formatted text and embedded images.
+ *
+ *
For performance reasons, it does not support scrolling,
+ *  selection, editing, clickable hyperlinks, or images loaded from URLs.
+ *  If you need those capabilities, please see the RichEditableText
+ *  class.

+ *
+ *
RichText, which is new with Flex 4, makes use of the new
+ *  Text Layout Framework (TLF) library, which in turn builds on
+ *  the new Flash Text Engine (FTE) in Flash Player 10.
+ *  In combination, they provide rich text layout using
+ *  high-quality international typography.

+ *
+ *
The Spark architecture provides three text "primitives" --
+ *  SimpleText, RichText, and RichEditableText --
+ *  as part of its pay-only-for-what-you-need philosophy.
+ *  SimpleText is the fastest and most lightweight
+ *  because it uses only FTE, not TLF,
+ *  but it is limited in its capabilities: no rich text,
+ *  no scrolling, no selection, and no editing.
+ *  RichText adds the ability to display rich text
+ *  with complex layout, but is still completely non-interactive.
+ *  RichEditableText is the slowest and heaviest,
+ *  but offers most of what TLF can do.
+ *  You should use the fastest text primitive that meets your needs.

+ *
+ *
RichText is similar to the MX control mx.controls.Text.
+ *  The MX control used the older TextField class, instead of TLF,
+ *  to display text.

+ *
+ *
The most important differences to understand are
+ *

+ *
RichText offers better typography, better support
+ *        for international languages, and better text layout than Text.

+ *
RichText has an object-oriented model of what it displays,
+ *        while Text does not.

+ *
Text is selectable, while RichText does not support selection.

+ *
Text is a UIComponent that can be used in either MX
+ *        containers such as HBox or in Spark containers such as Group.
+ *        RichText is a GraphicElement that can only be used
+ *        inside Spark containers.

+ *

+ *
+ *
+ *
RichText uses TLF's object-oriented model of rich text,
+ *  in which text layout elements such as divisions, paragraphs, spans,
+ *  and images are represented at runtime by ActionScript objects
+ *  which can be programmatically accessed and manipulated.
+ *  The central object in TLF for representing rich text is a
+ *  TextFlow, and you specify what RichText should display
+ *  by setting its textFlow property to a TextFlow instance.
+ *  (Please see the description of the textFlow
+ *  property for information about how to create one.)
+ *  You can also set the text property that
+ *  is inherited from TextGraphicElement, but if you don't need
+ *  the richness of a TextFlow, you should consider using
+ *  SimpleText instead.

+ *
+ *
At compile time, you can simply put TLF markup tags inside
+ *  the RichText tag, as in
+ *

+ *  <s:RichText>Hello <s:span fontWeight="bold">World!</s:span></s:RichText>
+ *

+ *  In this case, the MXML compiler sets the content
+ *  property, causing a TextFlow to be automatically created
+ *  from the FlowElements that you specify.

+ *
+ *
The default text formatting is determined by CSS styles
+ *  such as fontFamily, fontSize.
+ *  Any formatting information in the TextFlow overrides
+ *  the default formatting provided by the CSS styles.

+ *
+ *
You can control the spacing between lines with the
+ *  lineHeight style and the spacing between
+ *  paragraphs with the paragraphSpaceBefore
+ *  and paragraphSpaceAfter styles.
+ *  You can align or justify the text using the textAlign
+ *  and textAlignLast styles.
+ *  You can inset the text from the component's edges using the
+ *  paddingLeft, paddingTop,
+ *  paddingRight, and paddingBottom styles.

+ *
+ *
If you don't specify any kind of width for a RichText,
+ *  then the longest line, as determined by these explicit line breaks,
+ *  will determine the width of the SimpleText.

+ *
+ *
When you specify some kind of width, the text wraps at the right
+ *  edge of the component and the text is clipped when there is more
+ *  text than fits.
+ *  If you set the lineBreak style to "explicit",
+ *  new lines will start only at explicit lines breaks, such as
+ *  if you use CR ("\r"), LF ("\n"),
+ *  or CR+LF ("\r\n") in text
+ *  or if you use <p> and <br/>
+ *  in TLF markup.
+ *  In that case, lines that are wider than the control
+ *  will be clipped.

+ *
+ *
If you have more text than you have room to display it,
+ *  RichText can truncate the text for you.
+ *  Truncating text means replacing excess text
+ *  with a truncation indicator such as "...".
+ *  See the inherited properties maxDisplayedLines
+ *  and isTruncated.

+ *
+ *
By default,RichText has no background,
+ *  but you can draw one using the backgroundColor
+ *  and backgroundAlpha styles.
+ *  Borders are not supported.
+ *  If you need a border, or a more complicated background, use a separate
+ *  graphic element, such as a Rect, behind the RichText.

+ *
+ *
Because RichText uses TLF,
+ *  it supports displaying left-to-right (LTR) text such as French,
+ *  right-to-left (RTL) text such as Arabic, and bidirectional text
+ *  such as a French phrase inside of an Arabic one.
+ *  If the predominant text direction is right-to-left,
+ *  set the direction style to "rtl".
+ *  The textAlign style defaults to "start",
+ *  which makes the text left-aligned when direction
+ *  is "ltr" and right-aligned when direction
+ *  is "rtl".
+ *  To get the opposite alignment,
+ *  set textAlign to "end".

+ *
+ *
RichText uses TLF's StringTextFlowFactory and TextFlowTextLineFactory
+ *  classes to create one or more TextLine objects to statically display
+ *  its text.
+ *  For performance, its TextLines do not contain information
+ *  about individual glyphs; for more info, see
+ *  flash.text.engine.TextLineValidity.STATIC.

+ *
+ *  @see spark.primitives.RichEditableText
+ *  @see spark.primitives.SimpleText
  *
  *  @includeExample examples/RichTextExample.mxml
  *
@@ -383,7 +495,7 @@
     private var _fontContext:IFlexModuleFactory;

     /**
-     *  @private
+     *  @inheritDoc
      */
     public function get fontContext():IFlexModuleFactory
     {
@@ -491,14 +603,43 @@
 	private var textFlowChanged:Boolean = false;

 	/**
-	 *  The TextFlow displayed by this component.
-	 *
-	 *
A TextFlow is the most important class
-	 *  in the Text Layout Framework.
-	 *  It is the root of a tree of FlowElements
-	 *  representing rich text content.

-	 *
-	 *  @default
+     *  The TextFlow representing the rich text displayed by this component.
+     *
+     *
A TextFlow is the most important class
+     *  in the Text Layout Framework (TLF).
+     *  It is the root of a tree of FlowElements
+     *  representing rich text content.

+	 *
+	 *
You normally create a TextFlow from TLF markup
+	 *  using the TextFlowUtil.importFromString()
+	 *  or TextFlowUtil.importFromXML() methods.
+	 *  Alternately, you can use TLF's TextConverter class
+	 *  (which can import a subset of HTML) or build a TextFlow
+	 *  using methods like addChild() on TextFlow.

+     *
+	 *
Setting this property affects the text property
+     *  and vice versa.

+     *
+     *
If you set the textFlow and get the text,
+	 *  the text in each paragraph will be separated by a single
+     *  LF ("\n").

+     *
+     *
If you set the text to a String such as
+	 *  "Hello World" and get the textFlow,
+	 *  it will be a TextFlow containing a single ParagraphElement
+	 *  with a single SpanElement.

+     *
+     *
If the text contains explicit line breaks --
+     *  CR ("\r"), LF ("\n"), or CR+LF ("\r\n") --
+     *  then the content will be set to a TextFlow
+     *  which contains multiple paragraphs, each with one span.

+     *
+	 *
To turn a TextFlow object into TLF markup,
+	 *  use the TextFlowUtil.export() markup.

+	 *
+	 *  @see spark.utils.TextFlowUtil#importFromString()
+	 *  @see spark.utils.TextFlowUtil#importFromXML()
+     *  @see spark.primitives.RichEditableText#text
 	 */
 	public function get textFlow():TextFlow
 	{


Transferred from the Adobe Open Source Subversion Repository

Revision: 14941
Author:   cframpto@adobe.com
Date:     2010-03-23T16:14:48.350064Z

Log Message:
-----------
Merge mouseWheel scroller change 14940 from 4.x to trunk.

QE notes:
Doc notes:
Bugs:
Reviewer:
Tests run: checkintests
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Scroller.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1280475 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/Scroller.as
+++ frameworks/projects/spark/src/spark/components/Scroller.as
@@ -25,6 +25,7 @@
 import spark.components.supportClasses.SkinnableComponent;
 import spark.core.IViewport;
 import spark.core.NavigationUnit;
+import mx.core.IInvalidating;
 import mx.core.IVisualElement;
 import mx.core.IVisualElementContainer;
 import mx.core.LayoutDirection;
@@ -984,6 +985,14 @@
         // Scroll event.delta "steps".  If the VSB is up, scroll vertically,
         // if -only- the HSB is up then scroll horizontally.

+        // TODO: The problem is that viewport.validateNow() doesn’t necessarily
+        // finish the job, see http://bugs.adobe.com/jira/browse/SDK-25740.
+        // Since some imprecision in mouse-wheel scrolling is tolerable this is
+        // ok for now.  For 4.next we should add Scroller API for (reliably)
+        // scrolling in different increments and refactor code like this to
+        // depend on it.  Also applies to VScroller and HScroller mouse
+        // handlers.
+
         if (verticalScrollBar && verticalScrollBar.visible)
         {
             navigationUnit = (event.delta < 0) ? NavigationUnit.DOWN : NavigationUnit.UP;
@@ -991,7 +1000,11 @@
             {
                 var vspDelta:Number = vp.getVerticalScrollPositionDelta(navigationUnit);
                 if (!isNaN(vspDelta))
+                {
                     vp.verticalScrollPosition += vspDelta;
+                    if (vp is IInvalidating)
+                        IInvalidating(vp).validateNow();
+                }
             }
             event.preventDefault();
         }
@@ -1002,7 +1015,11 @@
             {
                 var hspDelta:Number = vp.getHorizontalScrollPositionDelta(navigationUnit);
                 if (!isNaN(hspDelta))
+                {
                     vp.horizontalScrollPosition += hspDelta;
+                    if (vp is IInvalidating)
+                        IInvalidating(vp).validateNow();
+                }
             }
             event.preventDefault();
         }