git commit: [flex-tlf] [refs/heads/develop] - FLEX-35078 removing unused functions, local variables and inner classes while reading the code.

2017-12-19 Thread mihaic
Repository: flex-tlf
Updated Branches:
  refs/heads/develop 7fe228452 -> 6d4fd303f


FLEX-35078 removing unused functions, local variables and inner classes while 
reading the code.


Project: http://git-wip-us.apache.org/repos/asf/flex-tlf/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-tlf/commit/6d4fd303
Tree: http://git-wip-us.apache.org/repos/asf/flex-tlf/tree/6d4fd303
Diff: http://git-wip-us.apache.org/repos/asf/flex-tlf/diff/6d4fd303

Branch: refs/heads/develop
Commit: 6d4fd303f4f2faa1b39f021f2603434bbe6aaf72
Parents: 7fe2284
Author: Mihai Chira 
Authored: Tue Dec 19 13:25:11 2017 +0100
Committer: Mihai Chira 
Committed: Tue Dec 19 13:25:11 2017 +0100

--
 .../src/flashx/textLayout/edit/TextClipboard.as | 51 ++--
 1 file changed, 5 insertions(+), 46 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/6d4fd303/textLayout/src/flashx/textLayout/edit/TextClipboard.as
--
diff --git a/textLayout/src/flashx/textLayout/edit/TextClipboard.as 
b/textLayout/src/flashx/textLayout/edit/TextClipboard.as
index 28b4acd..a5a5514 100644
--- a/textLayout/src/flashx/textLayout/edit/TextClipboard.as
+++ b/textLayout/src/flashx/textLayout/edit/TextClipboard.as
@@ -120,7 +120,7 @@ package flashx.textLayout.edit
 * calling setContents(). In AIR, this restriction 
only applies to content outside of 
 * the application security sandbox. 
 * 
-* @param scrap The TextScrap to paste into the clipboard.
+* @param textScrap The TextScrap to paste into the clipboard.
 * 
 * @see flash.events.Event#COPY
 * @see flash.events.Event#CUT
@@ -211,8 +211,7 @@ package flashx.textLayout.edit
var xmlTree:XML = new XML(textOnClipboard);
if (xmlTree.localName() == "TextScrap")
{   // read the old clipboard format
-   var beginArrayChild:XML = 
xmlTree..*::BeginMissingElements[0];
-   var endArrayChild:XML = 
xmlTree..*::EndMissingElements[0];
+var endArrayChild:XML = xmlTree..*::EndMissingElements[0];
var textLayoutMarkup:XML = 
xmlTree..*::TextFlow[0];
var textFlow:TextFlow = 
TextConverter.importToFlow(textLayoutMarkup, TextConverter.TEXT_LAYOUT_FORMAT);
if (textFlow)
@@ -246,48 +245,10 @@ package flashx.textLayout.edit
}
return null;
}
-   
-   private static function getBeginArray(beginArrayChild:XML, 
textFlow:TextFlow):Array
-   {
-   var beginArray:Array = new Array();
-   var curFlElement:FlowElement = textFlow;
-   if (beginArrayChild != null)
-   {
-   var value:String = (beginArrayChild.@value != 
undefined) ? String(beginArrayChild.@value) : "";
-   beginArray.push(textFlow);
-   var posOfComma:int = value.indexOf(",");
-   var startPos:int;
-   var endPos:int;
-   var curStr:String;
-   var indexIntoFlowElement:int;
-   while (posOfComma >= 0)
-   {
-   startPos = posOfComma + 1;
-   posOfComma = value.indexOf(",", 
startPos);
-   if (posOfComma >= 0)
-   {
-   endPos = posOfComma;
-   } else {
-   endPos = value.length;
-   }
-   curStr = value.substring(startPos, 
endPos);
-   if (curStr.length > 0)
-   {
-   indexIntoFlowElement = 
parseInt(curStr);
-   if (curFlElement is 
FlowGroupElement)
-   {
-   curFlElement = 
(curFlElement as FlowGroupElement).getChildAt(indexIntoFlowElement);
-   
beginArray.push(curFlElement);
-   

[1/2] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35362 Added unit test to reproduce the bug. As expected, it currently fails.

2017-10-18 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 243507a73 -> 4c6018325


FLEX-35362 Added unit test to reproduce the bug. As expected, it currently 
fails.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/23a306cc
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/23a306cc
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/23a306cc

Branch: refs/heads/develop
Commit: 23a306cc8a08bfb21165aed7647a4f1ba6edbc4b
Parents: 243507a
Author: Mihai Chira 
Authored: Wed Oct 18 14:41:02 2017 +0200
Committer: Mihai Chira 
Committed: Wed Oct 18 14:41:02 2017 +0200

--
 .../DropDownListBase_FLEX_35362_Tests.as| 60 
 1 file changed, 60 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/23a306cc/frameworks/projects/spark/tests/spark/components/DropDownListBase_FLEX_35362_Tests.as
--
diff --git 
a/frameworks/projects/spark/tests/spark/components/DropDownListBase_FLEX_35362_Tests.as
 
b/frameworks/projects/spark/tests/spark/components/DropDownListBase_FLEX_35362_Tests.as
new file mode 100644
index 000..1c081df
--- /dev/null
+++ 
b/frameworks/projects/spark/tests/spark/components/DropDownListBase_FLEX_35362_Tests.as
@@ -0,0 +1,60 @@
+package spark.components {
+import flash.events.Event;
+import flash.events.EventDispatcher;
+import flash.events.KeyboardEvent;
+import flash.ui.Keyboard;
+
+import org.flexunit.asserts.assertTrue;
+import org.flexunit.async.Async;
+import org.fluint.uiImpersonation.UIImpersonator;
+
+public class DropDownListBase_FLEX_35362_Tests {
+private var _sut:DropDownList;
+private static const NO_ENTER_FRAMES_TO_ALLOW:int = 2;
+private static var noEnterFramesRemaining:int = NaN;
+private static const _finishNotifier:EventDispatcher = new 
EventDispatcher();
+
+[Before]
+public function setUp():void
+{
+_sut = new DropDownList();
+}
+
+[After]
+public function tearDown():void
+{
+_sut = null;
+UIImpersonator.removeAllChildren();
+}
+
+[Test(async, timeout=1000)]
+public function 
test_pressing_END_right_after_opening_doesnt_trigger_fatal():void
+{
+//given
+UIImpersonator.addChild(_sut);
+
+noEnterFramesRemaining = NO_ENTER_FRAMES_TO_ALLOW;
+UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, 
onEnterFrame);
+Async.handleEvent(this, _finishNotifier, Event.COMPLETE, 
then_open_drop_down_and_press_key, 300);
+}
+
+private function then_open_drop_down_and_press_key(event:Event, 
passThroughData:Object):void
+{
+//when
+_sut.openDropDown();
+_sut.dispatchEvent(new KeyboardEvent(KeyboardEvent.KEY_DOWN, true, 
false, 0, Keyboard.END, 0, true, false, false, true, false));
+
+//then - no fatal thrown
+assertTrue(true);
+}
+
+private static function onEnterFrame(event:Event):void
+{
+if(!--noEnterFramesRemaining)
+{
+
UIImpersonator.testDisplay.removeEventListener(Event.ENTER_FRAME, onEnterFrame);
+_finishNotifier.dispatchEvent(new Event(Event.COMPLETE));
+}
+}
+}
+}



[2/2] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35362 CAUSE: the DropDownController signals that the DropDownListBase is open immediately, even before the latter has actually made that change

2017-10-18 Thread mihaic
FLEX-35362 CAUSE: the DropDownController signals that the DropDownListBase is 
open immediately, even before the latter has actually made that change on 
stage. Since the opening takes one or two frames, it leaves a few milliseconds 
in which code which relies on that open/closed state erroneously assumes that 
it can use elements that should be on stage or initialized. In this case it's 
the layout property, which, due to the skin of the DropDownList, is only 
initialized once the drop down is actually open.

SOLUTION: we check whether the layout is not-null, and if it is, we select 
items in the list as if it were closed.

NOTES:
-also edited some comments, simplified Array instantiation, and removed an 
empty constructor.
-now the unit test will pass.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/4c601832
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/4c601832
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/4c601832

Branch: refs/heads/develop
Commit: 4c60183258caf23020d7398f6d2ffdab747d0e56
Parents: 23a306c
Author: Mihai Chira 
Authored: Wed Oct 18 14:56:22 2017 +0200
Committer: Mihai Chira 
Committed: Wed Oct 18 14:56:22 2017 +0200

--
 .../flatspark/src/flatspark/utils/ColorUtils.as | 16 
 .../components/supportClasses/DropDownListBase.as   |  3 +--
 .../src/spark/components/supportClasses/ListBase.as |  6 +++---
 3 files changed, 8 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4c601832/frameworks/projects/flatspark/src/flatspark/utils/ColorUtils.as
--
diff --git a/frameworks/projects/flatspark/src/flatspark/utils/ColorUtils.as 
b/frameworks/projects/flatspark/src/flatspark/utils/ColorUtils.as
index 09f9cb2..e9007c3 100644
--- a/frameworks/projects/flatspark/src/flatspark/utils/ColorUtils.as
+++ b/frameworks/projects/flatspark/src/flatspark/utils/ColorUtils.as
@@ -45,15 +45,10 @@ package flatspark.utils
public static const Concrete:uint = 0x95A5A6;
public static const Asbestos:uint = 0x7F8C8D;

-   public function ColorUtils()
-   {
-   
-   }   
-   
public static function ButtonColor(brand:int, estado:State):uint
{
// All the possible colors
-   var cores:Array = new Array(
+   var cores:Array = [
ButtonColorEnum.PrimaryUp, 
ButtonColorEnum.PrimaryHover, ButtonColorEnum.PrimaryDown, 
ButtonColorEnum.PrimaryDisabled,
ButtonColorEnum.SuccessUp, 
ButtonColorEnum.SuccessHover, ButtonColorEnum.SuccessDown, 
ButtonColorEnum.SuccessDisabled,
ButtonColorEnum.WarningUp, 
ButtonColorEnum.WarningHover, ButtonColorEnum.WarningDown, 
ButtonColorEnum.WarningDisabled,
@@ -61,7 +56,7 @@ package flatspark.utils
ButtonColorEnum.DefaultUp, 
ButtonColorEnum.DefaultHover, ButtonColorEnum.DefaultDown, 
ButtonColorEnum.DefaultDisabled,
ButtonColorEnum.InfoUp, 
ButtonColorEnum.InfoHover, ButtonColorEnum.InfoDown, 
ButtonColorEnum.InfoDisabled,
ButtonColorEnum.DangerUp, 
ButtonColorEnum.DangerHover, ButtonColorEnum.DangerDown, 
ButtonColorEnum.DangerDisabled
-   );
+   ];

// Map all the allowed states
var numeroEstado:int = 1;
@@ -80,11 +75,8 @@ package flatspark.utils
numeroEstado = 3;
break;
}
-   
-   var posicao:int = 1;
-   posicao = 4 * (brand - 1) + (numeroEstado - 1); 
-   
-   return cores[posicao];
+
+   return cores[4 * (brand - 1) + (numeroEstado - 1)];
}
}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4c601832/frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as
--
diff --git 
a/frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as
 
b/frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as
index aaba442..c80c2b4 100644
--- 
a/frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as
+++ 

git commit: [flex-sdk] [refs/heads/develop] - FLEX-35321 CAUSE: if the object isn't on stage when we'd normally set its initialized flag to true, we correctly skip this step, but we also need to set i

2017-08-30 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop fcc25865f -> 243507a73


FLEX-35321 CAUSE: if the object isn't on stage when we'd normally set its 
initialized flag to true, we correctly skip this step, but we also need to set 
its updateCompletePendingFlag back to false, so that in case it's added to 
stage again it can work correctly, and have its initialized flag set to true as 
expected. This second step was skipped in the previous commit. This could be 
noticed, for example, in DataGrid, which would not show the renderers which it 
initially used in GridViewLayout.updateTypicalCellSizes().
SOLUTION: set the updateCompletePendingFlag to false even if the object isn't 
on stage anymore.
NOTES: also removed unused imports and an unused local variable.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/243507a7
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/243507a7
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/243507a7

Branch: refs/heads/develop
Commit: 243507a7346b6acbba755833a970dccdb48cf375
Parents: fcc2586
Author: Mihai Chira 
Authored: Wed Aug 30 10:27:35 2017 +0200
Committer: Mihai Chira 
Committed: Wed Aug 30 10:27:35 2017 +0200

--
 .../projects/framework/src/mx/managers/LayoutManager.as  | 11 ---
 1 file changed, 4 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/243507a7/frameworks/projects/framework/src/mx/managers/LayoutManager.as
--
diff --git a/frameworks/projects/framework/src/mx/managers/LayoutManager.as 
b/frameworks/projects/framework/src/mx/managers/LayoutManager.as
index d070203..131838e 100644
--- a/frameworks/projects/framework/src/mx/managers/LayoutManager.as
+++ b/frameworks/projects/framework/src/mx/managers/LayoutManager.as
@@ -19,14 +19,10 @@
 
 package mx.managers
 {
-import flash.display.DisplayObject;
-import flash.display.Sprite;
 import flash.display.Stage;
 import flash.events.Event;
 import flash.events.EventDispatcher;
 
-import mx.core.ILayoutElement;
-import mx.core.UIComponent;
 import mx.core.UIComponentGlobals;
 import mx.core.mx_internal;
 import mx.events.DynamicEvent;
@@ -852,8 +848,9 @@ public class LayoutManager extends EventDispatcher 
implements ILayoutManager
 obj.initialized = true;
 if (obj.hasEventListener(FlexEvent.UPDATE_COMPLETE))
 obj.dispatchEvent(new 
FlexEvent(FlexEvent.UPDATE_COMPLETE));
-obj.updateCompletePendingFlag = false;
 }
+
+obj.updateCompletePendingFlag = false;
 obj = 
ILayoutManagerClient(updateCompleteQueue.removeLargest());
 }
 
@@ -930,7 +927,6 @@ public class LayoutManager extends EventDispatcher 
implements ILayoutManager
var lastCurrentObject:ILayoutManagerClient = currentObject;

 var obj:ILayoutManagerClient;
-var i:int = 0;
 var done:Boolean = false;
 var oldTargetLevel:int = targetLevel;
 
@@ -1104,8 +1100,9 @@ public class LayoutManager extends EventDispatcher 
implements ILayoutManager
 
 if (obj.hasEventListener(FlexEvent.UPDATE_COMPLETE))
 obj.dispatchEvent(new 
FlexEvent(FlexEvent.UPDATE_COMPLETE));
-obj.updateCompletePendingFlag = false;
 }
+
+obj.updateCompletePendingFlag = false;
 obj = 
ILayoutManagerClient(updateCompleteQueue.removeLargestChild(target));
 }
 }



[3/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-18746 CAUSE: HierarchicalCollectionView.updateLength() was ignoring nodes without children, as it should. However, the function it called for t

2017-08-16 Thread mihaic
FLEX-18746 CAUSE: HierarchicalCollectionView.updateLength() was ignoring nodes 
without children, as it should. However, the function it called for the nodes 
with children, getChildren() unfortunately had a necessary side-effect (which 
is a poor design choice, to be sure), which was to add an event listener to the 
children collection. So the empty collections of nodes were not listened to, 
which meant that once the node was open any children that were added to that 
node were not counted towards the length of the collection. And one way this 
inconsistency surfaced was through the expandItem() fatal.

SOLUTION: The best - and most time-consuming - solution to this is to find a 
way to extract the side-effect of getChildren() into a separate function and 
call it when needed. However, for the moment I have opted to simply allow 
getChildren() to be called even for empty nodes, which in turn adds the event 
listeners.

NOTES: all unit tests now pass.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/fcc25865
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/fcc25865
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/fcc25865

Branch: refs/heads/develop
Commit: fcc25865f43a7f0760da5a5b1849a932349797d8
Parents: 5fb2fb6
Author: Mihai Chira 
Authored: Wed Aug 16 11:51:05 2017 +0200
Committer: Mihai Chira 
Committed: Wed Aug 16 11:51:05 2017 +0200

--
 frameworks/projects/mx/src/mx/controls/Tree.as| 2 +-
 .../src/mx/controls/treeClasses/HierarchicalCollectionView.as | 7 +++
 2 files changed, 4 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/fcc25865/frameworks/projects/mx/src/mx/controls/Tree.as
--
diff --git a/frameworks/projects/mx/src/mx/controls/Tree.as 
b/frameworks/projects/mx/src/mx/controls/Tree.as
index 5f9215a..5bf874f 100644
--- a/frameworks/projects/mx/src/mx/controls/Tree.as
+++ b/frameworks/projects/mx/src/mx/controls/Tree.as
@@ -1783,7 +1783,7 @@ public class Tree extends List implements IIMESupport
 // is the item on screen?
 if (visibleData[uid])
 {
-//find the rowindex of the row after the open thats 
opening/closing
+//find the row index of the first row after the one that's 
opening/closing
 var n:int = listItems.length;
 for (rowIndex = 0; rowIndex < n; rowIndex++)
 {

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/fcc25865/frameworks/projects/mx/src/mx/controls/treeClasses/HierarchicalCollectionView.as
--
diff --git 
a/frameworks/projects/mx/src/mx/controls/treeClasses/HierarchicalCollectionView.as
 
b/frameworks/projects/mx/src/mx/controls/treeClasses/HierarchicalCollectionView.as
index 5f357b0..59fe7e8 100644
--- 
a/frameworks/projects/mx/src/mx/controls/treeClasses/HierarchicalCollectionView.as
+++ 
b/frameworks/projects/mx/src/mx/controls/treeClasses/HierarchicalCollectionView.as
@@ -267,7 +267,7 @@ public class HierarchicalCollectionView extends 
EventDispatcher
var modelCursor:IViewCursor = treeData.createCursor();
if (modelCursor.beforeFirst)
{
-   // indicates that an IPE occured on the first 
item
+   // indicates that an IPE occurred on the first 
item
return treeData.length;
}
while (!modelCursor.afterLast)
@@ -315,8 +315,7 @@ public class HierarchicalCollectionView extends 
EventDispatcher
parentMap[uid] = parent;
if (node != null &&
openNodes[uid] &&
-   dataDescriptor.isBranch(node, treeData) &&
-   dataDescriptor.hasChildren(node, treeData))
+   dataDescriptor.isBranch(node, treeData))
{
childNodes = getChildren(node);
if (childNodes != null)
@@ -432,7 +431,7 @@ public class HierarchicalCollectionView extends 
EventDispatcher
 
 /**
 * @private
-* delegate getchildren in order to add event listeners for nested 
collections
+* delegate getChildren in order to add event listeners for nested 
collections
 */
private function getChildren(node:Object):ICollectionView
{



[1/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-18746 Added the same test, but without using opening animation. (This way the bug cannot be reproduced, which is a good clue.)

2017-08-16 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop b175cd6d2 -> fcc25865f


FLEX-18746 Added the same test, but without using opening animation. (This way 
the bug cannot be reproduced, which is a good clue.)


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/7a519a33
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/7a519a33
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/7a519a33

Branch: refs/heads/develop
Commit: 7a519a33e4e93d9657531b15e24d5684a0f80abc
Parents: b175cd6
Author: Mihai Chira 
Authored: Tue Aug 15 12:19:14 2017 +0200
Committer: Mihai Chira 
Committed: Tue Aug 15 12:19:14 2017 +0200

--
 .../tests/mx/controls/Tree_FLEX_18746_Tests.as  | 39 +++-
 1 file changed, 30 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/7a519a33/frameworks/projects/mx/tests/mx/controls/Tree_FLEX_18746_Tests.as
--
diff --git a/frameworks/projects/mx/tests/mx/controls/Tree_FLEX_18746_Tests.as 
b/frameworks/projects/mx/tests/mx/controls/Tree_FLEX_18746_Tests.as
index 26568d6..16a3cbc 100644
--- a/frameworks/projects/mx/tests/mx/controls/Tree_FLEX_18746_Tests.as
+++ b/frameworks/projects/mx/tests/mx/controls/Tree_FLEX_18746_Tests.as
@@ -18,8 +18,8 @@ package mx.controls {
 
 private static var _sut:Tree;
 private static var child:Object = {label: "Item"};
-private static var parent0:Object = {label: "Folder 0", children: new 
ArrayCollection()};
-private static var parent1:Object = {label: "Folder 1", children: new 
ArrayCollection([child])};
+private static var parent0:Object;
+private static var parent1:Object;
 
 
 [Before]
@@ -28,6 +28,10 @@ package mx.controls {
 _sut = new Tree();
 _sut.width = 200;
 _sut.height = 200;
+
+parent0 = {label: "Folder 0", children: new ArrayCollection()};
+parent1 = {label: "Folder 1", children: new 
ArrayCollection([child])};
+
 UIImpersonator.addChild(_sut);
 }
 
@@ -46,7 +50,24 @@ package mx.controls {
 
//--
 
 [Test(async, timeout=1000)]
-public function 
test_closing_previously_opened_folder_with_0_children_does_not_throw_fatal():void
+public function 
test_closing_previously_opened_folder_with_0_children_without_animation_does_not_throw_fatal():void
+{
+//given
+const dataProvider:ArrayCollection = new ArrayCollection();
+dataProvider.addItem(parent0);
+dataProvider.addItem(parent1);
+
+//when
+_sut.dataProvider = dataProvider;
+
+//then wait a few frames
+noEnterFramesToWait = 2;
+UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, 
onEnterFrame);
+Async.handleEvent(this, _finishNotifier, Event.COMPLETE, 
then_expand_second_folder, 300, {useAnimation:false});
+}
+
+[Test(async, timeout=1000)]
+public function 
test_closing_previously_opened_folder_with_0_children_using_animation_does_not_throw_fatal():void
 {
 //given
 const dataProvider:ArrayCollection = new ArrayCollection();
@@ -59,19 +80,19 @@ package mx.controls {
 //then wait a few frames
 noEnterFramesToWait = 2;
 UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, 
onEnterFrame);
-Async.handleEvent(this, _finishNotifier, Event.COMPLETE, 
then_expand_second_folder, 300);
+Async.handleEvent(this, _finishNotifier, Event.COMPLETE, 
then_expand_second_folder, 300, {useAnimation:true});
 }
 
 
 private function then_expand_second_folder(event:Event, 
passThroughData:Object):void
 {
 //when
-_sut.expandItem(parent1, true, true, true);
+_sut.expandItem(parent1, true, passThroughData.useAnimation, true);
 
 //then wait a bit
 noEnterFramesToWait = 5;
 UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, 
onEnterFrame);
-Async.handleEvent(this, _finishNotifier, Event.COMPLETE, 
then_move_child_to_first_parent_and_expand_it, 500);
+Async.handleEvent(this, _finishNotifier, Event.COMPLETE, 
then_move_child_to_first_parent_and_expand_it, 500, passThroughData);
 }
 
 private function 
then_move_child_to_first_parent_and_expand_it(event:Event, 
passThroughData:Object):void
@@ -81,19 +102,19 @@ package mx.controls {
 
 //when
 

[2/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-18746 Adding another unit test which goes to the heart of the bug - the length calculation in HierarchicalCollectionView. (Currently the test f

2017-08-16 Thread mihaic
FLEX-18746 Adding another unit test which goes to the heart of the bug - the 
length calculation in HierarchicalCollectionView. (Currently the test function 
test_opening_closing_with_Jill_having_no_children_to_begin_with() fails, as 
expected.)


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/5fb2fb63
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/5fb2fb63
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/5fb2fb63

Branch: refs/heads/develop
Commit: 5fb2fb634ea856cc0cd4034dc9bc99e4a58219d5
Parents: 7a519a3
Author: Mihai Chira 
Authored: Tue Aug 15 17:20:48 2017 +0200
Committer: Mihai Chira 
Committed: Tue Aug 15 17:20:48 2017 +0200

--
 .../Tree_FLEX_18746_Collection_Length_Tests.as  | 201 +++
 .../tests/mx/controls/Tree_FLEX_18746_Tests.as  |   6 -
 2 files changed, 201 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/5fb2fb63/frameworks/projects/mx/tests/mx/controls/Tree_FLEX_18746_Collection_Length_Tests.as
--
diff --git 
a/frameworks/projects/mx/tests/mx/controls/Tree_FLEX_18746_Collection_Length_Tests.as
 
b/frameworks/projects/mx/tests/mx/controls/Tree_FLEX_18746_Collection_Length_Tests.as
new file mode 100644
index 000..1d7a131
--- /dev/null
+++ 
b/frameworks/projects/mx/tests/mx/controls/Tree_FLEX_18746_Collection_Length_Tests.as
@@ -0,0 +1,201 @@
+package mx.controls {
+import flash.events.Event;
+import flash.events.EventDispatcher;
+
+import mx.collections.ArrayCollection;
+import mx.core.mx_internal;
+
+import org.flexunit.asserts.assertEquals;
+import org.flexunit.async.Async;
+import org.fluint.uiImpersonation.UIImpersonator;
+
+use namespace mx_internal;
+
+public class Tree_FLEX_18746_Collection_Length_Tests
+{
+private static var noEnterFramesToWait:int = NaN;
+private static const _finishNotifier:EventDispatcher = new 
EventDispatcher();
+
+private static var _sut:Tree_;
+private static var Sam:TreeItem;
+private static var Ana:TreeItem;
+private static var Jenny:TreeItem;
+private static var Marc:TreeItem;
+private static var parentJill:TreeItem;
+private static var parentJohn:TreeItem;
+
+
+[Before]
+public function setUp():void
+{
+Sam = new TreeItem("Sam");
+Ana = new TreeItem("Ana");
+Jenny = new TreeItem("Jenny");
+Marc = new TreeItem("Marc");
+
+_sut = new Tree_();
+_sut.width = 200;
+_sut.height = 200;
+
+UIImpersonator.addChild(_sut);
+}
+
+[After]
+public function tearDown():void
+{
+UIImpersonator.removeAllChildren();
+_sut = null;
+}
+
+
+[Test(async, timeout=300)]
+public function 
test_opening_closing_with_both_parents_having_at_least_one_child():void
+{
+//given
+parentJill = new TreeItem("Jill", new ArrayCollection([Marc]));
+parentJohn = new TreeItem("John", new ArrayCollection([Sam]));
+
+const dataProvider:ArrayCollection = new ArrayCollection();
+dataProvider.addItem(parentJill);
+dataProvider.addItem(parentJohn);
+
+//when
+_sut.dataProvider = dataProvider;
+
+//then wait a few frames
+noEnterFramesToWait = 2;
+UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, 
onEnterFrame);
+Async.handleEvent(this, _finishNotifier, Event.COMPLETE, 
then_expand_and_contract, 250);
+}
+
+[Test(async, timeout=300)]
+public function 
test_opening_closing_with_Jill_having_no_children_to_begin_with():void
+{
+//given
+parentJill = new TreeItem("Jill", new ArrayCollection());
+parentJohn = new TreeItem("John", new ArrayCollection([Sam]));
+
+const dataProvider:ArrayCollection = new ArrayCollection();
+dataProvider.addItem(parentJill);
+dataProvider.addItem(parentJohn);
+
+//when
+_sut.dataProvider = dataProvider;
+
+//then wait a few frames
+noEnterFramesToWait = 2;
+UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, 
onEnterFrame);
+Async.handleEvent(this, _finishNotifier, Event.COMPLETE, 
then_expand_and_contract, 250);
+}
+
+private static function then_expand_and_contract(event:Event, 
passThroughData:Object):void
+{
+//given
+var currentLength:int = _sut.collectionLength_; //current length 

[2/2] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35351 FLEX-18746 Now unit tests can be run for the mx project, and they're also included in the entire frameworks suite

2017-08-15 Thread mihaic
FLEX-35351 FLEX-18746 Now unit tests can be run for the mx project, and they're 
also included in the entire frameworks suite


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/b175cd6d
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/b175cd6d
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/b175cd6d

Branch: refs/heads/develop
Commit: b175cd6d2632091f7ef783bbcc068dbfe9735fc1
Parents: cd060ca
Author: Mihai Chira 
Authored: Tue Aug 15 11:10:14 2017 +0200
Committer: Mihai Chira 
Committed: Tue Aug 15 11:10:14 2017 +0200

--
 frameworks/build.xml | 4 
 frameworks/projects/mx/build.xml | 6 ++
 2 files changed, 10 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/b175cd6d/frameworks/build.xml
--
diff --git a/frameworks/build.xml b/frameworks/build.xml
index 500a186..2e71195 100644
--- a/frameworks/build.xml
+++ b/frameworks/build.xml
@@ -142,6 +142,7 @@
 
 
 
+
 
 

@@ -551,6 +552,9 @@
 
 
 
+
+
+
 
 
 

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/b175cd6d/frameworks/projects/mx/build.xml
--
diff --git a/frameworks/projects/mx/build.xml b/frameworks/projects/mx/build.xml
index f1ad0ad..259c7b6 100644
--- a/frameworks/projects/mx/build.xml
+++ b/frameworks/projects/mx/build.xml
@@ -229,4 +229,10 @@
 
 
 
+
+
+
+
+
+
 



[1/2] git commit: [flex-sdk] [refs/heads/develop] - FLEX-18746 Renamed the main test function and increased the timeout a bit.

2017-08-15 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop f804380f1 -> b175cd6d2


FLEX-18746 Renamed the main test function and increased the timeout a bit.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/cd060ca2
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/cd060ca2
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/cd060ca2

Branch: refs/heads/develop
Commit: cd060ca27b7f9c1cad1e3c9045cfbc64614d01e3
Parents: f804380
Author: Mihai Chira 
Authored: Tue Aug 15 11:02:24 2017 +0200
Committer: Mihai Chira 
Committed: Tue Aug 15 11:02:24 2017 +0200

--
 .../projects/mx/tests/mx/controls/Tree_FLEX_18746_Tests.as   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/cd060ca2/frameworks/projects/mx/tests/mx/controls/Tree_FLEX_18746_Tests.as
--
diff --git a/frameworks/projects/mx/tests/mx/controls/Tree_FLEX_18746_Tests.as 
b/frameworks/projects/mx/tests/mx/controls/Tree_FLEX_18746_Tests.as
index 5d64b06..26568d6 100644
--- a/frameworks/projects/mx/tests/mx/controls/Tree_FLEX_18746_Tests.as
+++ b/frameworks/projects/mx/tests/mx/controls/Tree_FLEX_18746_Tests.as
@@ -46,7 +46,7 @@ package mx.controls {
 
//--
 
 [Test(async, timeout=1000)]
-public function 
test_object_removed_from_stage_via_code_is_not_initialized():void
+public function 
test_closing_previously_opened_folder_with_0_children_does_not_throw_fatal():void
 {
 //given
 const dataProvider:ArrayCollection = new ArrayCollection();
@@ -59,7 +59,7 @@ package mx.controls {
 //then wait a few frames
 noEnterFramesToWait = 2;
 UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, 
onEnterFrame);
-Async.handleEvent(this, _finishNotifier, Event.COMPLETE, 
then_expand_second_folder, 200);
+Async.handleEvent(this, _finishNotifier, Event.COMPLETE, 
then_expand_second_folder, 300);
 }
 
 



[7/7] git commit: [flex-sdk] [refs/heads/develop] - FLEX-18746 Added unit test (current fails).

2017-08-14 Thread mihaic
FLEX-18746 Added unit test (current fails).


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/f804380f
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/f804380f
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/f804380f

Branch: refs/heads/develop
Commit: f804380f10e725aa90fee6c2ab998b3db30fe705
Parents: fea9be9
Author: Mihai Chira 
Authored: Mon Aug 14 19:56:14 2017 +0200
Committer: Mihai Chira 
Committed: Mon Aug 14 19:56:14 2017 +0200

--
 .../tests/mx/controls/Tree_FLEX_18746_Tests.as  | 112 +++
 1 file changed, 112 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f804380f/frameworks/projects/mx/tests/mx/controls/Tree_FLEX_18746_Tests.as
--
diff --git a/frameworks/projects/mx/tests/mx/controls/Tree_FLEX_18746_Tests.as 
b/frameworks/projects/mx/tests/mx/controls/Tree_FLEX_18746_Tests.as
new file mode 100644
index 000..5d64b06
--- /dev/null
+++ b/frameworks/projects/mx/tests/mx/controls/Tree_FLEX_18746_Tests.as
@@ -0,0 +1,112 @@
+package mx.controls {
+import flash.events.Event;
+import flash.events.EventDispatcher;
+
+import mx.collections.ArrayCollection;
+import mx.core.mx_internal;
+
+import org.flexunit.assertThat;
+import org.flexunit.async.Async;
+import org.fluint.uiImpersonation.UIImpersonator;
+
+use namespace mx_internal;
+
+public class Tree_FLEX_18746_Tests
+{
+private static var noEnterFramesToWait:int = NaN;
+private static const _finishNotifier:EventDispatcher = new 
EventDispatcher();
+
+private static var _sut:Tree;
+private static var child:Object = {label: "Item"};
+private static var parent0:Object = {label: "Folder 0", children: new 
ArrayCollection()};
+private static var parent1:Object = {label: "Folder 1", children: new 
ArrayCollection([child])};
+
+
+[Before]
+public function setUp():void
+{
+_sut = new Tree();
+_sut.width = 200;
+_sut.height = 200;
+UIImpersonator.addChild(_sut);
+}
+
+[After]
+public function tearDown():void
+{
+UIImpersonator.removeAllChildren();
+_sut = null;
+}
+
+
+
//--
+//
+//  Test method
+//
+
//--
+
+[Test(async, timeout=1000)]
+public function 
test_object_removed_from_stage_via_code_is_not_initialized():void
+{
+//given
+const dataProvider:ArrayCollection = new ArrayCollection();
+dataProvider.addItem(parent0);
+dataProvider.addItem(parent1);
+
+//when
+_sut.dataProvider = dataProvider;
+
+//then wait a few frames
+noEnterFramesToWait = 2;
+UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, 
onEnterFrame);
+Async.handleEvent(this, _finishNotifier, Event.COMPLETE, 
then_expand_second_folder, 200);
+}
+
+
+private function then_expand_second_folder(event:Event, 
passThroughData:Object):void
+{
+//when
+_sut.expandItem(parent1, true, true, true);
+
+//then wait a bit
+noEnterFramesToWait = 5;
+UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, 
onEnterFrame);
+Async.handleEvent(this, _finishNotifier, Event.COMPLETE, 
then_move_child_to_first_parent_and_expand_it, 500);
+}
+
+private function 
then_move_child_to_first_parent_and_expand_it(event:Event, 
passThroughData:Object):void
+{
+//then
+assertThat(_sut.isItemOpen(parent1));
+
+//when
+ArrayCollection(parent1.children).removeItemAt(0);
+_sut.expandItem(parent0, true, true, true);
+ArrayCollection(parent0.children).addItem(child);
+
+//then wait a bit
+noEnterFramesToWait = 1;
+UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, 
onEnterFrame);
+Async.handleEvent(this, _finishNotifier, Event.COMPLETE, 
then_contract_second_folder, 200);
+}
+
+private static function then_contract_second_folder(event:Event, 
passThroughData:Object):void
+{
+//when
+_sut.expandItem(parent1, false, true, true);
+
+//then no error was thrown
+assertThat(true);
+}
+
+
+private static function onEnterFrame(event:Event):void
+{
+

[6/7] git commit: [flex-sdk] [refs/heads/develop] - Merge remote-tracking branch 'origin/develop' into develop

2017-08-14 Thread mihaic
Merge remote-tracking branch 'origin/develop' into develop


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/fea9be98
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/fea9be98
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/fea9be98

Branch: refs/heads/develop
Commit: fea9be98df7c60b75b1d1141e568012c5622e2c5
Parents: 0226437 bb7447f
Author: Mihai Chira 
Authored: Tue Jun 27 09:21:18 2017 +0200
Committer: Mihai Chira 
Committed: Tue Jun 27 09:21:18 2017 +0200

--
 RELEASE_NOTES   | 42 
 .../macromedia/asc/embedding/LintEvaluator.java |  8 +++-
 2 files changed, 49 insertions(+), 1 deletion(-)
--




[2/7] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35321 test_object_removed_from_stage_via_user_action_is_not_initialized() needed one more frame to complete (made sure it fails without the pro

2017-08-14 Thread mihaic
FLEX-35321 test_object_removed_from_stage_via_user_action_is_not_initialized() 
needed one more frame to complete (made sure it fails without the proposed fix, 
and passes with it). Also made some variable and function renames, plus now we 
can also test how many times each validation function has been called.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/75b4d39d
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/75b4d39d
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/75b4d39d

Branch: refs/heads/develop
Commit: 75b4d39d806d6a3bef3cd123493fe4b718f9b2c3
Parents: f475aed
Author: Mihai Chira 
Authored: Sat Jun 10 11:52:14 2017 +0200
Committer: Mihai Chira 
Committed: Sat Jun 10 11:52:14 2017 +0200

--
 .../managers/LayoutManager_FLEX_35321_Tests.as  | 135 +--
 1 file changed, 96 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/75b4d39d/frameworks/projects/framework/tests/mx/managers/LayoutManager_FLEX_35321_Tests.as
--
diff --git 
a/frameworks/projects/framework/tests/mx/managers/LayoutManager_FLEX_35321_Tests.as
 
b/frameworks/projects/framework/tests/mx/managers/LayoutManager_FLEX_35321_Tests.as
index a23d002..1fef434 100644
--- 
a/frameworks/projects/framework/tests/mx/managers/LayoutManager_FLEX_35321_Tests.as
+++ 
b/frameworks/projects/framework/tests/mx/managers/LayoutManager_FLEX_35321_Tests.as
@@ -19,101 +19,108 @@ package mx.managers {
 private static var noEnterFramesRemaining:int = NaN;
 private static const _finishNotifier:EventDispatcher = new 
EventDispatcher();
 
-private var _objectWhichIsRemovedOnSizeValidation:SomeComponent;
+private var _objectWhichIsRemovedAtValidation:SomeComponent;
 private var _creationCompleteCalls:int;
 
 [Before]
 public function setUp():void
 {
 _creationCompleteCalls = 0;
-_objectWhichIsRemovedOnSizeValidation = new SomeComponent();
-
_objectWhichIsRemovedOnSizeValidation.addEventListener(FlexEvent.CREATION_COMPLETE,
 onCreationComplete);
-UIImpersonator.addElement(_objectWhichIsRemovedOnSizeValidation);
+_objectWhichIsRemovedAtValidation = new SomeComponent();
+
_objectWhichIsRemovedAtValidation.addEventListener(FlexEvent.CREATION_COMPLETE, 
onCreationComplete);
+UIImpersonator.addChild(_objectWhichIsRemovedAtValidation);
 }
 
 [After]
 public function tearDown():void
 {
 UIImpersonator.removeAllChildren();
-_objectWhichIsRemovedOnSizeValidation = null;
+_objectWhichIsRemovedAtValidation = null;
 }
 
+
+
//--
+//
+//  Test method
+//
+
//--
+
+
 [Test]
 public function 
test_object_removed_from_stage_via_code_is_not_initialized():void
 {
 //given
 
UIComponentGlobals.mx_internal::layoutManager.usePhasedInstantiation = false;
-
_objectWhichIsRemovedOnSizeValidation.removeFromStageOnValidateProperties = 
true;
+
_objectWhichIsRemovedAtValidation.removeFromStageOnValidateProperties = true;
 
 //when
-_objectWhichIsRemovedOnSizeValidation.validateNow();
+_objectWhichIsRemovedAtValidation.validateNow();
 
 //then
-assertNull("The object was actually not removed from stage. Huh?", 
_objectWhichIsRemovedOnSizeValidation.parent);
-assertEquals("Yep, this is the bug. Why call initialized=true on 
an object that's not on stage?", 0, _creationCompleteCalls);
+then_assert_not_initialized();
 }
 
+
+
+
//--
+//
+//  Test method
+//
+
//--
+
+
 [Test(async, timeout=500)]
 public function 
test_object_removed_from_stage_via_user_action_is_not_initialized():void
 {
 //given
 
UIComponentGlobals.mx_internal::layoutManager.usePhasedInstantiation = true;
-
_objectWhichIsRemovedOnSizeValidation.removeFromStageOnValidateProperties = 
false;
+
_objectWhichIsRemovedAtValidation.removeFromStageOnValidateProperties = false;
 
 //when
-_objectWhichIsRemovedOnSizeValidation.invalidateDisplayList();
-

[1/7] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35321 LayoutManager.validateNow() doesn't use phased instantiation, so it wasn't the best idea to test it with that, at least the test where we

2017-08-14 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop bb7447f5e -> f804380f1


FLEX-35321 LayoutManager.validateNow() doesn't use phased instantiation, so it 
wasn't the best idea to test it with that, at least the test where we fake a 
user request for the removal of the component in the next frame. Also added a 
test that tries to make sure that objects removed from stage and then readded 
are indeed validated and initialized.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/f475aed9
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/f475aed9
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/f475aed9

Branch: refs/heads/develop
Commit: f475aed995adc5206a27ad6fc8cf80224ed425fb
Parents: 5ea79a2
Author: Mihai Chira 
Authored: Sat Jun 10 10:33:28 2017 +0200
Committer: Mihai Chira 
Committed: Sat Jun 10 10:33:28 2017 +0200

--
 .../managers/LayoutManager_FLEX_35321_Tests.as  | 104 ---
 1 file changed, 88 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f475aed9/frameworks/projects/framework/tests/mx/managers/LayoutManager_FLEX_35321_Tests.as
--
diff --git 
a/frameworks/projects/framework/tests/mx/managers/LayoutManager_FLEX_35321_Tests.as
 
b/frameworks/projects/framework/tests/mx/managers/LayoutManager_FLEX_35321_Tests.as
index 47d5f14..a23d002 100644
--- 
a/frameworks/projects/framework/tests/mx/managers/LayoutManager_FLEX_35321_Tests.as
+++ 
b/frameworks/projects/framework/tests/mx/managers/LayoutManager_FLEX_35321_Tests.as
@@ -6,7 +6,8 @@ package mx.managers {
 import mx.core.mx_internal;
 import mx.events.FlexEvent;
 
-import org.flexunit.asserts.assertFalse;
+import org.flexunit.asserts.assertEquals;
+import org.flexunit.asserts.assertNotNull;
 import org.flexunit.asserts.assertNull;
 import org.flexunit.async.Async;
 import org.fluint.uiImpersonation.UIImpersonator;
@@ -19,14 +20,15 @@ package mx.managers {
 private static const _finishNotifier:EventDispatcher = new 
EventDispatcher();
 
 private var _objectWhichIsRemovedOnSizeValidation:SomeComponent;
-private var _creationCompleteCalled:Boolean;
+private var _creationCompleteCalls:int;
 
 [Before]
 public function setUp():void
 {
-_creationCompleteCalled = false;
+_creationCompleteCalls = 0;
 _objectWhichIsRemovedOnSizeValidation = new SomeComponent();
-UIImpersonator.addChild(_objectWhichIsRemovedOnSizeValidation);
+
_objectWhichIsRemovedOnSizeValidation.addEventListener(FlexEvent.CREATION_COMPLETE,
 onCreationComplete);
+UIImpersonator.addElement(_objectWhichIsRemovedOnSizeValidation);
 }
 
 [After]
@@ -41,14 +43,14 @@ package mx.managers {
 {
 //given
 
UIComponentGlobals.mx_internal::layoutManager.usePhasedInstantiation = false;
-
_objectWhichIsRemovedOnSizeValidation.addEventListener(FlexEvent.CREATION_COMPLETE,
 onCreationComplete);
+
_objectWhichIsRemovedOnSizeValidation.removeFromStageOnValidateProperties = 
true;
 
 //when
 _objectWhichIsRemovedOnSizeValidation.validateNow();
 
 //then
 assertNull("The object was actually not removed from stage. Huh?", 
_objectWhichIsRemovedOnSizeValidation.parent);
-assertFalse("Yep, this is the bug. Why call initialized=true on an 
object that's not on stage?", _creationCompleteCalled);
+assertEquals("Yep, this is the bug. Why call initialized=true on 
an object that's not on stage?", 0, _creationCompleteCalls);
 }
 
 [Test(async, timeout=500)]
@@ -56,25 +58,79 @@ package mx.managers {
 {
 //given
 
UIComponentGlobals.mx_internal::layoutManager.usePhasedInstantiation = true;
-
_objectWhichIsRemovedOnSizeValidation.addEventListener(FlexEvent.CREATION_COMPLETE,
 onCreationComplete);
+
_objectWhichIsRemovedOnSizeValidation.removeFromStageOnValidateProperties = 
false;
 
 //when
-_objectWhichIsRemovedOnSizeValidation.validateNow();
-
_objectWhichIsRemovedOnSizeValidation.pretendUserAskedForComponentRemoval();
+_objectWhichIsRemovedOnSizeValidation.invalidateDisplayList();
+_objectWhichIsRemovedOnSizeValidation.invalidateProperties();
+_objectWhichIsRemovedOnSizeValidation.invalidateSize();
+
+//then wait 1 frame
+noEnterFramesRemaining = 1;
+UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, 
onEnterFrame);
+

[5/7] git commit: [flex-sdk] [refs/heads/develop] - Merge remote-tracking branch 'origin/develop' into develop

2017-08-14 Thread mihaic
Merge remote-tracking branch 'origin/develop' into develop


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/0226437e
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/0226437e
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/0226437e

Branch: refs/heads/develop
Commit: 0226437edfef900f9135b3fd97b8b82af10b2ae0
Parents: 9c5cbbe e66554e
Author: Mihai Chira 
Authored: Tue Jun 20 11:50:06 2017 +0200
Committer: Mihai Chira 
Committed: Tue Jun 20 11:50:06 2017 +0200

--
 KEYS | 116 ++
 1 file changed, 116 insertions(+)
--




[4/7] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35321 CAUSE: If a component is removed from stage during a validation cycle, the LayoutManager nevertheless sets its initialized flag to true,

2017-08-14 Thread mihaic
FLEX-35321 CAUSE: If a component is removed from stage during a validation 
cycle, the LayoutManager nevertheless sets its initialized flag to true, even 
if it's not on stage anymore. That's because it doesn't check at the end 
whether the component is still on stage.

SOLUTION: Now the LayoutManager verifies that the component is still on stage 
before initializing it.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/9c5cbbe5
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/9c5cbbe5
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/9c5cbbe5

Branch: refs/heads/develop
Commit: 9c5cbbe553c9d8afe7982f3ba4bf178ee563bf35
Parents: 442b5f8
Author: Mihai Chira 
Authored: Sat Jun 10 13:36:47 2017 +0200
Committer: Mihai Chira 
Committed: Sat Jun 10 13:36:47 2017 +0200

--
 .../framework/src/mx/managers/LayoutManager.as  | 28 
 1 file changed, 17 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/9c5cbbe5/frameworks/projects/framework/src/mx/managers/LayoutManager.as
--
diff --git a/frameworks/projects/framework/src/mx/managers/LayoutManager.as 
b/frameworks/projects/framework/src/mx/managers/LayoutManager.as
index feebeff..d070203 100644
--- a/frameworks/projects/framework/src/mx/managers/LayoutManager.as
+++ b/frameworks/projects/framework/src/mx/managers/LayoutManager.as
@@ -846,11 +846,14 @@ public class LayoutManager extends EventDispatcher 
implements ILayoutManager
var obj:ILayoutManagerClient = 
ILayoutManagerClient(updateCompleteQueue.removeLargest());
 while (obj)
 {
-if (!obj.initialized && obj.processedDescriptors)
-obj.initialized = true;
-if (obj.hasEventListener(FlexEvent.UPDATE_COMPLETE))
-obj.dispatchEvent(new 
FlexEvent(FlexEvent.UPDATE_COMPLETE));
-obj.updateCompletePendingFlag = false;
+if(obj.nestLevel)
+{
+if (!obj.initialized && obj.processedDescriptors)
+obj.initialized = true;
+if (obj.hasEventListener(FlexEvent.UPDATE_COMPLETE))
+obj.dispatchEvent(new 
FlexEvent(FlexEvent.UPDATE_COMPLETE));
+obj.updateCompletePendingFlag = false;
+}
 obj = 
ILayoutManagerClient(updateCompleteQueue.removeLargest());
 }
 
@@ -1094,12 +1097,15 @@ public class LayoutManager extends EventDispatcher 
implements ILayoutManager
 obj = 
ILayoutManagerClient(updateCompleteQueue.removeLargestChild(target));
 while (obj)
 {
-if (!obj.initialized)
-obj.initialized = true;
-
-if (obj.hasEventListener(FlexEvent.UPDATE_COMPLETE))
-obj.dispatchEvent(new 
FlexEvent(FlexEvent.UPDATE_COMPLETE));
-obj.updateCompletePendingFlag = false;
+if(obj.nestLevel)
+{
+if (!obj.initialized)
+obj.initialized = true;
+
+if (obj.hasEventListener(FlexEvent.UPDATE_COMPLETE))
+obj.dispatchEvent(new 
FlexEvent(FlexEvent.UPDATE_COMPLETE));
+obj.updateCompletePendingFlag = false;
+}
 obj = 
ILayoutManagerClient(updateCompleteQueue.removeLargestChild(target));
 }
 }



[3/7] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35321 Refined tests, including checking for how many validation steps happen for size, properties and display list. Without the fix all those e

2017-08-14 Thread mihaic
FLEX-35321 Refined tests, including checking for how many validation steps 
happen for size, properties and display list. Without the fix all those 
expected to fail fail (the last one is not expected to fail without the fix, 
because it's there just to make sure no regression is introduced by the fix), 
while with the fix all of them pass.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/442b5f8e
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/442b5f8e
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/442b5f8e

Branch: refs/heads/develop
Commit: 442b5f8ea4fe08dc8e5f7d48df7dc36b101c99fe
Parents: 75b4d39
Author: Mihai Chira 
Authored: Sat Jun 10 13:28:05 2017 +0200
Committer: Mihai Chira 
Committed: Sat Jun 10 13:28:05 2017 +0200

--
 .../managers/LayoutManager_FLEX_35321_Tests.as  | 42 +++-
 1 file changed, 32 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/442b5f8e/frameworks/projects/framework/tests/mx/managers/LayoutManager_FLEX_35321_Tests.as
--
diff --git 
a/frameworks/projects/framework/tests/mx/managers/LayoutManager_FLEX_35321_Tests.as
 
b/frameworks/projects/framework/tests/mx/managers/LayoutManager_FLEX_35321_Tests.as
index 1fef434..9b0b38c 100644
--- 
a/frameworks/projects/framework/tests/mx/managers/LayoutManager_FLEX_35321_Tests.as
+++ 
b/frameworks/projects/framework/tests/mx/managers/LayoutManager_FLEX_35321_Tests.as
@@ -6,6 +6,8 @@ package mx.managers {
 import mx.core.mx_internal;
 import mx.events.FlexEvent;
 
+import org.flexunit.assertThat;
+
 import org.flexunit.asserts.assertEquals;
 import org.flexunit.asserts.assertNotNull;
 import org.flexunit.asserts.assertNull;
@@ -28,7 +30,7 @@ package mx.managers {
 _creationCompleteCalls = 0;
 _objectWhichIsRemovedAtValidation = new SomeComponent();
 
_objectWhichIsRemovedAtValidation.addEventListener(FlexEvent.CREATION_COMPLETE, 
onCreationComplete);
-UIImpersonator.addChild(_objectWhichIsRemovedAtValidation);
+UIImpersonator.addElement(_objectWhichIsRemovedAtValidation);
 }
 
 [After]
@@ -45,7 +47,6 @@ package mx.managers {
 //
 
//--
 
-
 [Test]
 public function 
test_object_removed_from_stage_via_code_is_not_initialized():void
 {
@@ -54,10 +55,14 @@ package mx.managers {
 
_objectWhichIsRemovedAtValidation.removeFromStageOnValidateProperties = true;
 
 //when
+_objectWhichIsRemovedAtValidation.invalidateProperties();
+_objectWhichIsRemovedAtValidation.invalidateSize();
+_objectWhichIsRemovedAtValidation.invalidateDisplayList();
 _objectWhichIsRemovedAtValidation.validateNow();
 
 //then
 then_assert_not_initialized();
+assert_validation_count(1, 0, 0);
 }
 
 
@@ -68,7 +73,6 @@ package mx.managers {
 //
 
//--
 
-
 [Test(async, timeout=500)]
 public function 
test_object_removed_from_stage_via_user_action_is_not_initialized():void
 {
@@ -84,7 +88,7 @@ package mx.managers {
 //then wait 1 frame
 noEnterFramesRemaining = 1;
 UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, 
onEnterFrame);
-Async.handleEvent(this, _finishNotifier, Event.COMPLETE, 
then_remove_from_stage_via_callLater, 300, then_assert_not_initialized);
+Async.handleEvent(this, _finishNotifier, Event.COMPLETE, 
then_remove_from_stage_via_callLater, 300, 
{nextStep:then_assert_not_initialized_but_partially_validated, 
afterNumFrames:3});
 }
 
 
@@ -111,7 +115,7 @@ package mx.managers {
 //then wait 1 frame
 noEnterFramesRemaining = 1;
 UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, 
onEnterFrame);
-Async.handleEvent(this, _finishNotifier, Event.COMPLETE, 
then_remove_from_stage_via_callLater, 300, then_readd_object);
+Async.handleEvent(this, _finishNotifier, Event.COMPLETE, 
then_remove_from_stage_via_callLater, 300, {nextStep:then_readd_object, 
afterNumFrames:1});
 }
 
 private function then_readd_object(event:Event, 
passThroughData:Object):void
@@ -122,8 +126,8 @@ package mx.managers {
 //when
 UIImpersonator.addElement(_objectWhichIsRemovedAtValidation);
 
-//then wait 4 frames, to make sure validation is done
-noEnterFramesRemaining 

[2/2] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35321 Made the unit test more realistic (by having the user's action happen in the next frame), and prevented an error when tearDown() tries to

2017-06-07 Thread mihaic
FLEX-35321 Made the unit test more realistic (by having the user's action 
happen in the next frame), and prevented an error when tearDown() tries to 
remove a component which is no longer on stage.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/5ea79a20
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/5ea79a20
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/5ea79a20

Branch: refs/heads/develop
Commit: 5ea79a20f07bba7aab51dd1a45057cf26c48caa0
Parents: 53a7710
Author: Mihai Chira 
Authored: Wed Jun 7 13:04:32 2017 +0200
Committer: Mihai Chira 
Committed: Wed Jun 7 13:04:32 2017 +0200

--
 .../framework/src/mx/managers/LayoutManager.as  |  2 +-
 .../managers/LayoutManager_FLEX_35321_Tests.as  | 36 +++-
 2 files changed, 28 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/5ea79a20/frameworks/projects/framework/src/mx/managers/LayoutManager.as
--
diff --git a/frameworks/projects/framework/src/mx/managers/LayoutManager.as 
b/frameworks/projects/framework/src/mx/managers/LayoutManager.as
index 45395ac..feebeff 100644
--- a/frameworks/projects/framework/src/mx/managers/LayoutManager.as
+++ b/frameworks/projects/framework/src/mx/managers/LayoutManager.as
@@ -780,7 +780,7 @@ public class LayoutManager extends EventDispatcher 
implements ILayoutManager
  */
 private function doPhasedInstantiation():void
 {
-// trace(">>DoPhasedInstantation");
+// trace(">>DoPhasedInstantiation");
 
 // If phasing, do only one phase: validateProperties(),
 // validateSize(), or validateDisplayList().

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/5ea79a20/frameworks/projects/framework/tests/mx/managers/LayoutManager_FLEX_35321_Tests.as
--
diff --git 
a/frameworks/projects/framework/tests/mx/managers/LayoutManager_FLEX_35321_Tests.as
 
b/frameworks/projects/framework/tests/mx/managers/LayoutManager_FLEX_35321_Tests.as
index bb969ba..47d5f14 100644
--- 
a/frameworks/projects/framework/tests/mx/managers/LayoutManager_FLEX_35321_Tests.as
+++ 
b/frameworks/projects/framework/tests/mx/managers/LayoutManager_FLEX_35321_Tests.as
@@ -1,16 +1,23 @@
 package mx.managers {
+import flash.events.Event;
+import flash.events.EventDispatcher;
+
 import mx.core.UIComponentGlobals;
 import mx.core.mx_internal;
 import mx.events.FlexEvent;
 
 import org.flexunit.asserts.assertFalse;
 import org.flexunit.asserts.assertNull;
+import org.flexunit.async.Async;
 import org.fluint.uiImpersonation.UIImpersonator;
 
 use namespace mx_internal;
 
 public class LayoutManager_FLEX_35321_Tests
 {
+private static var noEnterFramesRemaining:int = NaN;
+private static const _finishNotifier:EventDispatcher = new 
EventDispatcher();
+
 private var _objectWhichIsRemovedOnSizeValidation:SomeComponent;
 private var _creationCompleteCalled:Boolean;
 
@@ -25,7 +32,7 @@ package mx.managers {
 [After]
 public function tearDown():void
 {
-UIImpersonator.removeChild(_objectWhichIsRemovedOnSizeValidation);
+UIImpersonator.removeAllChildren();
 _objectWhichIsRemovedOnSizeValidation = null;
 }
 
@@ -44,7 +51,7 @@ package mx.managers {
 assertFalse("Yep, this is the bug. Why call initialized=true on an 
object that's not on stage?", _creationCompleteCalled);
 }
 
-[Test]
+[Test(async, timeout=500)]
 public function 
test_object_removed_from_stage_via_user_action_is_not_initialized():void
 {
 //given
@@ -55,11 +62,28 @@ package mx.managers {
 _objectWhichIsRemovedOnSizeValidation.validateNow();
 
_objectWhichIsRemovedOnSizeValidation.pretendUserAskedForComponentRemoval();
 
+//then wait 2 frames
+noEnterFramesRemaining = 2;
+UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, 
onEnterFrame);
+Async.handleEvent(this, _finishNotifier, Event.COMPLETE, 
then_assert, 300);
+}
+
+private function then_assert(event:Event, passThroughData:Object):void
+{
 //then
 assertNull("The object was actually not removed from stage. Huh?", 
_objectWhichIsRemovedOnSizeValidation.parent);
 assertFalse("Yep, this is the bug. Why call initialized=true on an 
object that's not on stage?", _creationCompleteCalled);
 }
 
+private static function onEnterFrame(event:Event):void
+{
+if(!--noEnterFramesRemaining)
+   

[1/2] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35321 Adding unit test (currently fails, as expected).

2017-06-07 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 2750254ba -> 5ea79a20f


FLEX-35321 Adding unit test (currently fails, as expected).


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/53a77105
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/53a77105
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/53a77105

Branch: refs/heads/develop
Commit: 53a771056b9f7c8bf7c1127a50f2bd2c7923e0c7
Parents: 2750254
Author: Mihai Chira 
Authored: Mon Jun 5 14:14:13 2017 +0200
Committer: Mihai Chira 
Committed: Mon Jun 5 14:14:13 2017 +0200

--
 .../managers/LayoutManager_FLEX_35321_Tests.as  | 107 +++
 1 file changed, 107 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/53a77105/frameworks/projects/framework/tests/mx/managers/LayoutManager_FLEX_35321_Tests.as
--
diff --git 
a/frameworks/projects/framework/tests/mx/managers/LayoutManager_FLEX_35321_Tests.as
 
b/frameworks/projects/framework/tests/mx/managers/LayoutManager_FLEX_35321_Tests.as
new file mode 100644
index 000..bb969ba
--- /dev/null
+++ 
b/frameworks/projects/framework/tests/mx/managers/LayoutManager_FLEX_35321_Tests.as
@@ -0,0 +1,107 @@
+package mx.managers {
+import mx.core.UIComponentGlobals;
+import mx.core.mx_internal;
+import mx.events.FlexEvent;
+
+import org.flexunit.asserts.assertFalse;
+import org.flexunit.asserts.assertNull;
+import org.fluint.uiImpersonation.UIImpersonator;
+
+use namespace mx_internal;
+
+public class LayoutManager_FLEX_35321_Tests
+{
+private var _objectWhichIsRemovedOnSizeValidation:SomeComponent;
+private var _creationCompleteCalled:Boolean;
+
+[Before]
+public function setUp():void
+{
+_creationCompleteCalled = false;
+_objectWhichIsRemovedOnSizeValidation = new SomeComponent();
+UIImpersonator.addChild(_objectWhichIsRemovedOnSizeValidation);
+}
+
+[After]
+public function tearDown():void
+{
+UIImpersonator.removeChild(_objectWhichIsRemovedOnSizeValidation);
+_objectWhichIsRemovedOnSizeValidation = null;
+}
+
+[Test]
+public function 
test_object_removed_from_stage_via_code_is_not_initialized():void
+{
+//given
+
UIComponentGlobals.mx_internal::layoutManager.usePhasedInstantiation = false;
+
_objectWhichIsRemovedOnSizeValidation.addEventListener(FlexEvent.CREATION_COMPLETE,
 onCreationComplete);
+
+//when
+_objectWhichIsRemovedOnSizeValidation.validateNow();
+
+//then
+assertNull("The object was actually not removed from stage. Huh?", 
_objectWhichIsRemovedOnSizeValidation.parent);
+assertFalse("Yep, this is the bug. Why call initialized=true on an 
object that's not on stage?", _creationCompleteCalled);
+}
+
+[Test]
+public function 
test_object_removed_from_stage_via_user_action_is_not_initialized():void
+{
+//given
+
UIComponentGlobals.mx_internal::layoutManager.usePhasedInstantiation = true;
+
_objectWhichIsRemovedOnSizeValidation.addEventListener(FlexEvent.CREATION_COMPLETE,
 onCreationComplete);
+
+//when
+_objectWhichIsRemovedOnSizeValidation.validateNow();
+
_objectWhichIsRemovedOnSizeValidation.pretendUserAskedForComponentRemoval();
+
+//then
+assertNull("The object was actually not removed from stage. Huh?", 
_objectWhichIsRemovedOnSizeValidation.parent);
+assertFalse("Yep, this is the bug. Why call initialized=true on an 
object that's not on stage?", _creationCompleteCalled);
+}
+
+private function onCreationComplete(event:FlexEvent):void
+{
+_creationCompleteCalled = true;
+}
+}
+}
+
+import flash.events.TimerEvent;
+import flash.utils.Timer;
+
+import mx.core.IVisualElementContainer;
+import mx.core.UIComponent;
+
+class SomeComponent extends UIComponent
+{
+private var _timer:Timer = new Timer(1, 1);
+
+override public function validateSize(recursive:Boolean = false):void
+{
+super.validateSize(recursive);
+removeFromStage();
+}
+
+private function removeFromStage():void
+{
+if(this.parent)
+{
+if(this.parent is IVisualElementContainer)
+IVisualElementContainer(this.parent).removeElement(this);
+else
+this.parent.removeChild(this);
+}
+}
+
+public function pretendUserAskedForComponentRemoval():void
+{
+

git commit: [flex-sdk] [refs/heads/develop] - FLEX-35306 Addd unit test. Fails when reverting the fix, passes with the fix.

2017-05-22 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 59cefd8e3 -> 2750254ba


FLEX-35306 Addd unit test. Fails when reverting the fix, passes with the fix.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/2750254b
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/2750254b
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/2750254b

Branch: refs/heads/develop
Commit: 2750254ba51c284f8bb5dfce2b5101179600b21b
Parents: 59cefd8
Author: Mihai Chira 
Authored: Mon May 22 10:52:55 2017 +0200
Committer: Mihai Chira 
Committed: Mon May 22 10:52:55 2017 +0200

--
 .../spark/components/List_FLEX_35306_Tests.as   | 274 +++
 .../spark/tests/spark/components/_CompanyVO.as  |  49 
 .../tests/spark/components/_HeadquarterVO.as|  23 ++
 .../spark/components/_ListWithMXMLBinding.mxml  |  22 ++
 4 files changed, 368 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/2750254b/frameworks/projects/spark/tests/spark/components/List_FLEX_35306_Tests.as
--
diff --git 
a/frameworks/projects/spark/tests/spark/components/List_FLEX_35306_Tests.as 
b/frameworks/projects/spark/tests/spark/components/List_FLEX_35306_Tests.as
new file mode 100644
index 000..1780240
--- /dev/null
+++ b/frameworks/projects/spark/tests/spark/components/List_FLEX_35306_Tests.as
@@ -0,0 +1,274 @@
+
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//  http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+
+
+package spark.components {
+import flash.events.Event;
+import flash.events.EventDispatcher;
+
+import mx.collections.ArrayCollection;
+import mx.collections.IList;
+import mx.core.mx_internal;
+
+import org.flexunit.asserts.assertEquals;
+import org.flexunit.asserts.assertFalse;
+import org.flexunit.asserts.assertNotNull;
+import org.flexunit.async.Async;
+import org.flexunit.runners.Parameterized;
+import org.fluint.uiImpersonation.UIImpersonator;
+
+import spark.skins.spark.ListSkin;
+
+use namespace mx_internal;
+
+[RunWith("org.flexunit.runners.Parameterized")]
+public class List_FLEX_35306_Tests
+{
+private static var foo:Parameterized;
+
+private static const NO_ENTER_FRAMES_TO_ALLOW:int = 4;
+private static var noEnterFramesRemaining:int = NaN;
+private static const _finishNotifier:EventDispatcher = new 
EventDispatcher();
+
+private static var _sut:_ListWithMXMLBinding;
+
+private static var _hqRedmond:_HeadquarterVO;
+private static var _hqSantaClara:_HeadquarterVO;
+private static var _hqBerlin:_HeadquarterVO;
+private static var _hqMunchen:_HeadquarterVO;
+private static var _hqNewYork:_HeadquarterVO;
+private static var _hqSantaMaria:_HeadquarterVO;
+private static var _hqSantaDolores:_HeadquarterVO;
+
+[Bindable]
+public var selectedCompany:_CompanyVO;
+[Bindable]
+public var potentialHeadquarters:IList;
+
+public static var models:Array;
+{
+models = [[createListOfCompaniesWithOnePotentialAddressEach()], 
[createListOfCompaniesWithMultiplePotentialAddresses()]];
+}
+
+[AfterClass]
+public static function tearDownStatic():void
+{
+models = null;
+}
+
+[Before]
+public function setUp():void
+{
+_sut = new _ListWithMXMLBinding();
+_sut.container = this;
+_sut.setStyle("skinClass", ListSkin);
+_sut.requireSelection = true;
+}
+
+[After]
+public function tearDown():void
+{
+UIImpersonator.removeAllChildren();
+_sut = null;
+}
+
+[Test(order=2, async, timeout=1000, dataProvider="models", 

git commit: [flex-sdk] [refs/heads/develop] - FLEX-35306 Reverting the fix for FLEX-19651 because it introduced the FLEX-35306 regression.

2017-05-17 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop d726aee2d -> 59cefd8e3


FLEX-35306 Reverting the fix for FLEX-19651 because it introduced the 
FLEX-35306 regression.

CAUSE: Due to the fix for FLEX-19651, when the data provider is reset on a 
(DropDown)List right after the selected item (from this new data provider) is 
set, a validation cycle is forced on the list immediately before the new data 
provider is assigned to it. As a consequence, ListBase.commitProperties() fails 
when trying to find the selected item in the data provider (because, for now, 
it's still the old one, which doesn't have the new item), thus clearing the 
selection. But if the list had requireSelection set to true, then the first 
item in the old provider will be selected nonetheless. And if there was a 
two-way binding between the list and the model, then the model will at this 
point be rewritten, most probably wrongly.

SOLUTION: we're reverting the fix for FLEX-19651, which was a minor bug, and 
seeing if any mustella or unit tests fail. If so, we'll find other ways to fix 
FLEX-19651.

NOTES: FLEX-19651 doesn't have enough data to reproduce it, so I can't know for 
sure if it's still there or not. But after playing a bit with multiple 
selection and data provider changes, as the ticket suggests, there doesn't 
appear to be any major difference.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/59cefd8e
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/59cefd8e
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/59cefd8e

Branch: refs/heads/develop
Commit: 59cefd8e3f5aa8c252f8e06bb5a4a27f95509ef4
Parents: d726aee
Author: Mihai Chira 
Authored: Wed May 17 13:31:23 2017 +0200
Committer: Mihai Chira 
Committed: Wed May 17 13:31:23 2017 +0200

--
 .../projects/spark/src/spark/components/List.as | 29 
 1 file changed, 29 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/59cefd8e/frameworks/projects/spark/src/spark/components/List.as
--
diff --git a/frameworks/projects/spark/src/spark/components/List.as 
b/frameworks/projects/spark/src/spark/components/List.as
index c457c5b..d122821 100644
--- a/frameworks/projects/spark/src/spark/components/List.as
+++ b/frameworks/projects/spark/src/spark/components/List.as
@@ -630,36 +630,7 @@ public class List extends ListBase implements 
IFocusManagerComponent
 super.useVirtualLayout = value;
 }
 
-//--
-//  dataProvider
-//--
 
-[Inspectable(category="Data")]
-
-/**
- *  @private
- *  
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-override public function set dataProvider(value:IList):void
-{
-// Uconditionally clear the selection, see SDK-21645.  Can't wait
-// to commit the selection because it could be set again before
-// commitProperties runs and that selection gets lost.
-if (!isEmpty(_proposedSelectedIndices) || !isEmpty(selectedIndices))
-{
-_proposedSelectedIndices.length = 0;
-multipleSelectionChanged = true;
-invalidateProperties();
-UIComponentGlobals.layoutManager.validateClient(this, true);
-}
-super.dataProvider = value;
-}
-
-
 
//--
 //
 //  Properties



git commit: [flex-sdk] [refs/heads/develop] - FLEX-35260 When calling localToGlobal() on gridColumnHeaderGroup, the result does not reflect its horizontal scroll position, which means that we need to

2017-04-12 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 60ccf24cb -> d726aee2d


FLEX-35260 When calling localToGlobal() on gridColumnHeaderGroup, the result 
does not reflect its horizontal scroll position, which means that we need to 
include it manually (in GridHeaderViewLayout.getHeaderIndexAt()). However, the 
'x' function argument is assumed to include it, so we're not adding it anymore 
when calling GridDimensionsView.getColumnIndexAt().


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/d726aee2
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/d726aee2
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/d726aee2

Branch: refs/heads/develop
Commit: d726aee2da04bd796ab91fa1960d7e55d47cde44
Parents: 60ccf24
Author: Mihai Chira 
Authored: Wed Apr 12 15:16:39 2017 +0200
Committer: Mihai Chira 
Committed: Wed Apr 12 15:16:39 2017 +0200

--
 .../projects/spark/src/spark/components/GridColumnHeaderGroup.as | 4 ++--
 .../src/spark/components/gridClasses/GridHeaderViewLayout.as | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/d726aee2/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as
--
diff --git 
a/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as 
b/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as
index 3d51fd8..63a0eb3 100644
--- a/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as
+++ b/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as
@@ -1039,11 +1039,11 @@ public class GridColumnHeaderGroup extends Group 
implements IDataGridElement
 // TODO: apologize for stashing the separatorIndex in headerCP.rowIndex
 private function eventToHeaderLocations(event:MouseEvent, 
headerCP:CellPosition, headerXY:Point):Boolean
 {
-const view:Group = getHeaderViewUnderGlobalCoordinates(new 
Point(event.stageX, event.stageY));
+const stageXY:Point = new Point(event.stageX, event.stageY);
+const view:Group = getHeaderViewUnderGlobalCoordinates(stageXY);
 if (!view)
 return false;
 
-   const stageXY:Point = new Point(event.stageX, event.stageY);
 const viewXY:Point = view.globalToLocal(stageXY);
 const viewLayout:GridHeaderViewLayout = view.layout as 
GridHeaderViewLayout;
 const gdv:GridDimensionsView = 
viewLayout.gridView.gridViewLayout.gridDimensionsView;

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/d726aee2/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
--
diff --git 
a/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
 
b/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
index cbdf3eb..9432c0a 100644
--- 
a/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
+++ 
b/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
@@ -501,14 +501,14 @@ public class GridHeaderViewLayout extends LayoutBase
 public function getHeaderIndexAt(x:Number, y:Number):int
 {
 var headerIndex:int = -1;
-var globalPoint:Point = gridColumnHeaderGroup.localToGlobal(new 
Point(x, y));
+var globalPoint:Point = gridColumnHeaderGroup.localToGlobal(new 
Point(x - horizontalScrollPosition, y));
 
 if(gridColumnHeaderGroup.areCoordinatesOverAHeaderView(globalPoint))
 {
 var paddingLeftStyle:Number = 
gridColumnHeaderGroup.getStyle("paddingLeft");
 var paddingLeft:Number = isNaN(paddingLeftStyle) ? 0 : 
paddingLeftStyle;
 
-headerIndex = 
gridView.gridViewLayout.gridDimensionsView.getColumnIndexAt(x - paddingLeft + 
horizontalScrollPosition, y);
+headerIndex = 
gridView.gridViewLayout.gridDimensionsView.getColumnIndexAt(x - paddingLeft, y);
 
 if(headerIndex == -1)
 {



[2/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35267 Updated unit test to support horizontal scrolling and two new grid profiles. Currently tests fail, but for perplexing reasons (seems like

2017-04-12 Thread mihaic
FLEX-35267 Updated unit test to support horizontal scrolling and two new grid 
profiles. Currently tests fail, but for perplexing reasons (seems like a 
failure to validate, despite the unit test calling validateNow() way too many 
times...).


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/7d3073bb
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/7d3073bb
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/7d3073bb

Branch: refs/heads/develop
Commit: 7d3073bb34cf4a5853039bab63e6df8d1f47cd65
Parents: a1c61c5
Author: Mihai Chira 
Authored: Wed Apr 5 18:33:03 2017 +0200
Committer: Mihai Chira 
Committed: Wed Apr 5 18:33:03 2017 +0200

--
 .../spark/src/spark/components/Scroller.as  |   4 +-
 .../GridHeaderViewLayout_FLEX_35260_Tests.as| 313 ---
 2 files changed, 200 insertions(+), 117 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/7d3073bb/frameworks/projects/spark/src/spark/components/Scroller.as
--
diff --git a/frameworks/projects/spark/src/spark/components/Scroller.as 
b/frameworks/projects/spark/src/spark/components/Scroller.as
index 3ca9155..4db6528 100644
--- a/frameworks/projects/spark/src/spark/components/Scroller.as
+++ b/frameworks/projects/spark/src/spark/components/Scroller.as
@@ -759,8 +759,8 @@ public class Scroller extends SkinnableComponent
 
 /**
  *  @private
- *  These are the minimum and maximum scroll possitions allowed
- *  for both axes.  They determine the points at which bounce and
+ *  These are the minimum and maximum scroll positions allowed
+ *  for both axes. They determine the points at which bounce and
  *  pull occur.
  */
 private var minVerticalScrollPosition:Number = 0;

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/7d3073bb/frameworks/projects/spark/tests/spark/components/gridClasses/GridHeaderViewLayout_FLEX_35260_Tests.as
--
diff --git 
a/frameworks/projects/spark/tests/spark/components/gridClasses/GridHeaderViewLayout_FLEX_35260_Tests.as
 
b/frameworks/projects/spark/tests/spark/components/gridClasses/GridHeaderViewLayout_FLEX_35260_Tests.as
index 5bc24b4..3fb4b92 100644
--- 
a/frameworks/projects/spark/tests/spark/components/gridClasses/GridHeaderViewLayout_FLEX_35260_Tests.as
+++ 
b/frameworks/projects/spark/tests/spark/components/gridClasses/GridHeaderViewLayout_FLEX_35260_Tests.as
@@ -1,4 +1,7 @@
 package spark.components.gridClasses {
+import flash.events.Event;
+import flash.events.EventDispatcher;
+
 import flash.geom.Matrix;
 import flash.geom.Point;
 import flash.geom.Rectangle;
@@ -8,6 +11,8 @@ package spark.components.gridClasses {
 import org.flexunit.assertThat;
 
 import org.flexunit.asserts.assertEquals;
+import org.flexunit.asserts.assertTrue;
+import org.flexunit.async.Async;
 import org.flexunit.runners.Parameterized;
 import org.fluint.uiImpersonation.UIImpersonator;
 
@@ -87,22 +92,28 @@ package spark.components.gridClasses {
 private static const ITSELF:Matrix = new Matrix(1, 0, 0, 1, 0, 0); 
//the point, unmodified
 private static const directions:Array = [ITSELF, N, NE, E, SE, S, SW, 
W, NW];
 
-private static const COLUMN_HEADER_RECTANGLES:String = 
"columnHeaderRectangles";
-private static const COLUMN_RECTANGLES:String = "columnRectangles";
-private static const ENTIRE_HEADER_RECTANGLE:String = 
"headerRectangle"; //includes padding
-private static const MAIN_HEADER_VIEW_RECTANGLE:String = 
"mainHeaderViewRectangle";
+private static const ENTIRE_HEADER_RECTANGLE:String = 
"visibleHeaderRectangle"; //includes padding
 private static const FIXED_HEADER_VIEW_RECTANGLE:String = 
"fixedHeaderViewRectangle";
 
+private static const NO_ENTER_FRAMES_TO_ALLOW:int = 2;
+
 private static var _dataGrid:DataGrid;
+private static const _finishNotifier:EventDispatcher = new 
EventDispatcher();
 
 private var _keyRectangles:Array;
 private var _keyPoints:Array;
+private var _dimensions:Array;
+private var _noEnterFramesRemaining:int = NaN;
 
-//@TODO add cases with horizontal scroll, and also with fixed columns
-public static var dimensions:Array = [
+//@TODO add cases with fixed columns
+//@TODO can the grid itself have padding?
+//@TODO test with a columnGap as well
+public static var allDimensions:Array = [
 /*x, y, width, header padding left, header padding top, header 
padding bottom, [column widths] */
 [[/*x=*/0, /*y=*/   0, 

[1/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35267 Updated unit test - made it easier to read, and now we're also testing GridColumnHeaderGroup.containsGlobalCoordinates(). For the test to

2017-04-12 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 56abc7db2 -> 60ccf24cb


FLEX-35267 Updated unit test - made it easier to read, and now we're also 
testing GridColumnHeaderGroup.containsGlobalCoordinates(). For the test to pass 
I've improved the logic in GridHeaderViewLayout.getHeaderIndexAt() which, in 
turn, made a few functions redundant in GridColumnHeaderGroup. All tests 
currently pass.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/a1c61c5c
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/a1c61c5c
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/a1c61c5c

Branch: refs/heads/develop
Commit: a1c61c5cfd452cb0a150788e498865763890d112
Parents: 56abc7d
Author: Mihai Chira 
Authored: Wed Mar 29 14:26:51 2017 +0200
Committer: Mihai Chira 
Committed: Wed Mar 29 14:26:51 2017 +0200

--
 .../GridHeaderViewLayout_FLEX_35260_Tests.as| 84 ++--
 1 file changed, 61 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a1c61c5c/frameworks/projects/spark/tests/spark/components/gridClasses/GridHeaderViewLayout_FLEX_35260_Tests.as
--
diff --git 
a/frameworks/projects/spark/tests/spark/components/gridClasses/GridHeaderViewLayout_FLEX_35260_Tests.as
 
b/frameworks/projects/spark/tests/spark/components/gridClasses/GridHeaderViewLayout_FLEX_35260_Tests.as
index 1ac5a17..5bc24b4 100644
--- 
a/frameworks/projects/spark/tests/spark/components/gridClasses/GridHeaderViewLayout_FLEX_35260_Tests.as
+++ 
b/frameworks/projects/spark/tests/spark/components/gridClasses/GridHeaderViewLayout_FLEX_35260_Tests.as
@@ -88,6 +88,7 @@ package spark.components.gridClasses {
 private static const directions:Array = [ITSELF, N, NE, E, SE, S, SW, 
W, NW];
 
 private static const COLUMN_HEADER_RECTANGLES:String = 
"columnHeaderRectangles";
+private static const COLUMN_RECTANGLES:String = "columnRectangles";
 private static const ENTIRE_HEADER_RECTANGLE:String = 
"headerRectangle"; //includes padding
 private static const MAIN_HEADER_VIEW_RECTANGLE:String = 
"mainHeaderViewRectangle";
 private static const FIXED_HEADER_VIEW_RECTANGLE:String = 
"fixedHeaderViewRectangle";
@@ -98,11 +99,11 @@ package spark.components.gridClasses {
 private var _keyPoints:Array;
 
 //@TODO add cases with horizontal scroll, and also with fixed columns
-//@TODO we probably have to account for paddingTop and paddingBottom 
as well
 public static var dimensions:Array = [
 /*x, y, width, header padding left, header padding top, header 
padding bottom, [column widths] */
-[[10, 0, 300, 5, 0, 5, [25, 150]]],
-[[0, 0, 300, 5, 0, 0, [25, 150]]]
+[[/*x=*/0, /*y=*/   0, /*width=*/   300, /*paddingLeft=*/   5, 
/*paddingTop=*/  0, /*paddingBottom=*/   0, /*columnWidths=*/[25, 150]]],
+[[/*x=*/   10, /*y=*/   0, /*width=*/   300, /*paddingLeft=*/   5, 
/*paddingTop=*/  0, /*paddingBottom=*/   5, /*columnWidths=*/[25, 150]]],
+[[/*x=*/   -5, /*y=*/-100, /*width=*/   200, /*paddingLeft=*/  25, 
/*paddingTop=*/ 12, /*paddingBottom=*/   5, /*columnWidths=*/[100, 150]]] 
//horizontal scroll
 ];
 
 
@@ -135,22 +136,6 @@ package spark.components.gridClasses {
 _keyPoints = null;
 }
 
-/*
-[Ignore]
-[Test]
-public function test_column_index(globalPoint:Array, 
expectedColumnIndex:int):void
-{
-//given
-var localPoint:Point = _dataGrid.grid.globalToLocal(new 
Point(globalPoint[0], globalPoint[1]));
-
-//when
-var columnIndex:int = 
_dataGrid.grid.getColumnIndexAt(localPoint.x, 0);
-
-//then
-assertEquals(expectedColumnIndex, columnIndex);
-}
-*/
-
 
 [Test(dataProvider="dimensions")]
 public function test_with_no_scroll(dimensions:Array):void
@@ -189,6 +174,7 @@ package spark.components.gridClasses {
 {
 assertThatHeaderContainsPointOrNot(point, pointName, 
currentTransformation);
 assertThatHeaderIndexIsCorrect(point, pointName, 
currentTransformation);
+assertThatColumnIndexIsCorrect(point, pointName, 
currentTransformation);
 assertThatCoordinatesOverHeaderViewOrNot(point, pointName, 
currentTransformation);
 }
 
@@ -227,6 +213,17 @@ package spark.components.gridClasses {
 assertEquals(errorMessageHeaderIndex, expectedHeaderIndex, 
actualHeaderIndex);
 }
 
+private function assertThatColumnIndexIsCorrect(point:Point, 
pointName:String, currentTransformation:Matrix):void
+

[3/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35280 FLEX-35260 Recent changes to FLEX-35267 made it so that the y value in GridHeaderViewLayout.getHeaderIndexAt() started to be considered,

2017-04-12 Thread mihaic
FLEX-35280 FLEX-35260 Recent changes to FLEX-35267 made it so that the y value 
in GridHeaderViewLayout.getHeaderIndexAt() started to be considered, when 
before it was simply ignored. But one caller of this function, 
GridColumnHeaderGroup.eventToHeaderLocations(), simply used '0' for that 
argument, instead of the real value, knowing that (before these changes) it 
wasn't being considered. Now the real value is used.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/60ccf24c
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/60ccf24c
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/60ccf24c

Branch: refs/heads/develop
Commit: 60ccf24cbd641fcac30e27215156e65d4cb0e923
Parents: 7d3073b
Author: Mihai Chira 
Authored: Wed Apr 12 13:34:54 2017 +0200
Committer: Mihai Chira 
Committed: Wed Apr 12 13:34:54 2017 +0200

--
 .../projects/spark/src/spark/components/GridColumnHeaderGroup.as   | 2 +-
 .../spark/src/spark/components/gridClasses/GridColumnHeaderView.as | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/60ccf24c/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as
--
diff --git 
a/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as 
b/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as
index 02f3aac..3d51fd8 100644
--- a/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as
+++ b/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as
@@ -1050,7 +1050,7 @@ public class GridColumnHeaderGroup extends Group 
implements IDataGridElement
 const separatorIndex:int = viewLayout.getSeparatorIndexAt(viewXY.x, 0);
 
 headerCP.rowIndex = (separatorIndex != -1) ? separatorIndex + 
gdv.viewColumnIndex : -1;
-headerCP.columnIndex = (separatorIndex == -1) ? 
viewLayout.getHeaderIndexAt(viewXY.x, 0) + gdv.viewColumnIndex : -1;
+headerCP.columnIndex = (separatorIndex == -1) ? 
viewLayout.getHeaderIndexAt(viewXY.x, viewXY.y) + gdv.viewColumnIndex : -1;
 
 headerXY.x = viewXY.x + gdv.viewOriginX;
 headerXY.y = viewXY.y;

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/60ccf24c/frameworks/projects/spark/src/spark/components/gridClasses/GridColumnHeaderView.as
--
diff --git 
a/frameworks/projects/spark/src/spark/components/gridClasses/GridColumnHeaderView.as
 
b/frameworks/projects/spark/src/spark/components/gridClasses/GridColumnHeaderView.as
index a836462..aecb7c2 100644
--- 
a/frameworks/projects/spark/src/spark/components/gridClasses/GridColumnHeaderView.as
+++ 
b/frameworks/projects/spark/src/spark/components/gridClasses/GridColumnHeaderView.as
@@ -120,7 +120,6 @@ public class GridColumnHeaderView extends Group
 origin.x -= width;
 
 origin.y += verticalScrollPosition;
-
 
 var headerViewContainsGlobalCoordinates:Boolean = (stageX >= origin.x) 
&& (stageY >= origin.y) &&
 (stageX < (origin.x + width)) && (stageY < (origin.y + 
height));



[4/5] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35260 Now we are taking into account paddingTop and paddingBottom in getHeaderIndexAt(). Unit test updated as well (and passes, including a sec

2017-03-29 Thread mihaic
FLEX-35260 Now we are taking into account paddingTop and paddingBottom in 
getHeaderIndexAt(). Unit test updated as well (and passes, including a second 
data grid configuration).


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/5787e9ba
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/5787e9ba
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/5787e9ba

Branch: refs/heads/develop
Commit: 5787e9baf653d3c4f0a7664cb5baaf2103f8387d
Parents: 6bc7ad5
Author: Mihai Chira 
Authored: Thu Mar 16 15:18:10 2017 +0100
Committer: Mihai Chira 
Committed: Thu Mar 16 15:18:10 2017 +0100

--
 .../gridClasses/GridHeaderViewLayout.as |   2 +-
 .../GridHeaderViewLayout_FLEX_35260_Tests.as| 111 ++-
 2 files changed, 61 insertions(+), 52 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/5787e9ba/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
--
diff --git 
a/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
 
b/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
index ef79a02..4eac8c7 100644
--- 
a/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
+++ 
b/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
@@ -505,7 +505,7 @@ public class GridHeaderViewLayout extends LayoutBase
 
 if(gridColumnHeaderGroup.containsGlobalCoordinates(globalPoint))
 {
-
if(!gridColumnHeaderGroup.areCoordinatesOverLeftPadding(globalPoint))
+if (!gridColumnHeaderGroup.areCoordinatesOverPadding(globalPoint))
 {
 var paddingLeftStyle:Number = 
gridColumnHeaderGroup.getStyle("paddingLeft");
 var paddingLeft:Number = isNaN(paddingLeftStyle) ? 0 : 
paddingLeftStyle;

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/5787e9ba/frameworks/projects/spark/tests/spark/components/gridClasses/GridHeaderViewLayout_FLEX_35260_Tests.as
--
diff --git 
a/frameworks/projects/spark/tests/spark/components/gridClasses/GridHeaderViewLayout_FLEX_35260_Tests.as
 
b/frameworks/projects/spark/tests/spark/components/gridClasses/GridHeaderViewLayout_FLEX_35260_Tests.as
index dad721d..9c7bd51 100644
--- 
a/frameworks/projects/spark/tests/spark/components/gridClasses/GridHeaderViewLayout_FLEX_35260_Tests.as
+++ 
b/frameworks/projects/spark/tests/spark/components/gridClasses/GridHeaderViewLayout_FLEX_35260_Tests.as
@@ -17,34 +17,35 @@ package spark.components.gridClasses {
 /*
  Example for two-column table (with no horizontal scroll):
 
+ [pt]: GridColumnHeaderGroup padding top
  [pl]: GridColumnHeaderGroup padding left
  [lch]: still part of last column header, but beyond last column width
- c0: first column header starts here
- c1: first column header ends here, second column header (if it exists) 
starts, and column separator is here
- c2: second column header ends here; second column separator is here
- ...
- cx: last column header ends here; last column separator is here
 
- d0: first column ends at this x-axis coordinate (but the first header 
doesn't, due to [pl])
- d1: second column ends at this x-axis coordinate
+ b0: top-left corner of the data grid. Also, first column starts at this 
x-coordinate
+ b1: first column ends at this x-coordinate (but the first header usually 
doesn't, due to [pl])
+ b2: second column ends at this x-coordinate (but the second header 
usually doesn't, due to [pl])
  ...
- dx: last column ends at this x-axis coordinate
-
- e: table ends at this x-axis coordinate
+ bx: last column ends at this x-coordinate
 
- f0: header ends and grid starts at this y-coordinate
- f1: first column ends here and second column (if it exists) begins here
- f2: second column ends here and third column (if it exists) begins here
+ c0: first column header starts at this x-coordinate
+ c1: first column header ends at this x-coordinate, separator starts at 
this x-coordinate, and
+ second column header (if it exists) starts at this x-coordinate + 
separator.width
+ c1: second column header ends at this x-coordinate, next separator (if it 
exists) starts at
+ this x-coordinate, and third column header (if it exists) starts at this 
x-coordinate + separator.width
  ...
- fx: last column ends here
+ cx: last column header ends at this x-coordinate; last column separator 
starts at this x-coordinate
+
+ d: table ends at this x-axis coordinate
+ e: 

[3/5] git commit: [flex-sdk] [refs/heads/develop] - Merge remote-tracking branch 'origin/develop' into develop

2017-03-29 Thread mihaic
Merge remote-tracking branch 'origin/develop' into develop


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/6bc7ad5e
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/6bc7ad5e
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/6bc7ad5e

Branch: refs/heads/develop
Commit: 6bc7ad5e9e85daada0ebd1e7c6946b032409de71
Parents: d7299c3 1040357
Author: Mihai Chira 
Authored: Thu Mar 16 13:11:55 2017 +0100
Committer: Mihai Chira 
Committed: Thu Mar 16 13:11:55 2017 +0100

--
 .gitignore  |   1 +
 ApproveSDK.xml  |  21 +-
 CONTRIBUTORS|   3 +
 NOTICE  |   2 +-
 README  |   9 +-
 RELEASE_NOTES   |  90 -
 build.xml   |   4 +-
 frameworks/build.xml|  12 +
 frameworks/downloads.xml|  21 +-
 .../assets/fonts/awesome/FontAwesome.otf| Bin 109688 -> 134808 bytes
 .../src/flatspark/utils/AwesomeUtils.as | 122 ++-
 .../framework/src/mx/utils/ObjectUtil.as|   2 +-
 .../src/mx/validators/EmailValidator.as |   2 +-
 .../src/spark/skins/ios7/BusyIndicatorSkin.as   |  20 +-
 .../spark/src/spark/components/DropDownList.as  |  12 +-
 .../src/spark/skins/spark/BusyIndicatorSkin.as  |  21 +-
 ide/addAIRtoSDK.sh  |  59 +++-
 ide/checkAllPlayerGlobals.sh|  50 +--
 ide/flashbuilder/config/air-config.xml  |  21 +-
 ide/flashbuilder/config/flex-config.xml |  20 +-
 ide/setFlashPlayerVersion.sh|  79 -
 installer.xml   |  28 +-
 licenseParts/NOTICE.asc |   2 +-
 licenseParts/NOTICE.base|   2 +-
 licenseParts/NOTICE.pb  |   2 +-
 licenseParts/saxon9-NOTICES/APACHE-ANT.txt  |  13 +
 licenseParts/saxon9-NOTICES/APACHE-RESOLVER.txt |   9 +
 licenseParts/saxon9-NOTICES/APACHE-XERCES.txt   |  17 +
 licenseParts/saxon9-NOTICES/CERN.txt|   7 +
 licenseParts/saxon9-NOTICES/FRIJTERS.txt|  22 ++
 licenseParts/saxon9-NOTICES/GPL+CLASSPATH.txt   | 347 +++
 licenseParts/saxon9-NOTICES/JAMESCLARK.txt  |  25 ++
 licenseParts/saxon9-NOTICES/LEGAL.txt   |  33 ++
 licenseParts/saxon9-NOTICES/LICENSE.txt |  15 +
 licenseParts/saxon9-NOTICES/THAI.txt|  31 ++
 licenseParts/saxon9-NOTICES/UNICODE.txt |  29 ++
 .../src/java/macromedia/asc/embedding/Main.java |   2 +-
 .../java/macromedia/asc/embedding/Shell.java|   2 +-
 .../java/macromedia/asc/embedding/SwfMaker.java |  16 +-
 .../flex2/compiler/common/Configuration.java|  32 ++
 .../java/flex2/linker/LinkerConfiguration.java  |   4 +
 .../src/java/flex2/linker/SimpleMovie.java  |  10 +
 .../src/java/flex2/tools/ASDoc_da.properties|   2 +-
 .../src/java/flex2/tools/ASDoc_de.properties|   2 +-
 .../src/java/flex2/tools/ASDoc_en.properties|   2 +-
 .../src/java/flex2/tools/ASDoc_es.properties|   2 +-
 .../src/java/flex2/tools/ASDoc_fi.properties|   2 +-
 .../src/java/flex2/tools/ASDoc_fr.properties|   2 +-
 .../src/java/flex2/tools/ASDoc_it.properties|   2 +-
 .../src/java/flex2/tools/ASDoc_ja.properties|   2 +-
 .../src/java/flex2/tools/ASDoc_ko.properties|   2 +-
 .../src/java/flex2/tools/ASDoc_nb.properties|   2 +-
 .../src/java/flex2/tools/ASDoc_nl.properties|   2 +-
 .../src/java/flex2/tools/ASDoc_pt.properties|   2 +-
 .../src/java/flex2/tools/ASDoc_ru.properties|   2 +-
 .../src/java/flex2/tools/ASDoc_sv.properties|   2 +-
 .../src/java/flex2/tools/ASDoc_zh_CN.properties |   2 +-
 .../src/java/flex2/tools/ASDoc_zh_TW.properties |   2 +-
 .../src/java/flex2/tools/Compc_da.properties|   2 +-
 .../src/java/flex2/tools/Compc_de.properties|   2 +-
 .../src/java/flex2/tools/Compc_en.properties|   2 +-
 .../src/java/flex2/tools/Compc_es.properties|   2 +-
 .../src/java/flex2/tools/Compc_fi.properties|   2 +-
 .../src/java/flex2/tools/Compc_fr.properties|   2 +-
 .../src/java/flex2/tools/Compc_it.properties|   2 +-
 .../src/java/flex2/tools/Compc_ja.properties|   2 +-
 .../src/java/flex2/tools/Compc_ko.properties|   2 +-
 .../src/java/flex2/tools/Compc_nb.properties|   2 +-
 .../src/java/flex2/tools/Compc_nl.properties|   2 +-
 .../src/java/flex2/tools/Compc_pt.properties|   2 +-
 .../src/java/flex2/tools/Compc_ru.properties|   2 +-
 .../src/java/flex2/tools/Compc_sv.properties|   2 +-
 .../src/java/flex2/tools/Compc_zh_CN.properties |   2 +-
 .../src/java/flex2/tools/Compc_zh_TW.properties |   

[1/5] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35260 Now in the unit test we're also verifying areCoordinatesOverAHeaderView(). Currently fails (for point "b").

2017-03-29 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 1040357f6 -> 56abc7db2


FLEX-35260 Now in the unit test we're also verifying 
areCoordinatesOverAHeaderView(). Currently fails (for point "b").


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/9e2620e5
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/9e2620e5
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/9e2620e5

Branch: refs/heads/develop
Commit: 9e2620e5bc2b08567fc33f16116f30d4b0e054f0
Parents: f985937
Author: Mihai Chira 
Authored: Tue Mar 14 13:46:27 2017 +0100
Committer: Mihai Chira 
Committed: Tue Mar 14 13:46:27 2017 +0100

--
 .../GridHeaderViewLayout_FLEX_35260_Tests.as| 63 ++--
 1 file changed, 44 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/9e2620e5/frameworks/projects/spark/tests/spark/components/gridClasses/GridHeaderViewLayout_FLEX_35260_Tests.as
--
diff --git 
a/frameworks/projects/spark/tests/spark/components/gridClasses/GridHeaderViewLayout_FLEX_35260_Tests.as
 
b/frameworks/projects/spark/tests/spark/components/gridClasses/GridHeaderViewLayout_FLEX_35260_Tests.as
index 925ea0c..55421f4 100644
--- 
a/frameworks/projects/spark/tests/spark/components/gridClasses/GridHeaderViewLayout_FLEX_35260_Tests.as
+++ 
b/frameworks/projects/spark/tests/spark/components/gridClasses/GridHeaderViewLayout_FLEX_35260_Tests.as
@@ -89,6 +89,7 @@ package spark.components.gridClasses {
 private var _keyRectangles:Array;
 private var _keyPoints:Array;
 
+//@TODO add cases with horizontal scroll, and also with fixed columns
 public static var dimensions:Array = [/*x, y, width, header padding 
left, header padding top, [column widths] */
 [[10, 0, 300, 5, 0, [25, 150]]],
 [[0, 0, 300, 5, 0, [25, 150]]]
@@ -124,20 +125,7 @@ package spark.components.gridClasses {
 _keyPoints = null;
 }
 
-/*[Ignore]
-[Test]
-public function 
test_global_coordinates_over_header_view(globalPoint:Array, 
expectedHeaderIndex:int):void
-{
-//given
-var pointOverAHeaderView:Boolean = expectedHeaderIndex != -1;
-
-//when
-var doesHeaderContainThisPoint:Boolean = 
_sut.areCoordinatesOverAHeaderView(new Point(globalPoint[0], globalPoint[1]));
-
-//then
-assertEquals(pointOverAHeaderView, doesHeaderContainThisPoint);
-}
-
+/*
 [Ignore]
 [Test]
 public function test_column_index(globalPoint:Array, 
expectedColumnIndex:int):void
@@ -196,14 +184,21 @@ package spark.components.gridClasses {
 {
 for (var i:int = 0; i < directions.length; i++)
 {
+//given
+var pointToTest:Point = 
getAdjacentPoint(_keyPoints[pointName], directions[i]);
+
 //when
-var adjacentPoint:Point = 
getAdjacentPoint(_keyPoints[pointName], directions[i]);
-var expectedHeaderIndex:int = 
getHeaderIndexAssumption(adjacentPoint);
-var actualHeaderIndex:int = 
getHeaderIndexAtGlobalPoint(adjacentPoint);
+var expectedHeaderIndex:int = 
getHeaderIndexAssumption(pointToTest);
+var actualHeaderIndex:int = 
getHeaderIndexAtGlobalPoint(pointToTest);
+const errorMessageHeaderIndex:String = 
getHeaderIndexErrorMessage(pointName, directions[i], pointToTest, 
expectedHeaderIndex, actualHeaderIndex);
+
+var shouldBeContainedInHeader:Boolean = 
getHeaderContainsPointAssumption(pointToTest);
+var actuallyContainedInHeader:Boolean = 
_sut.areCoordinatesOverAHeaderView(pointToTest);
+const errorMessageHeaderContainsPoint:String = 
getHeaderContainsPointErrorMessage(pointName, directions[i], pointToTest, 
shouldBeContainedInHeader, actuallyContainedInHeader);
 
 //then
-const errorMessage:String = 
getHeaderIndexErrorMessage(pointName, directions[i], adjacentPoint, 
expectedHeaderIndex, actualHeaderIndex);
-assertEquals(errorMessage, expectedHeaderIndex, 
actualHeaderIndex);
+assertEquals(errorMessageHeaderIndex, expectedHeaderIndex, 
actualHeaderIndex);
+assertEquals(errorMessageHeaderContainsPoint, 
shouldBeContainedInHeader, actuallyContainedInHeader);
 }
 }
 }
@@ -217,12 +212,26 @@ package spark.components.gridClasses {
 + "\n DEBUG INFO: headerRectangles=" + headerRectangles);
   

[5/5] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35267 Updated unit test - made it easier to read, and now we're also testing GridColumnHeaderGroup.containsGlobalCoordinates(). For the test to

2017-03-29 Thread mihaic
FLEX-35267 Updated unit test - made it easier to read, and now we're also 
testing GridColumnHeaderGroup.containsGlobalCoordinates(). For the test to pass 
I've improved the logic in GridHeaderViewLayout.getHeaderIndexAt() which, in 
turn, made a few functions redundant in GridColumnHeaderGroup. All tests 
currently pass.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/56abc7db
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/56abc7db
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/56abc7db

Branch: refs/heads/develop
Commit: 56abc7db27bc79bc313db3f6ab4ab2c14f536a4e
Parents: 5787e9b
Author: Mihai Chira 
Authored: Wed Mar 29 13:16:54 2017 +0200
Committer: Mihai Chira 
Committed: Wed Mar 29 13:16:54 2017 +0200

--
 .../spark/components/GridColumnHeaderGroup.as   |  37 +-
 .../gridClasses/GridHeaderViewLayout.as |  21 ++-
 .../GridHeaderViewLayout_FLEX_35260_Tests.as| 132 ---
 3 files changed, 99 insertions(+), 91 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/56abc7db/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as
--
diff --git 
a/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as 
b/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as
index 0b202b7..02f3aac 100644
--- a/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as
+++ b/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as
@@ -794,7 +794,10 @@ public class GridColumnHeaderGroup extends Group 
implements IDataGridElement
 
 public function containsGlobalCoordinates(coordinates:Point):Boolean
 {
-return areCoordinatesOverAHeaderView(coordinates) || 
areCoordinatesOverPadding(coordinates);
+var globalPosition:Point = localToGlobal(new Point(getLayoutBoundsX(), 
getLayoutBoundsY()));
+var bounds:Rectangle = new Rectangle(globalPosition.x, 
globalPosition.y, getLayoutBoundsWidth(), getLayoutBoundsHeight());
+
+return bounds.containsPoint(coordinates);
 }
 
 public function areCoordinatesOverAHeaderView(coordinates:Point):Boolean
@@ -802,38 +805,6 @@ public class GridColumnHeaderGroup extends Group 
implements IDataGridElement
 return getHeaderViewUnderGlobalCoordinates(coordinates) != null;
 }
 
-public function areCoordinatesOverPadding(coordinates:Point):Boolean
-{
-return areCoordinatesOverLeftPadding(coordinates) || 
areCoordinatesOverTopPadding(coordinates) || 
areCoordinatesOverBottomPadding(coordinates);
-}
-
-public function areCoordinatesOverLeftPadding(coordinates:Point):Boolean
-{
-var paddingLeftStyle:Number = getStyle("paddingLeft");
-var paddingLeft:Number = isNaN(paddingLeftStyle) ? 0 : 
paddingLeftStyle;
-
-return getHeaderViewUnderGlobalCoordinates(new Point(coordinates.x, 
coordinates.y)) == null &&
-getHeaderViewUnderGlobalCoordinates(new Point(coordinates.x + 
paddingLeft, coordinates.y)) != null;
-}
-
-public function areCoordinatesOverTopPadding(coordinates:Point):Boolean
-{
-var paddingTopStyle:Number = getStyle("paddingTop");
-var paddingTop:Number = isNaN(paddingTopStyle) ? 0 : paddingTopStyle;
-
-return getHeaderViewUnderGlobalCoordinates(new Point(coordinates.x, 
coordinates.y)) == null &&
-getHeaderViewUnderGlobalCoordinates(new Point(coordinates.x, 
coordinates.y + paddingTop)) != null;
-}
-
-public function areCoordinatesOverBottomPadding(coordinates:Point):Boolean
-{
-var paddingBottomStyle:Number = getStyle("paddingBottom");
-var paddingBottom:Number = isNaN(paddingBottomStyle) ? 0 : 
paddingBottomStyle;
-
-return getHeaderViewUnderGlobalCoordinates(new Point(coordinates.x, 
coordinates.y)) == null &&
-getHeaderViewUnderGlobalCoordinates(new Point(coordinates.x, 
coordinates.y - paddingBottom)) != null;
-}
-
 
//--
 //
 //  Methods 

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/56abc7db/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
--
diff --git 
a/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
 
b/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
index 4eac8c7..cbdf3eb 100644
--- 
a/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
+++ 

[2/5] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35260 Now the unit test passes, having been updated to check the column header view boundaries. Other changes: -Now we're ignoring the grid hea

2017-03-29 Thread mihaic
FLEX-35260 Now the unit test passes, having been updated to check the column 
header view boundaries. Other changes:
-Now we're ignoring the grid header's right padding, because it doesn't make a 
visual difference (except in the edge case where, together with the left and 
right padding, the column widths are wider than the grid's width, in which case 
the grid header expands beyond the grid limits), but we are starting to take 
into account bottom and top padding.
-Renamed some variables and functions for clarity in GridColumnHeaderView and 
GridDimensions.
-Improved error messages in the unit test


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/d7299c33
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/d7299c33
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/d7299c33

Branch: refs/heads/develop
Commit: d7299c330fe7bbfd348a8db03258cb3ab777e32b
Parents: 9e2620e
Author: Mihai Chira 
Authored: Thu Mar 16 12:45:29 2017 +0100
Committer: Mihai Chira 
Committed: Thu Mar 16 12:45:29 2017 +0100

--
 .../spark/components/GridColumnHeaderGroup.as   | 32 ++--
 .../gridClasses/GridColumnHeaderView.as | 15 ++--
 .../components/gridClasses/GridDimensions.as| 14 ++--
 .../GridHeaderViewLayout_FLEX_35260_Tests.as| 81 +++-
 4 files changed, 104 insertions(+), 38 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/d7299c33/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as
--
diff --git 
a/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as 
b/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as
index a9209a1..0b202b7 100644
--- a/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as
+++ b/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as
@@ -783,6 +783,15 @@ public class GridColumnHeaderGroup extends Group 
implements IDataGridElement
 return (_visibleSortIndicatorIndices.indexOf(columnIndex) != -1);
 }
 
+/**
+ *  True if either of this GridColumnHeaderGroup's views contains the 
global
+ *  coordinates in the event, or if they fall over this component's 
padding.
+ */
+public function containsMouseEvent(event:MouseEvent):Boolean
+{
+return containsGlobalCoordinates(new Point(event.stageX, 
event.stageY));
+}
+
 public function containsGlobalCoordinates(coordinates:Point):Boolean
 {
 return areCoordinatesOverAHeaderView(coordinates) || 
areCoordinatesOverPadding(coordinates);
@@ -795,7 +804,7 @@ public class GridColumnHeaderGroup extends Group implements 
IDataGridElement
 
 public function areCoordinatesOverPadding(coordinates:Point):Boolean
 {
-return areCoordinatesOverLeftPadding(coordinates) || 
areCoordinatesOverRightPadding(coordinates);
+return areCoordinatesOverLeftPadding(coordinates) || 
areCoordinatesOverTopPadding(coordinates) || 
areCoordinatesOverBottomPadding(coordinates);
 }
 
 public function areCoordinatesOverLeftPadding(coordinates:Point):Boolean
@@ -807,13 +816,22 @@ public class GridColumnHeaderGroup extends Group 
implements IDataGridElement
 getHeaderViewUnderGlobalCoordinates(new Point(coordinates.x + 
paddingLeft, coordinates.y)) != null;
 }
 
-public function areCoordinatesOverRightPadding(coordinates:Point):Boolean
+public function areCoordinatesOverTopPadding(coordinates:Point):Boolean
+{
+var paddingTopStyle:Number = getStyle("paddingTop");
+var paddingTop:Number = isNaN(paddingTopStyle) ? 0 : paddingTopStyle;
+
+return getHeaderViewUnderGlobalCoordinates(new Point(coordinates.x, 
coordinates.y)) == null &&
+getHeaderViewUnderGlobalCoordinates(new Point(coordinates.x, 
coordinates.y + paddingTop)) != null;
+}
+
+public function areCoordinatesOverBottomPadding(coordinates:Point):Boolean
 {
-var paddingRightStyle:Number = getStyle("paddingRight");
-var paddingRight:Number = isNaN(paddingRightStyle) ? 0 : 
paddingRightStyle;
+var paddingBottomStyle:Number = getStyle("paddingBottom");
+var paddingBottom:Number = isNaN(paddingBottomStyle) ? 0 : 
paddingBottomStyle;
 
 return getHeaderViewUnderGlobalCoordinates(new Point(coordinates.x, 
coordinates.y)) == null &&
-getHeaderViewUnderGlobalCoordinates(new Point(coordinates.x, 
coordinates.y - paddingRight)) != null;
+getHeaderViewUnderGlobalCoordinates(new Point(coordinates.x, 
coordinates.y - paddingBottom)) != null;
 }
 
 
//--
@@ -1037,11 +1055,11 @@ 

git commit: [flex-sdk] [refs/heads/develop] - FLEX-35260 GridHeaderViewLayout.getHeaderIndexAt() (which calls GridDimensions.getColumnIndexAt()) used to return a valid headerIndex (when it was expecte

2017-03-10 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 2adccce7c -> f985937c0


FLEX-35260 GridHeaderViewLayout.getHeaderIndexAt() (which calls 
GridDimensions.getColumnIndexAt()) used to return a valid headerIndex (when it 
was expected to return -1) for an y < 0. Fixed.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/f985937c
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/f985937c
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/f985937c

Branch: refs/heads/develop
Commit: f985937c08a261e8da91c0fc8a905ca0ddbbc842
Parents: 2adccce
Author: Mihai Chira 
Authored: Fri Mar 10 18:21:44 2017 +0100
Committer: Mihai Chira 
Committed: Fri Mar 10 18:21:44 2017 +0100

--
 .../gridClasses/GridDimensionsView.as   |  4 ++--
 .../gridClasses/GridHeaderViewLayout.as | 25 +++-
 2 files changed, 16 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f985937c/frameworks/projects/spark/src/spark/components/gridClasses/GridDimensionsView.as
--
diff --git 
a/frameworks/projects/spark/src/spark/components/gridClasses/GridDimensionsView.as
 
b/frameworks/projects/spark/src/spark/components/gridClasses/GridDimensionsView.as
index fe7b55a..e5444a6 100644
--- 
a/frameworks/projects/spark/src/spark/components/gridClasses/GridDimensionsView.as
+++ 
b/frameworks/projects/spark/src/spark/components/gridClasses/GridDimensionsView.as
@@ -225,9 +225,9 @@ public class GridDimensionsView
 return rowIndex >= 0 ? rowIndex : -1;
 }
 
-public function getColumnIndexAt(viewX:Number, viewY:Number):int
+public function getColumnIndexAt(localX:Number, localY:Number):int
 {
-const columnIndex:int = gridDimensions.getColumnIndexAt(viewX + 
viewOriginX, viewY + viewOriginY) - viewColumnIndex;
+const columnIndex:int = gridDimensions.getColumnIndexAt(localX + 
viewOriginX, localY + viewOriginY) - viewColumnIndex;
 return columnIndex >= 0 ? columnIndex : -1;
 }
 

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f985937c/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
--
diff --git 
a/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
 
b/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
index 4dd36b8..ef79a02 100644
--- 
a/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
+++ 
b/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
@@ -503,21 +503,24 @@ public class GridHeaderViewLayout extends LayoutBase
 var headerIndex:int = -1;
 var globalPoint:Point = gridColumnHeaderGroup.localToGlobal(new 
Point(x, y));
 
-if(!gridColumnHeaderGroup.areCoordinatesOverLeftPadding(globalPoint))
+if(gridColumnHeaderGroup.containsGlobalCoordinates(globalPoint))
 {
-var paddingLeftStyle:Number = 
gridColumnHeaderGroup.getStyle("paddingLeft");
-var paddingLeft:Number = isNaN(paddingLeftStyle) ? 0 : 
paddingLeftStyle;
-
-headerIndex = 
gridView.gridViewLayout.gridDimensionsView.getColumnIndexAt(x - paddingLeft + 
horizontalScrollPosition, y);
-
-if(headerIndex == -1 && 
gridColumnHeaderGroup.containsGlobalCoordinates(globalPoint))
+
if(!gridColumnHeaderGroup.areCoordinatesOverLeftPadding(globalPoint))
 {
-//then the point is either over the right padding, over the 
width of the vertical
-//scroll bar, or over the space between the last separator and 
the width of the grid
-headerIndex = 
grid.getPreviousVisibleColumnIndex(columnsView.length);
+var paddingLeftStyle:Number = 
gridColumnHeaderGroup.getStyle("paddingLeft");
+var paddingLeft:Number = isNaN(paddingLeftStyle) ? 0 : 
paddingLeftStyle;
+
+headerIndex = 
gridView.gridViewLayout.gridDimensionsView.getColumnIndexAt(x - paddingLeft + 
horizontalScrollPosition, y);
+
+if(headerIndex == -1)
+{
+//then the point is either over the right padding, over 
the width of the vertical
+//scroll bar, or over the space between the last separator 
and the width of the grid
+headerIndex = 
grid.getPreviousVisibleColumnIndex(columnsView.length);
+}
 }
 }
-
+
 return headerIndex;
 }
 



[3/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35260 GridHeaderViewLayout.getHeaderIndexAt() (which calls GridDimensions.getColumnIndexAt()) used to return a valid headerIndex (when it was e

2017-03-10 Thread mihaic
FLEX-35260 GridHeaderViewLayout.getHeaderIndexAt() (which calls 
GridDimensions.getColumnIndexAt()) used to return a valid headerIndex (when it 
was expected to return -1) for an x < 0. Fixed.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/2adccce7
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/2adccce7
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/2adccce7

Branch: refs/heads/develop
Commit: 2adccce7c285cbbdbd4ceda3e5267d0434fbd477
Parents: ad48251
Author: Mihai Chira 
Authored: Fri Mar 10 17:53:45 2017 +0100
Committer: Mihai Chira 
Committed: Fri Mar 10 17:53:45 2017 +0100

--
 .../src/spark/components/gridClasses/GridDimensions.as   | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/2adccce7/frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as
--
diff --git 
a/frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as 
b/frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as
index ec0a003..0c679db 100644
--- 
a/frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as
+++ 
b/frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as
@@ -1183,9 +1183,12 @@ public class GridDimensions
  */
 public function getColumnIndexAt(x:Number, y:Number):int
 {
-var cur:Number = x;
+var current:Number = x;
 var i:int;
-
+
+if(current < 0)
+return -1;
+
 for (i = 0; i < _columnCount; i++)
 {
 var temp:Number = _columnWidths[i];
@@ -1202,9 +1205,9 @@ public class GridDimensions
 if (isNaN(temp))
 temp = defaultColumnWidth;
 
-cur -= temp + columnGap;
+current -= temp + columnGap;
 
-if (cur < 0)
+if (current < 0)
 return i;
 }
 



[2/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35267 FLEX-35260 FLEX-35029 1. GridHeaderViewLayout.getHeaderIndexAt() now verifies if the coordinates are over the GridColumnHeaderView's left

2017-03-10 Thread mihaic
FLEX-35267 FLEX-35260 FLEX-35029
1. GridHeaderViewLayout.getHeaderIndexAt() now verifies if the coordinates are 
over the GridColumnHeaderView's left or right padding.
2. Renamed GridColumnHeaderGroup.mouseEventHeaderView() to 
getHeaderViewUnderGlobalCoordinates(), while also changing the parameter to be 
a Point instead of a MouseEvent. This is so that 
areCoordinatesOverAHeaderView(), areCoordinatesOverLeftPadding() and 
areCoordinatesOverRightPadding() can use it too.
3. Expanded some variable names in GridColumnHeaderGroup.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/ad482517
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/ad482517
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/ad482517

Branch: refs/heads/develop
Commit: ad48251737546e5ae17081044f3051bfbb1997e8
Parents: a603b07
Author: Mihai Chira 
Authored: Fri Mar 10 17:44:32 2017 +0100
Committer: Mihai Chira 
Committed: Fri Mar 10 17:44:32 2017 +0100

--
 .../spark/components/GridColumnHeaderGroup.as   | 66 +++-
 .../gridClasses/GridColumnHeaderView.as |  9 ++-
 .../gridClasses/GridHeaderViewLayout.as | 40 +---
 3 files changed, 72 insertions(+), 43 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/ad482517/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as
--
diff --git 
a/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as 
b/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as
index 9d5b81d..a9209a1 100644
--- a/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as
+++ b/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as
@@ -782,7 +782,40 @@ public class GridColumnHeaderGroup extends Group 
implements IDataGridElement
 {
 return (_visibleSortIndicatorIndices.indexOf(columnIndex) != -1);
 }
+
+public function containsGlobalCoordinates(coordinates:Point):Boolean
+{
+return areCoordinatesOverAHeaderView(coordinates) || 
areCoordinatesOverPadding(coordinates);
+}
+
+public function areCoordinatesOverAHeaderView(coordinates:Point):Boolean
+{
+return getHeaderViewUnderGlobalCoordinates(coordinates) != null;
+}
+
+public function areCoordinatesOverPadding(coordinates:Point):Boolean
+{
+return areCoordinatesOverLeftPadding(coordinates) || 
areCoordinatesOverRightPadding(coordinates);
+}
+
+public function areCoordinatesOverLeftPadding(coordinates:Point):Boolean
+{
+var paddingLeftStyle:Number = getStyle("paddingLeft");
+var paddingLeft:Number = isNaN(paddingLeftStyle) ? 0 : 
paddingLeftStyle;
+
+return getHeaderViewUnderGlobalCoordinates(new Point(coordinates.x, 
coordinates.y)) == null &&
+getHeaderViewUnderGlobalCoordinates(new Point(coordinates.x + 
paddingLeft, coordinates.y)) != null;
+}
 
+public function areCoordinatesOverRightPadding(coordinates:Point):Boolean
+{
+var paddingRightStyle:Number = getStyle("paddingRight");
+var paddingRight:Number = isNaN(paddingRightStyle) ? 0 : 
paddingRightStyle;
+
+return getHeaderViewUnderGlobalCoordinates(new Point(coordinates.x, 
coordinates.y)) == null &&
+getHeaderViewUnderGlobalCoordinates(new Point(coordinates.x, 
coordinates.y - paddingRight)) != null;
+}
+
 
//--
 //
 //  Methods 
@@ -804,28 +837,28 @@ public class GridColumnHeaderGroup extends Group 
implements IDataGridElement
 */
public function configureGridColumnHeaderViews():void
{
-const ghl:GridHeaderLayout = layout as GridHeaderLayout;
-if (!ghl)
+const headerLayout:GridHeaderLayout = layout as GridHeaderLayout;
+if (!headerLayout)
 return;
 
-   if (ghl.centerGridColumnHeaderView == null)
-   ghl.centerGridColumnHeaderView = 
createGridColumnHeaderView();
+   if (headerLayout.centerGridColumnHeaderView == null)
+   headerLayout.centerGridColumnHeaderView = 
createGridColumnHeaderView();

if (dataGrid.lockedColumnCount > 0)
{
-   ghl.leftGridColumnHeaderView = 
createGridColumnHeaderView();
+   headerLayout.leftGridColumnHeaderView = 
createGridColumnHeaderView();
}
-   else if (ghl.leftGridColumnHeaderView)
+   else if (headerLayout.leftGridColumnHeaderView)
{
-   

[1/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35267 FLEX-35260 Added a unit test which can verify the column-index and header-index related functions more thoroughly. Currently it fails, as

2017-03-10 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 7185ca68c -> 2adccce7c


FLEX-35267 FLEX-35260
Added a unit test which can verify the column-index and header-index related 
functions more thoroughly. Currently it fails, as expected.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/a603b07c
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/a603b07c
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/a603b07c

Branch: refs/heads/develop
Commit: a603b07c8cc68173be112b3cffe00670f46bf947
Parents: 7185ca6
Author: Mihai Chira 
Authored: Fri Mar 10 16:56:41 2017 +0100
Committer: Mihai Chira 
Committed: Fri Mar 10 16:56:41 2017 +0100

--
 .../GridHeaderViewLayout_FLEX_35260_Tests.as| 387 +++
 1 file changed, 387 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a603b07c/frameworks/projects/spark/tests/spark/components/gridClasses/GridHeaderViewLayout_FLEX_35260_Tests.as
--
diff --git 
a/frameworks/projects/spark/tests/spark/components/gridClasses/GridHeaderViewLayout_FLEX_35260_Tests.as
 
b/frameworks/projects/spark/tests/spark/components/gridClasses/GridHeaderViewLayout_FLEX_35260_Tests.as
new file mode 100644
index 000..925ea0c
--- /dev/null
+++ 
b/frameworks/projects/spark/tests/spark/components/gridClasses/GridHeaderViewLayout_FLEX_35260_Tests.as
@@ -0,0 +1,387 @@
+package spark.components.gridClasses {
+import flash.geom.Matrix;
+import flash.geom.Point;
+import flash.geom.Rectangle;
+
+import mx.collections.ArrayCollection;
+
+import org.flexunit.assertThat;
+
+import org.flexunit.asserts.assertEquals;
+import org.flexunit.runners.Parameterized;
+import org.fluint.uiImpersonation.UIImpersonator;
+
+import spark.components.DataGrid;
+import spark.components.GridColumnHeaderGroup;
+
+/*
+ Example for two-column table (with no horizontal scroll):
+
+ [pl]: GridColumnHeaderGroup padding left
+ [lch]: still part of last column header, but beyond last column width
+ c0: first column header starts here
+ c1: first column header ends here, second column header (if it exists) 
starts, and column separator is here
+ c2: second column header ends here; second column separator is here
+ ...
+ cx: last column header ends here; last column separator is here
+
+ d0: first column ends at this x-axis coordinate (but the first header 
doesn't, due to [pl])
+ d1: second column ends at this x-axis coordinate
+ ...
+ dx: last column ends at this x-axis coordinate
+
+ e: table ends at this x-axis coordinate
+
+ f0: header ends and grid starts at this y-coordinate
+ f1: first column ends here and second column (if it exists) begins here
+ f2: second column ends here and third column (if it exists) begins here
+ ...
+ fx: last column ends here
+
+ g0: bottom-left point of first column header
+ g1: bottom-right point of first column header
+ g2: bottom-right point of second column header
+ ...
+ gx: bottom-right point of (last column header - [lch])
+
+ h: bottom-right point of last column header and x-coordinate at end of 
data grid
+
+ And for each point we generate the 8 adjacent points:
+ (x+1, y), (x+1, y+1), (x+1, y-1),
+ (x-1, y), (x-1, y+1), (x-1, y-1),
+ (x, y-1), (x, y-1). For easier comprehension we mark them
+ using cardinal points: N, NE, E, SE, S, SW, W, NW.
+ ...and we check various boundaries against all of them
+
+ a (0, 0)
+ 
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
+ 
░░░░░b════c0══════d0═══c1════════════════════════════d1══c2═════════e░░░░░░░
+ 
░░░░░║▓▓▓▓║▓▓▓▓▓▓▓▓▓▓▓▓║▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓║▓▓▓▓▓▓▓▓▓▓║░░░░░░░
+ 
░░░░░║[pl]║▓▓▓INDEX▓▓▓▓║▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓NAME▓▓▓▓▓▓▓▓▓▓▓▓▓║▓▓▓[lch]▓▓║░░░░░░░
+ 
░░░░░║▓▓▓▓║▓▓▓▓▓▓▓▓▓▓▓▓║▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓║▓▓▓▓▓▓▓▓▓▓║░░░░░░░
+ 

[1/2] git commit: [flex-sdk] [refs/heads/release4.16.0] - FLEX-27509 CAUSE: In an AdvancedDataGrid with non-text item renderers AdvancedDataGrid.expandItem() applies masks onto those item renderers wh

2017-01-12 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/release4.16.0 db8c1bf7c -> 7418641ac


FLEX-27509
CAUSE: In an AdvancedDataGrid with non-text item renderers 
AdvancedDataGrid.expandItem() applies masks onto those item renderers when it 
needs to close a node. At the same time, AdvancedListBase has its own custom 
mechanism for using masks to scroll vertically in a more efficient way. In 
order to detect whether it's used this mechanism, and reset the changes 
(detection happens in AdvancedListBase.removeClipMask(), while the mechanism is 
applied in addClipMask()), it simply asks whether the non-text item renderer 
has a mask applied. However, this mask could have been applied by the 
expandItem() mechanism mentioned above, which means that addClipMask() will 
never have been called. As a result, itemMaskFreeList is still null, which 
leads to the fatal.

SOLUTION: Ideally there should be a flag that specifies whether 
AdvancedListBase.addClipMask() has applied the masking mechanism. But for now 
we can simply check that itemMaskFreeList isn't null before we use it.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/4102e70b
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/4102e70b
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/4102e70b

Branch: refs/heads/release4.16.0
Commit: 4102e70b6c9523b7b1f29d0b8c82602f421dc535
Parents: db8c1bf
Author: Mihai Chira 
Authored: Thu Jan 12 13:24:40 2017 +0100
Committer: Mihai Chira 
Committed: Thu Jan 12 16:52:37 2017 +0100

--
 .../src/mx/controls/listClasses/AdvancedListBase.as | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4102e70b/frameworks/projects/advancedgrids/src/mx/controls/listClasses/AdvancedListBase.as
--
diff --git 
a/frameworks/projects/advancedgrids/src/mx/controls/listClasses/AdvancedListBase.as
 
b/frameworks/projects/advancedgrids/src/mx/controls/listClasses/AdvancedListBase.as
index 854f0df..a872381 100644
--- 
a/frameworks/projects/advancedgrids/src/mx/controls/listClasses/AdvancedListBase.as
+++ 
b/frameworks/projects/advancedgrids/src/mx/controls/listClasses/AdvancedListBase.as
@@ -5231,7 +5231,10 @@ public class AdvancedListBase extends ScrollControlBase
 }
 else if (item && item.mask)
 {
-itemMaskFreeList.push(item.mask);
+if(itemMaskFreeList)
+{
+itemMaskFreeList.push(item.mask);
+}
 item.mask = null;
 }
 }



[2/2] git commit: [flex-sdk] [refs/heads/release4.16.0] - FLEX-35149 updating release notes with fix for FLEX-27509

2017-01-12 Thread mihaic
FLEX-35149 updating release notes with fix for FLEX-27509


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/7418641a
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/7418641a
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/7418641a

Branch: refs/heads/release4.16.0
Commit: 7418641acc7a1fafaf4de965842e8b342a9a46be
Parents: 4102e70
Author: Mihai Chira 
Authored: Thu Jan 12 17:02:42 2017 +0100
Committer: Mihai Chira 
Committed: Thu Jan 12 17:02:42 2017 +0100

--
 RELEASE_NOTES | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/7418641a/RELEASE_NOTES
--
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index 7edf235..5aaadc3 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -54,6 +54,7 @@ FLEX-33311  Null pointer fatal in ConstraintLayout when 
executing Transition on
 FLEX-33058  RTE in HierarchicalCollectionViewCursor when a refresh occurs and 
old cursor
had an enumerable property that new cursor item doesn't
 FLEX-31948  When all the columns are invisible, pressing any character Key 
throws RTE
+FLEX-27509  AdvancedListBase itemMaskFreeList is null
 FLEX-26808  s:DataGrid Drag and Drop of multiple items doesn't work
 FLEX-20313  SelectItem on AdvancedDataGrid use weird code
 



git commit: [flex-sdk] [refs/heads/develop] - FLEX-27509 CAUSE: In an AdvancedDataGrid with non-text item renderers AdvancedDataGrid.expandItem() applies masks onto those item renderers when it needs

2017-01-12 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop a5b04e150 -> 6c577a50c


FLEX-27509
CAUSE: In an AdvancedDataGrid with non-text item renderers 
AdvancedDataGrid.expandItem() applies masks onto those item renderers when it 
needs to close a node. At the same time, AdvancedListBase has its own custom 
mechanism for using masks to scroll vertically in a more efficient way. In 
order to detect whether it's used this mechanism, and reset the changes 
(detection happens in AdvancedListBase.removeClipMask(), while the mechanism is 
applied in addClipMask()), it simply asks whether the non-text item renderer 
has a mask applied. However, this mask could have been applied by the 
expandItem() mechanism mentioned above, which means that addClipMask() will 
never have been called. As a result, itemMaskFreeList is still null, which 
leads to the fatal.

SOLUTION: Ideally there should be a flag that specifies whether 
AdvancedListBase.addClipMask() has applied the masking mechanism. But for now 
we can simply check that itemMaskFreeList isn't null before we use it.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/6c577a50
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/6c577a50
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/6c577a50

Branch: refs/heads/develop
Commit: 6c577a50c59d66c2bf151f080d4f5bf90f5f2777
Parents: a5b04e1
Author: Mihai Chira 
Authored: Thu Jan 12 13:24:40 2017 +0100
Committer: Mihai Chira 
Committed: Thu Jan 12 13:24:40 2017 +0100

--
 .../src/mx/controls/listClasses/AdvancedListBase.as | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/6c577a50/frameworks/projects/advancedgrids/src/mx/controls/listClasses/AdvancedListBase.as
--
diff --git 
a/frameworks/projects/advancedgrids/src/mx/controls/listClasses/AdvancedListBase.as
 
b/frameworks/projects/advancedgrids/src/mx/controls/listClasses/AdvancedListBase.as
index 854f0df..a872381 100644
--- 
a/frameworks/projects/advancedgrids/src/mx/controls/listClasses/AdvancedListBase.as
+++ 
b/frameworks/projects/advancedgrids/src/mx/controls/listClasses/AdvancedListBase.as
@@ -5231,7 +5231,10 @@ public class AdvancedListBase extends ScrollControlBase
 }
 else if (item && item.mask)
 {
-itemMaskFreeList.push(item.mask);
+if(itemMaskFreeList)
+{
+itemMaskFreeList.push(item.mask);
+}
 item.mask = null;
 }
 }



[1/2] git commit: [flex-sdk] [refs/heads/release4.16.0] - FLEX-34880 Added an asdoc recommendation that developers use Sort and SortField as immutable objects, although the current API allows for muta

2016-11-09 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/release4.16.0 13183954e -> 78431c690


FLEX-34880
Added an asdoc recommendation that developers use Sort and SortField as 
immutable objects, although the current API allows for mutability.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/4ead7712
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/4ead7712
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/4ead7712

Branch: refs/heads/release4.16.0
Commit: 4ead7712d68ef40449f58d031031b305f38b5739
Parents: 286a0ca
Author: Mihai Chira 
Authored: Wed Nov 9 14:51:10 2016 +0100
Committer: Mihai Chira 
Committed: Wed Nov 9 14:51:10 2016 +0100

--
 frameworks/projects/framework/src/mx/collections/Sort.as  | 5 +
 frameworks/projects/framework/src/mx/collections/SortField.as | 5 +
 frameworks/projects/spark/src/spark/collections/Sort.as   | 5 +
 frameworks/projects/spark/src/spark/collections/SortField.as  | 5 +
 4 files changed, 20 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4ead7712/frameworks/projects/framework/src/mx/collections/Sort.as
--
diff --git a/frameworks/projects/framework/src/mx/collections/Sort.as 
b/frameworks/projects/framework/src/mx/collections/Sort.as
index 7e2e82c..38acab8 100644
--- a/frameworks/projects/framework/src/mx/collections/Sort.as
+++ b/frameworks/projects/framework/src/mx/collections/Sort.as
@@ -95,6 +95,11 @@ package mx.collections
  *  sorting for strings.  For this type of sorting please see the 
  *  spark.collections.Sort and 
  *  spark.collections.SortField classes.
+ *
+ *  Note: to prevent problems like
+ *  https://issues.apache.org/jira/browse/FLEX-34853;>FLEX-34853
+ *  it is recommended to use SortField
+ *  instances as immutable objects (by not changing their state).
  * 
  *  @mxml
  *

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4ead7712/frameworks/projects/framework/src/mx/collections/SortField.as
--
diff --git a/frameworks/projects/framework/src/mx/collections/SortField.as 
b/frameworks/projects/framework/src/mx/collections/SortField.as
index a465656..824d98d 100644
--- a/frameworks/projects/framework/src/mx/collections/SortField.as
+++ b/frameworks/projects/framework/src/mx/collections/SortField.as
@@ -72,6 +72,11 @@ package mx.collections
  *  spark.collections.Sort and
  *  spark.collections.SortField classes.
  *
+ *  Note: to prevent problems like
+ *  https://issues.apache.org/jira/browse/FLEX-34853;>FLEX-34853
+ *  it is recommended to use SortField
+ *  instances as immutable objects (by not changing their state).
+ *
  *  @mxml
  *
  *  The mx:SortField tag has the following 
attributes:

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4ead7712/frameworks/projects/spark/src/spark/collections/Sort.as
--
diff --git a/frameworks/projects/spark/src/spark/collections/Sort.as 
b/frameworks/projects/spark/src/spark/collections/Sort.as
index 0f31834..891da49 100644
--- a/frameworks/projects/spark/src/spark/collections/Sort.as
+++ b/frameworks/projects/spark/src/spark/collections/Sort.as
@@ -160,6 +160,11 @@ package spark.collections
  *  UIComponent's addStyleClient() method.
  *  
  *  
+ *
+ *  Note: to prevent problems like
+ *  https://issues.apache.org/jira/browse/FLEX-34853;>FLEX-34853
+ *  it is recommended to use SortField
+ *  instances as immutable objects (by not changing their state).
  *  
  *  @mxml
  *

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4ead7712/frameworks/projects/spark/src/spark/collections/SortField.as
--
diff --git a/frameworks/projects/spark/src/spark/collections/SortField.as 
b/frameworks/projects/spark/src/spark/collections/SortField.as
index 760b725..5b730a2 100644
--- a/frameworks/projects/spark/src/spark/collections/SortField.as
+++ b/frameworks/projects/spark/src/spark/collections/SortField.as
@@ -129,6 +129,11 @@ package spark.collections
  *  UIComponent's addStyleClient() method.
  *  
  *  
+ *
+ *  Note: to prevent problems like
+ *  https://issues.apache.org/jira/browse/FLEX-34853;>FLEX-34853
+ *  it is recommended to use SortField
+ *  instances as immutable objects (by not changing their state).
  *  
  *  @mxml
  *



[2/2] git commit: [flex-sdk] [refs/heads/release4.16.0] - Merge branch 'develop' into release4.16.0

2016-11-09 Thread mihaic
Merge branch 'develop' into release4.16.0


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/78431c69
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/78431c69
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/78431c69

Branch: refs/heads/release4.16.0
Commit: 78431c690e7692484d5c1fef3709c64e62b98e63
Parents: 1318395 4ead771
Author: Mihai Chira 
Authored: Wed Nov 9 14:51:41 2016 +0100
Committer: Mihai Chira 
Committed: Wed Nov 9 14:51:41 2016 +0100

--
 frameworks/projects/framework/src/mx/collections/Sort.as  | 5 +
 frameworks/projects/framework/src/mx/collections/SortField.as | 5 +
 frameworks/projects/spark/src/spark/collections/Sort.as   | 5 +
 frameworks/projects/spark/src/spark/collections/SortField.as  | 5 +
 4 files changed, 20 insertions(+)
--




git commit: [flex-sdk] [refs/heads/develop] - FLEX-34880 Added an asdoc recommendation that developers use Sort and SortField as immutable objects, although the current API allows for mutability.

2016-11-09 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 286a0ca94 -> 4ead7712d


FLEX-34880
Added an asdoc recommendation that developers use Sort and SortField as 
immutable objects, although the current API allows for mutability.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/4ead7712
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/4ead7712
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/4ead7712

Branch: refs/heads/develop
Commit: 4ead7712d68ef40449f58d031031b305f38b5739
Parents: 286a0ca
Author: Mihai Chira 
Authored: Wed Nov 9 14:51:10 2016 +0100
Committer: Mihai Chira 
Committed: Wed Nov 9 14:51:10 2016 +0100

--
 frameworks/projects/framework/src/mx/collections/Sort.as  | 5 +
 frameworks/projects/framework/src/mx/collections/SortField.as | 5 +
 frameworks/projects/spark/src/spark/collections/Sort.as   | 5 +
 frameworks/projects/spark/src/spark/collections/SortField.as  | 5 +
 4 files changed, 20 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4ead7712/frameworks/projects/framework/src/mx/collections/Sort.as
--
diff --git a/frameworks/projects/framework/src/mx/collections/Sort.as 
b/frameworks/projects/framework/src/mx/collections/Sort.as
index 7e2e82c..38acab8 100644
--- a/frameworks/projects/framework/src/mx/collections/Sort.as
+++ b/frameworks/projects/framework/src/mx/collections/Sort.as
@@ -95,6 +95,11 @@ package mx.collections
  *  sorting for strings.  For this type of sorting please see the 
  *  spark.collections.Sort and 
  *  spark.collections.SortField classes.
+ *
+ *  Note: to prevent problems like
+ *  https://issues.apache.org/jira/browse/FLEX-34853;>FLEX-34853
+ *  it is recommended to use SortField
+ *  instances as immutable objects (by not changing their state).
  * 
  *  @mxml
  *

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4ead7712/frameworks/projects/framework/src/mx/collections/SortField.as
--
diff --git a/frameworks/projects/framework/src/mx/collections/SortField.as 
b/frameworks/projects/framework/src/mx/collections/SortField.as
index a465656..824d98d 100644
--- a/frameworks/projects/framework/src/mx/collections/SortField.as
+++ b/frameworks/projects/framework/src/mx/collections/SortField.as
@@ -72,6 +72,11 @@ package mx.collections
  *  spark.collections.Sort and
  *  spark.collections.SortField classes.
  *
+ *  Note: to prevent problems like
+ *  https://issues.apache.org/jira/browse/FLEX-34853;>FLEX-34853
+ *  it is recommended to use SortField
+ *  instances as immutable objects (by not changing their state).
+ *
  *  @mxml
  *
  *  The mx:SortField tag has the following 
attributes:

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4ead7712/frameworks/projects/spark/src/spark/collections/Sort.as
--
diff --git a/frameworks/projects/spark/src/spark/collections/Sort.as 
b/frameworks/projects/spark/src/spark/collections/Sort.as
index 0f31834..891da49 100644
--- a/frameworks/projects/spark/src/spark/collections/Sort.as
+++ b/frameworks/projects/spark/src/spark/collections/Sort.as
@@ -160,6 +160,11 @@ package spark.collections
  *  UIComponent's addStyleClient() method.
  *  
  *  
+ *
+ *  Note: to prevent problems like
+ *  https://issues.apache.org/jira/browse/FLEX-34853;>FLEX-34853
+ *  it is recommended to use SortField
+ *  instances as immutable objects (by not changing their state).
  *  
  *  @mxml
  *

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4ead7712/frameworks/projects/spark/src/spark/collections/SortField.as
--
diff --git a/frameworks/projects/spark/src/spark/collections/SortField.as 
b/frameworks/projects/spark/src/spark/collections/SortField.as
index 760b725..5b730a2 100644
--- a/frameworks/projects/spark/src/spark/collections/SortField.as
+++ b/frameworks/projects/spark/src/spark/collections/SortField.as
@@ -129,6 +129,11 @@ package spark.collections
  *  UIComponent's addStyleClient() method.
  *  
  *  
+ *
+ *  Note: to prevent problems like
+ *  https://issues.apache.org/jira/browse/FLEX-34853;>FLEX-34853
+ *  it is recommended to use SortField
+ *  instances as immutable objects (by not changing their state).
  *  
  *  @mxml
  *



[1/4] git commit: [flex-sdk] [refs/heads/release4.16.0] - Revert FLEX-34880 part 1 This reverts commit 0b5a634dabb00c04a492a08375e29c6885c1486f.

2016-11-09 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/release4.16.0 b7ea70499 -> 13183954e


Revert FLEX-34880 part 1
This reverts commit 0b5a634dabb00c04a492a08375e29c6885c1486f.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/332e075c
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/332e075c
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/332e075c

Branch: refs/heads/release4.16.0
Commit: 332e075cb3c290400b924a03bfe8d5cb8195009b
Parents: 0b5a634
Author: Mihai Chira 
Authored: Wed Nov 9 14:01:44 2016 +0100
Committer: Mihai Chira 
Committed: Wed Nov 9 14:01:44 2016 +0100

--
 .../src/spark/components/MobileGrid.as  |  5 ++---
 .../supportClasses/MobileGridColumn.as  |  2 +-
 .../framework/src/mx/collections/ISortField.as  | 23 
 .../framework/src/mx/collections/SortField.as   | 12 +-
 .../framework/tests/FLEX_34852_Tests.as |  5 ++---
 .../projects/mx/src/mx/controls/DataGrid.as |  2 +-
 .../spark/src/spark/components/DataGrid.as  |  3 +--
 .../spark/components/gridClasses/GridColumn.as  |  4 ++--
 .../SWFs/GridSortPreserveSelection.mxml |  5 ++---
 .../Sort/SWFs/SF_ORIG_DataGridApp.mxml  | 10 -
 .../Sort/SWFs/SF_ORIG_DataGridApp_halo.mxml |  8 +++
 11 files changed, 49 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/332e075c/frameworks/projects/experimental_mobile/src/spark/components/MobileGrid.as
--
diff --git 
a/frameworks/projects/experimental_mobile/src/spark/components/MobileGrid.as 
b/frameworks/projects/experimental_mobile/src/spark/components/MobileGrid.as
index 85d68fa..d58f885 100644
--- a/frameworks/projects/experimental_mobile/src/spark/components/MobileGrid.as
+++ b/frameworks/projects/experimental_mobile/src/spark/components/MobileGrid.as
@@ -22,7 +22,6 @@ package spark.components
 import mx.collections.ICollectionView;
 import mx.collections.ISort;
 import mx.collections.ISortField;
-import mx.collections.SortField;
 import mx.core.ClassFactory;
 import mx.core.ScrollPolicy;
 import mx.core.mx_internal;
@@ -281,8 +280,8 @@ public class MobileGrid extends List
 lastSortIndex = sortIndex;
 sortIndex = index;
 sortColumn = c;
-SortField(f).mx_internal::name_ = c.dataField;
-SortField(f).mx_internal::descending_ = desc;
+f.name = c.dataField;
+f.descending = desc;
 s.fields = [f];
 collection.sort = s;
 collection.refresh();

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/332e075c/frameworks/projects/experimental_mobile/src/spark/components/supportClasses/MobileGridColumn.as
--
diff --git 
a/frameworks/projects/experimental_mobile/src/spark/components/supportClasses/MobileGridColumn.as
 
b/frameworks/projects/experimental_mobile/src/spark/components/supportClasses/MobileGridColumn.as
index 668594c..ca8ab27 100644
--- 
a/frameworks/projects/experimental_mobile/src/spark/components/supportClasses/MobileGridColumn.as
+++ 
b/frameworks/projects/experimental_mobile/src/spark/components/supportClasses/MobileGridColumn.as
@@ -324,7 +324,7 @@ public class MobileGridColumn extends EventDispatcher
 };
 sortField.mx_internal::compareFunction = cF;
 }
-sortField.mx_internal::descending_ = column.sortDescending;
+sortField.descending = column.sortDescending;
 return sortField;
 }
 

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/332e075c/frameworks/projects/framework/src/mx/collections/ISortField.as
--
diff --git a/frameworks/projects/framework/src/mx/collections/ISortField.as 
b/frameworks/projects/framework/src/mx/collections/ISortField.as
index be3cc35..4186d0b 100644
--- a/frameworks/projects/framework/src/mx/collections/ISortField.as
+++ b/frameworks/projects/framework/src/mx/collections/ISortField.as
@@ -91,6 +91,11 @@ public interface ISortField
  */
 function get descending():Boolean;
 
+/**
+ *  @deprecated A future release of Apache Flex SDK will remove this 
function. Please use the constructor
+ *  argument instead.
+ */
+function set descending(value:Boolean):void;
 
 /**
  *  The name of the field to be sorted.
@@ -103,6 +108,12 @@ public interface ISortField
 function get name():String;
 
 /**
+ *  @deprecated A future release of Apache Flex SDK will remove this 
function. Please use the constructor
+ *  argument instead.
+ */
+function set name(n:String):void;
+
+/**
  *  

[2/4] git commit: [flex-sdk] [refs/heads/release4.16.0] - Revert FLEX-34880 part 2

2016-11-09 Thread mihaic
Revert FLEX-34880 part 2

This reverts commit ff4067f56651082cecbe062f9cfd2aedbe44bf60.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/3f5638d3
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/3f5638d3
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/3f5638d3

Branch: refs/heads/release4.16.0
Commit: 3f5638d30632f4a8638d11eb6859b9e0c288b3c1
Parents: 332e075
Author: Mihai Chira 
Authored: Wed Nov 9 14:08:30 2016 +0100
Committer: Mihai Chira 
Committed: Wed Nov 9 14:08:30 2016 +0100

--
 .../framework/tests/ListCollectionView_FLEX_34837_Tests.as   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/3f5638d3/frameworks/projects/framework/tests/ListCollectionView_FLEX_34837_Tests.as
--
diff --git 
a/frameworks/projects/framework/tests/ListCollectionView_FLEX_34837_Tests.as 
b/frameworks/projects/framework/tests/ListCollectionView_FLEX_34837_Tests.as
index f199481..f762358 100644
--- a/frameworks/projects/framework/tests/ListCollectionView_FLEX_34837_Tests.as
+++ b/frameworks/projects/framework/tests/ListCollectionView_FLEX_34837_Tests.as
@@ -25,7 +25,7 @@ package {
 import mx.collections.Sort;
 import mx.collections.SortField;
 import mx.utils.ObjectUtil;
-import mx.core.mx_internal;
+
 import org.flexunit.asserts.assertEquals;
 
 public class ListCollectionView_FLEX_34837_Tests {
@@ -87,7 +87,7 @@ package {
 
 const sortByStreetAscending:Sort = new Sort();
 var sortField:SortField = new ComplexSortField("address.street", 
false, false, false);
-sortField.mx_internal::compareFunction_ = compareByStreet;
+sortField.compareFunction = compareByStreet;
 sortByStreetAscending.fields = [sortField];
 _sut.sort = sortByStreetAscending;
 



[3/4] git commit: [flex-sdk] [refs/heads/release4.16.0] - Revert FLEX-34880 part 3

2016-11-09 Thread mihaic
Revert FLEX-34880 part 3

This reverts commit 2b09e327281211d26d65dd5d061b02d645cbdd39.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/286a0ca9
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/286a0ca9
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/286a0ca9

Branch: refs/heads/release4.16.0
Commit: 286a0ca9401b8e2a6e2ccca2fcc1764d4933b523
Parents: 3f5638d
Author: Mihai Chira 
Authored: Wed Nov 9 14:09:58 2016 +0100
Committer: Mihai Chira 
Committed: Wed Nov 9 14:09:58 2016 +0100

--
 .../src/mx/collections/GroupingCollection.as   |  2 +-
 .../src/mx/collections/GroupingCollection2.as  |  2 +-
 .../advancedgrids/src/mx/olap/DefaultCubeImpl.as   |  6 +++---
 .../components/supportClasses/MobileGridColumn.as  |  4 ++--
 .../framework/src/mx/collections/ISortField.as |  8 +++-
 .../projects/framework/src/mx/collections/SortField.as |  4 ++--
 frameworks/projects/mx/src/mx/controls/DataGrid.as | 13 +
 .../projects/spark/src/spark/collections/SortField.as  |  9 -
 .../src/spark/components/gridClasses/GridColumn.as |  2 +-
 .../newComps/CustComp_sortField_compareFunction.mxml   |  5 +++--
 10 files changed, 33 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/286a0ca9/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection.as
--
diff --git 
a/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection.as 
b/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection.as
index e023569..7f1155b 100644
--- a/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection.as
+++ b/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection.as
@@ -1113,7 +1113,7 @@ public class GroupingCollection extends HierarchicalData 
implements IGroupingCol
 var sortField:SortField = new SortField(groupingField.name, 
 groupingField.caseInsensitive, 
 groupingField.descending, groupingField.numeric);
-sortField.mx_internal::compareFunction_ = 
groupingField.compareFunction;
+sortField.compareFunction = groupingField.compareFunction;
 fields.push(sortField);
 }
 

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/286a0ca9/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection2.as
--
diff --git 
a/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection2.as 
b/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection2.as
index 1b73f86..6ceeac7 100644
--- 
a/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection2.as
+++ 
b/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection2.as
@@ -1154,7 +1154,7 @@ public class GroupingCollection2 extends HierarchicalData 
implements IGroupingCo
 var sortField:SortField = new SortField(groupingField.name, 
 groupingField.caseInsensitive, 
 groupingField.descending, groupingField.numeric);
-sortField.mx_internal::compareFunction_ = 
groupingField.compareFunction;
+sortField.compareFunction = groupingField.compareFunction;
 fields.push(sortField);
 }
 

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/286a0ca9/frameworks/projects/advancedgrids/src/mx/olap/DefaultCubeImpl.as
--
diff --git a/frameworks/projects/advancedgrids/src/mx/olap/DefaultCubeImpl.as 
b/frameworks/projects/advancedgrids/src/mx/olap/DefaultCubeImpl.as
index e6ed9bb..041147d 100644
--- a/frameworks/projects/advancedgrids/src/mx/olap/DefaultCubeImpl.as
+++ b/frameworks/projects/advancedgrids/src/mx/olap/DefaultCubeImpl.as
@@ -382,14 +382,14 @@ public class DefaultCubeImpl implements IOLAPCubeImpl
 newSort = new Sort;
 var fields:Array = [];
 
-var field:ISortField;
+var field:ISortField ;
 for each (level in levels)
 {
if (level.attribute && level.attribute.userDataFunction)
 {
attr = level.attribute;
-   field = new SortField(attr.dataField);
-   SortField(field).mx_internal::compareFunction_ = 
attr.dataCompareFunction;
+   field= new SortField(attr.dataField);
+   field.compareFunction = attr.dataCompareFunction;
 

[4/4] git commit: [flex-sdk] [refs/heads/release4.16.0] - Merge branch 'develop' into release4.16.0

2016-11-09 Thread mihaic
Merge branch 'develop' into release4.16.0


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/13183954
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/13183954
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/13183954

Branch: refs/heads/release4.16.0
Commit: 13183954ec08c2c58d5e16b0067e352f0084e768
Parents: b7ea704 286a0ca
Author: Mihai Chira 
Authored: Wed Nov 9 14:24:15 2016 +0100
Committer: Mihai Chira 
Committed: Wed Nov 9 14:24:15 2016 +0100

--
 .../src/mx/collections/GroupingCollection.as|  2 +-
 .../src/mx/collections/GroupingCollection2.as   |  2 +-
 .../src/mx/olap/DefaultCubeImpl.as  |  6 ++--
 .../src/spark/components/MobileGrid.as  |  5 ++--
 .../supportClasses/MobileGridColumn.as  |  6 ++--
 .../framework/src/mx/collections/ISortField.as  | 31 +++-
 .../framework/src/mx/collections/SortField.as   | 16 +-
 .../framework/tests/FLEX_34852_Tests.as |  5 ++--
 .../ListCollectionView_FLEX_34837_Tests.as  |  4 +--
 .../projects/mx/src/mx/controls/DataGrid.as | 15 ++
 .../spark/src/spark/collections/SortField.as|  9 +++---
 .../spark/src/spark/components/DataGrid.as  |  3 +-
 .../spark/components/gridClasses/GridColumn.as  |  6 ++--
 .../SWFs/GridSortPreserveSelection.mxml |  5 ++--
 .../Sort/SWFs/SF_ORIG_DataGridApp.mxml  | 10 +++
 .../Sort/SWFs/SF_ORIG_DataGridApp_halo.mxml |  8 ++---
 .../CustComp_sortField_compareFunction.mxml |  5 ++--
 17 files changed, 84 insertions(+), 54 deletions(-)
--




[2/3] git commit: [flex-sdk] [refs/heads/develop] - Revert FLEX-34880 part 2

2016-11-09 Thread mihaic
Revert FLEX-34880 part 2

This reverts commit ff4067f56651082cecbe062f9cfd2aedbe44bf60.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/3f5638d3
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/3f5638d3
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/3f5638d3

Branch: refs/heads/develop
Commit: 3f5638d30632f4a8638d11eb6859b9e0c288b3c1
Parents: 332e075
Author: Mihai Chira 
Authored: Wed Nov 9 14:08:30 2016 +0100
Committer: Mihai Chira 
Committed: Wed Nov 9 14:08:30 2016 +0100

--
 .../framework/tests/ListCollectionView_FLEX_34837_Tests.as   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/3f5638d3/frameworks/projects/framework/tests/ListCollectionView_FLEX_34837_Tests.as
--
diff --git 
a/frameworks/projects/framework/tests/ListCollectionView_FLEX_34837_Tests.as 
b/frameworks/projects/framework/tests/ListCollectionView_FLEX_34837_Tests.as
index f199481..f762358 100644
--- a/frameworks/projects/framework/tests/ListCollectionView_FLEX_34837_Tests.as
+++ b/frameworks/projects/framework/tests/ListCollectionView_FLEX_34837_Tests.as
@@ -25,7 +25,7 @@ package {
 import mx.collections.Sort;
 import mx.collections.SortField;
 import mx.utils.ObjectUtil;
-import mx.core.mx_internal;
+
 import org.flexunit.asserts.assertEquals;
 
 public class ListCollectionView_FLEX_34837_Tests {
@@ -87,7 +87,7 @@ package {
 
 const sortByStreetAscending:Sort = new Sort();
 var sortField:SortField = new ComplexSortField("address.street", 
false, false, false);
-sortField.mx_internal::compareFunction_ = compareByStreet;
+sortField.compareFunction = compareByStreet;
 sortByStreetAscending.fields = [sortField];
 _sut.sort = sortByStreetAscending;
 



[3/3] git commit: [flex-sdk] [refs/heads/develop] - Revert FLEX-34880 part 3

2016-11-09 Thread mihaic
Revert FLEX-34880 part 3

This reverts commit 2b09e327281211d26d65dd5d061b02d645cbdd39.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/286a0ca9
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/286a0ca9
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/286a0ca9

Branch: refs/heads/develop
Commit: 286a0ca9401b8e2a6e2ccca2fcc1764d4933b523
Parents: 3f5638d
Author: Mihai Chira 
Authored: Wed Nov 9 14:09:58 2016 +0100
Committer: Mihai Chira 
Committed: Wed Nov 9 14:09:58 2016 +0100

--
 .../src/mx/collections/GroupingCollection.as   |  2 +-
 .../src/mx/collections/GroupingCollection2.as  |  2 +-
 .../advancedgrids/src/mx/olap/DefaultCubeImpl.as   |  6 +++---
 .../components/supportClasses/MobileGridColumn.as  |  4 ++--
 .../framework/src/mx/collections/ISortField.as |  8 +++-
 .../projects/framework/src/mx/collections/SortField.as |  4 ++--
 frameworks/projects/mx/src/mx/controls/DataGrid.as | 13 +
 .../projects/spark/src/spark/collections/SortField.as  |  9 -
 .../src/spark/components/gridClasses/GridColumn.as |  2 +-
 .../newComps/CustComp_sortField_compareFunction.mxml   |  5 +++--
 10 files changed, 33 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/286a0ca9/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection.as
--
diff --git 
a/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection.as 
b/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection.as
index e023569..7f1155b 100644
--- a/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection.as
+++ b/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection.as
@@ -1113,7 +1113,7 @@ public class GroupingCollection extends HierarchicalData 
implements IGroupingCol
 var sortField:SortField = new SortField(groupingField.name, 
 groupingField.caseInsensitive, 
 groupingField.descending, groupingField.numeric);
-sortField.mx_internal::compareFunction_ = 
groupingField.compareFunction;
+sortField.compareFunction = groupingField.compareFunction;
 fields.push(sortField);
 }
 

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/286a0ca9/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection2.as
--
diff --git 
a/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection2.as 
b/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection2.as
index 1b73f86..6ceeac7 100644
--- 
a/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection2.as
+++ 
b/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection2.as
@@ -1154,7 +1154,7 @@ public class GroupingCollection2 extends HierarchicalData 
implements IGroupingCo
 var sortField:SortField = new SortField(groupingField.name, 
 groupingField.caseInsensitive, 
 groupingField.descending, groupingField.numeric);
-sortField.mx_internal::compareFunction_ = 
groupingField.compareFunction;
+sortField.compareFunction = groupingField.compareFunction;
 fields.push(sortField);
 }
 

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/286a0ca9/frameworks/projects/advancedgrids/src/mx/olap/DefaultCubeImpl.as
--
diff --git a/frameworks/projects/advancedgrids/src/mx/olap/DefaultCubeImpl.as 
b/frameworks/projects/advancedgrids/src/mx/olap/DefaultCubeImpl.as
index e6ed9bb..041147d 100644
--- a/frameworks/projects/advancedgrids/src/mx/olap/DefaultCubeImpl.as
+++ b/frameworks/projects/advancedgrids/src/mx/olap/DefaultCubeImpl.as
@@ -382,14 +382,14 @@ public class DefaultCubeImpl implements IOLAPCubeImpl
 newSort = new Sort;
 var fields:Array = [];
 
-var field:ISortField;
+var field:ISortField ;
 for each (level in levels)
 {
if (level.attribute && level.attribute.userDataFunction)
 {
attr = level.attribute;
-   field = new SortField(attr.dataField);
-   SortField(field).mx_internal::compareFunction_ = 
attr.dataCompareFunction;
+   field= new SortField(attr.dataField);
+   field.compareFunction = attr.dataCompareFunction;
   

[1/3] git commit: [flex-sdk] [refs/heads/develop] - Revert FLEX-34880 part 1 This reverts commit 0b5a634dabb00c04a492a08375e29c6885c1486f.

2016-11-09 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 0b5a634da -> 286a0ca94


Revert FLEX-34880 part 1
This reverts commit 0b5a634dabb00c04a492a08375e29c6885c1486f.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/332e075c
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/332e075c
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/332e075c

Branch: refs/heads/develop
Commit: 332e075cb3c290400b924a03bfe8d5cb8195009b
Parents: 0b5a634
Author: Mihai Chira 
Authored: Wed Nov 9 14:01:44 2016 +0100
Committer: Mihai Chira 
Committed: Wed Nov 9 14:01:44 2016 +0100

--
 .../src/spark/components/MobileGrid.as  |  5 ++---
 .../supportClasses/MobileGridColumn.as  |  2 +-
 .../framework/src/mx/collections/ISortField.as  | 23 
 .../framework/src/mx/collections/SortField.as   | 12 +-
 .../framework/tests/FLEX_34852_Tests.as |  5 ++---
 .../projects/mx/src/mx/controls/DataGrid.as |  2 +-
 .../spark/src/spark/components/DataGrid.as  |  3 +--
 .../spark/components/gridClasses/GridColumn.as  |  4 ++--
 .../SWFs/GridSortPreserveSelection.mxml |  5 ++---
 .../Sort/SWFs/SF_ORIG_DataGridApp.mxml  | 10 -
 .../Sort/SWFs/SF_ORIG_DataGridApp_halo.mxml |  8 +++
 11 files changed, 49 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/332e075c/frameworks/projects/experimental_mobile/src/spark/components/MobileGrid.as
--
diff --git 
a/frameworks/projects/experimental_mobile/src/spark/components/MobileGrid.as 
b/frameworks/projects/experimental_mobile/src/spark/components/MobileGrid.as
index 85d68fa..d58f885 100644
--- a/frameworks/projects/experimental_mobile/src/spark/components/MobileGrid.as
+++ b/frameworks/projects/experimental_mobile/src/spark/components/MobileGrid.as
@@ -22,7 +22,6 @@ package spark.components
 import mx.collections.ICollectionView;
 import mx.collections.ISort;
 import mx.collections.ISortField;
-import mx.collections.SortField;
 import mx.core.ClassFactory;
 import mx.core.ScrollPolicy;
 import mx.core.mx_internal;
@@ -281,8 +280,8 @@ public class MobileGrid extends List
 lastSortIndex = sortIndex;
 sortIndex = index;
 sortColumn = c;
-SortField(f).mx_internal::name_ = c.dataField;
-SortField(f).mx_internal::descending_ = desc;
+f.name = c.dataField;
+f.descending = desc;
 s.fields = [f];
 collection.sort = s;
 collection.refresh();

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/332e075c/frameworks/projects/experimental_mobile/src/spark/components/supportClasses/MobileGridColumn.as
--
diff --git 
a/frameworks/projects/experimental_mobile/src/spark/components/supportClasses/MobileGridColumn.as
 
b/frameworks/projects/experimental_mobile/src/spark/components/supportClasses/MobileGridColumn.as
index 668594c..ca8ab27 100644
--- 
a/frameworks/projects/experimental_mobile/src/spark/components/supportClasses/MobileGridColumn.as
+++ 
b/frameworks/projects/experimental_mobile/src/spark/components/supportClasses/MobileGridColumn.as
@@ -324,7 +324,7 @@ public class MobileGridColumn extends EventDispatcher
 };
 sortField.mx_internal::compareFunction = cF;
 }
-sortField.mx_internal::descending_ = column.sortDescending;
+sortField.descending = column.sortDescending;
 return sortField;
 }
 

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/332e075c/frameworks/projects/framework/src/mx/collections/ISortField.as
--
diff --git a/frameworks/projects/framework/src/mx/collections/ISortField.as 
b/frameworks/projects/framework/src/mx/collections/ISortField.as
index be3cc35..4186d0b 100644
--- a/frameworks/projects/framework/src/mx/collections/ISortField.as
+++ b/frameworks/projects/framework/src/mx/collections/ISortField.as
@@ -91,6 +91,11 @@ public interface ISortField
  */
 function get descending():Boolean;
 
+/**
+ *  @deprecated A future release of Apache Flex SDK will remove this 
function. Please use the constructor
+ *  argument instead.
+ */
+function set descending(value:Boolean):void;
 
 /**
  *  The name of the field to be sorted.
@@ -103,6 +108,12 @@ public interface ISortField
 function get name():String;
 
 /**
+ *  @deprecated A future release of Apache Flex SDK will remove this 
function. Please use the constructor
+ *  argument instead.
+ */
+function set name(n:String):void;
+
+/**
  *  Specifies that 

[1/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-34880 Placed only one state setter (SortField.compareFunction) behind mx_internal (thus also renaming it to SortField.compareFunction_) to prov

2016-11-06 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 522a06d61 -> 0b5a634da


FLEX-34880
Placed only one state setter (SortField.compareFunction) behind mx_internal 
(thus also renaming it to SortField.compareFunction_) to provide the template 
for the others. Also removed it from the interface (ISortField).


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/2b09e327
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/2b09e327
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/2b09e327

Branch: refs/heads/develop
Commit: 2b09e327281211d26d65dd5d061b02d645cbdd39
Parents: 522a06d
Author: Mihai Chira 
Authored: Sun Nov 6 16:58:13 2016 +0100
Committer: Mihai Chira 
Committed: Sun Nov 6 16:58:13 2016 +0100

--
 .../src/mx/collections/GroupingCollection.as   |  2 +-
 .../src/mx/collections/GroupingCollection2.as  |  2 +-
 .../advancedgrids/src/mx/olap/DefaultCubeImpl.as   |  6 +++---
 .../components/supportClasses/MobileGridColumn.as  |  4 ++--
 .../framework/src/mx/collections/ISortField.as |  8 +---
 .../projects/framework/src/mx/collections/SortField.as |  4 ++--
 frameworks/projects/mx/src/mx/controls/DataGrid.as | 13 -
 .../projects/spark/src/spark/collections/SortField.as  |  9 +
 .../src/spark/components/gridClasses/GridColumn.as |  2 +-
 .../newComps/CustComp_sortField_compareFunction.mxml   |  5 ++---
 10 files changed, 22 insertions(+), 33 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/2b09e327/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection.as
--
diff --git 
a/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection.as 
b/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection.as
index 7f1155b..e023569 100644
--- a/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection.as
+++ b/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection.as
@@ -1113,7 +1113,7 @@ public class GroupingCollection extends HierarchicalData 
implements IGroupingCol
 var sortField:SortField = new SortField(groupingField.name, 
 groupingField.caseInsensitive, 
 groupingField.descending, groupingField.numeric);
-sortField.compareFunction = groupingField.compareFunction;
+sortField.mx_internal::compareFunction_ = 
groupingField.compareFunction;
 fields.push(sortField);
 }
 

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/2b09e327/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection2.as
--
diff --git 
a/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection2.as 
b/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection2.as
index 6ceeac7..1b73f86 100644
--- 
a/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection2.as
+++ 
b/frameworks/projects/advancedgrids/src/mx/collections/GroupingCollection2.as
@@ -1154,7 +1154,7 @@ public class GroupingCollection2 extends HierarchicalData 
implements IGroupingCo
 var sortField:SortField = new SortField(groupingField.name, 
 groupingField.caseInsensitive, 
 groupingField.descending, groupingField.numeric);
-sortField.compareFunction = groupingField.compareFunction;
+sortField.mx_internal::compareFunction_ = 
groupingField.compareFunction;
 fields.push(sortField);
 }
 

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/2b09e327/frameworks/projects/advancedgrids/src/mx/olap/DefaultCubeImpl.as
--
diff --git a/frameworks/projects/advancedgrids/src/mx/olap/DefaultCubeImpl.as 
b/frameworks/projects/advancedgrids/src/mx/olap/DefaultCubeImpl.as
index 041147d..e6ed9bb 100644
--- a/frameworks/projects/advancedgrids/src/mx/olap/DefaultCubeImpl.as
+++ b/frameworks/projects/advancedgrids/src/mx/olap/DefaultCubeImpl.as
@@ -382,14 +382,14 @@ public class DefaultCubeImpl implements IOLAPCubeImpl
 newSort = new Sort;
 var fields:Array = [];
 
-var field:ISortField ;
+var field:ISortField;
 for each (level in levels)
 {
if (level.attribute && level.attribute.userDataFunction)
 {
attr = level.attribute;
-   field= new SortField(attr.dataField);
-   

[2/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-34880 Omitted to change a unit test.

2016-11-06 Thread mihaic
FLEX-34880
Omitted to change a unit test.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/ff4067f5
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/ff4067f5
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/ff4067f5

Branch: refs/heads/develop
Commit: ff4067f56651082cecbe062f9cfd2aedbe44bf60
Parents: 2b09e32
Author: Mihai Chira 
Authored: Sun Nov 6 17:42:40 2016 +0100
Committer: Mihai Chira 
Committed: Sun Nov 6 17:42:40 2016 +0100

--
 .../framework/tests/ListCollectionView_FLEX_34837_Tests.as   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/ff4067f5/frameworks/projects/framework/tests/ListCollectionView_FLEX_34837_Tests.as
--
diff --git 
a/frameworks/projects/framework/tests/ListCollectionView_FLEX_34837_Tests.as 
b/frameworks/projects/framework/tests/ListCollectionView_FLEX_34837_Tests.as
index f762358..f199481 100644
--- a/frameworks/projects/framework/tests/ListCollectionView_FLEX_34837_Tests.as
+++ b/frameworks/projects/framework/tests/ListCollectionView_FLEX_34837_Tests.as
@@ -25,7 +25,7 @@ package {
 import mx.collections.Sort;
 import mx.collections.SortField;
 import mx.utils.ObjectUtil;
-
+import mx.core.mx_internal;
 import org.flexunit.asserts.assertEquals;
 
 public class ListCollectionView_FLEX_34837_Tests {
@@ -87,7 +87,7 @@ package {
 
 const sortByStreetAscending:Sort = new Sort();
 var sortField:SortField = new ComplexSortField("address.street", 
false, false, false);
-sortField.compareFunction = compareByStreet;
+sortField.mx_internal::compareFunction_ = compareByStreet;
 sortByStreetAscending.fields = [sortField];
 _sut.sort = sortByStreetAscending;
 



[3/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-34880 Placed the other ISortField setters behind mx_internal and removed them from the interface.

2016-11-06 Thread mihaic
FLEX-34880
Placed the other ISortField setters behind mx_internal and removed them from 
the interface.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/0b5a634d
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/0b5a634d
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/0b5a634d

Branch: refs/heads/develop
Commit: 0b5a634dabb00c04a492a08375e29c6885c1486f
Parents: ff4067f
Author: Mihai Chira 
Authored: Sun Nov 6 19:08:38 2016 +0100
Committer: Mihai Chira 
Committed: Sun Nov 6 19:08:38 2016 +0100

--
 .../src/spark/components/MobileGrid.as  |  5 +++--
 .../supportClasses/MobileGridColumn.as  |  2 +-
 .../framework/src/mx/collections/ISortField.as  | 23 
 .../framework/src/mx/collections/SortField.as   | 12 +-
 .../framework/tests/FLEX_34852_Tests.as |  5 +++--
 .../projects/mx/src/mx/controls/DataGrid.as |  2 +-
 .../spark/src/spark/components/DataGrid.as  |  3 ++-
 .../spark/components/gridClasses/GridColumn.as  |  4 ++--
 .../SWFs/GridSortPreserveSelection.mxml |  5 +++--
 .../Sort/SWFs/SF_ORIG_DataGridApp.mxml  | 10 -
 .../Sort/SWFs/SF_ORIG_DataGridApp_halo.mxml |  8 +++
 11 files changed, 30 insertions(+), 49 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/0b5a634d/frameworks/projects/experimental_mobile/src/spark/components/MobileGrid.as
--
diff --git 
a/frameworks/projects/experimental_mobile/src/spark/components/MobileGrid.as 
b/frameworks/projects/experimental_mobile/src/spark/components/MobileGrid.as
index d58f885..85d68fa 100644
--- a/frameworks/projects/experimental_mobile/src/spark/components/MobileGrid.as
+++ b/frameworks/projects/experimental_mobile/src/spark/components/MobileGrid.as
@@ -22,6 +22,7 @@ package spark.components
 import mx.collections.ICollectionView;
 import mx.collections.ISort;
 import mx.collections.ISortField;
+import mx.collections.SortField;
 import mx.core.ClassFactory;
 import mx.core.ScrollPolicy;
 import mx.core.mx_internal;
@@ -280,8 +281,8 @@ public class MobileGrid extends List
 lastSortIndex = sortIndex;
 sortIndex = index;
 sortColumn = c;
-f.name = c.dataField;
-f.descending = desc;
+SortField(f).mx_internal::name_ = c.dataField;
+SortField(f).mx_internal::descending_ = desc;
 s.fields = [f];
 collection.sort = s;
 collection.refresh();

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/0b5a634d/frameworks/projects/experimental_mobile/src/spark/components/supportClasses/MobileGridColumn.as
--
diff --git 
a/frameworks/projects/experimental_mobile/src/spark/components/supportClasses/MobileGridColumn.as
 
b/frameworks/projects/experimental_mobile/src/spark/components/supportClasses/MobileGridColumn.as
index ca8ab27..668594c 100644
--- 
a/frameworks/projects/experimental_mobile/src/spark/components/supportClasses/MobileGridColumn.as
+++ 
b/frameworks/projects/experimental_mobile/src/spark/components/supportClasses/MobileGridColumn.as
@@ -324,7 +324,7 @@ public class MobileGridColumn extends EventDispatcher
 };
 sortField.mx_internal::compareFunction = cF;
 }
-sortField.descending = column.sortDescending;
+sortField.mx_internal::descending_ = column.sortDescending;
 return sortField;
 }
 

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/0b5a634d/frameworks/projects/framework/src/mx/collections/ISortField.as
--
diff --git a/frameworks/projects/framework/src/mx/collections/ISortField.as 
b/frameworks/projects/framework/src/mx/collections/ISortField.as
index 4186d0b..be3cc35 100644
--- a/frameworks/projects/framework/src/mx/collections/ISortField.as
+++ b/frameworks/projects/framework/src/mx/collections/ISortField.as
@@ -91,11 +91,6 @@ public interface ISortField
  */
 function get descending():Boolean;
 
-/**
- *  @deprecated A future release of Apache Flex SDK will remove this 
function. Please use the constructor
- *  argument instead.
- */
-function set descending(value:Boolean):void;
 
 /**
  *  The name of the field to be sorted.
@@ -108,12 +103,6 @@ public interface ISortField
 function get name():String;
 
 /**
- *  @deprecated A future release of Apache Flex SDK will remove this 
function. Please use the constructor
- *  argument instead.
- */
-function set name(n:String):void;
-
-/**
  *  Specifies that if the field being sorted contains numeric
  *  (number/int/uint) 

[3/4] git commit: [flex-sdk] [refs/heads/develop] - FLEX-34088 Using addChild instead of addElement for FlexUnit to get the test to run.

2016-09-19 Thread mihaic
FLEX-34088 Using addChild instead of addElement for FlexUnit to get the test to 
run.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/631b09c6
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/631b09c6
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/631b09c6

Branch: refs/heads/develop
Commit: 631b09c60a49af3dd96990f85ced677f51188d72
Parents: 3d71f1b
Author: Mihai Chira 
Authored: Mon Sep 19 13:32:06 2016 +0200
Committer: Mihai Chira 
Committed: Mon Sep 19 13:32:06 2016 +0200

--
 .../components/supportClasses/CalloutButton_FLEX_34088_Tests.as| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/631b09c6/frameworks/projects/spark/tests/spark/components/supportClasses/CalloutButton_FLEX_34088_Tests.as
--
diff --git 
a/frameworks/projects/spark/tests/spark/components/supportClasses/CalloutButton_FLEX_34088_Tests.as
 
b/frameworks/projects/spark/tests/spark/components/supportClasses/CalloutButton_FLEX_34088_Tests.as
index e084124..d1c68b3 100644
--- 
a/frameworks/projects/spark/tests/spark/components/supportClasses/CalloutButton_FLEX_34088_Tests.as
+++ 
b/frameworks/projects/spark/tests/spark/components/supportClasses/CalloutButton_FLEX_34088_Tests.as
@@ -62,7 +62,7 @@ package spark.components.supportClasses {
 public function 
test_dropdown_doesnt_close_when_item_selected_from_DropDownList():void
 {
 //given
-UIImpersonator.addElement(_sut);
+UIImpersonator.addChild(_sut);
 
 //when
 _sut.dispatchEvent(new MouseEvent(MouseEvent.ROLL_OVER));



[2/4] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35126 Added a unit test to reprouce the bug. Currently it passes, as expected. (But if I manually put back the fix for FLEX-34088, it fails, as

2016-09-19 Thread mihaic
FLEX-35126 Added a unit test to reprouce the bug. Currently it passes, as 
expected. (But if I manually put back the fix for FLEX-34088, it fails, as it 
should, meaning it actually tests the correct bug.)


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/3d71f1b5
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/3d71f1b5
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/3d71f1b5

Branch: refs/heads/develop
Commit: 3d71f1b5e458ee39f439ef68db092ed08a8935df
Parents: a797884
Author: Mihai Chira 
Authored: Mon Sep 19 13:24:17 2016 +0200
Committer: Mihai Chira 
Committed: Mon Sep 19 13:24:17 2016 +0200

--
 .../components/DropDownList_FLEX_35126_Tests.as | 182 +++
 1 file changed, 182 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/3d71f1b5/frameworks/projects/spark/tests/spark/components/DropDownList_FLEX_35126_Tests.as
--
diff --git 
a/frameworks/projects/spark/tests/spark/components/DropDownList_FLEX_35126_Tests.as
 
b/frameworks/projects/spark/tests/spark/components/DropDownList_FLEX_35126_Tests.as
new file mode 100644
index 000..82ab10e
--- /dev/null
+++ 
b/frameworks/projects/spark/tests/spark/components/DropDownList_FLEX_35126_Tests.as
@@ -0,0 +1,182 @@
+
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//  http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+
+
+package spark.components {
+import flash.events.Event;
+import flash.events.EventDispatcher;
+import flash.events.MouseEvent;
+
+import mx.events.FlexMouseEvent;
+
+import org.flexunit.assertThat;
+import org.flexunit.asserts.assertEquals;
+import org.flexunit.asserts.assertFalse;
+import org.flexunit.asserts.assertTrue;
+import org.flexunit.async.Async;
+import org.fluint.uiImpersonation.UIImpersonator;
+
+public class DropDownList_FLEX_35126_Tests
+{
+private static const NO_ENTER_FRAMES_TO_ALLOW:int = 2;
+private static var noEnterFramesRemaining:int = NaN;
+private static const _finishNotifier:EventDispatcher = new 
EventDispatcher();
+
+private static var _sut:DropDownListInspectable;
+private static var _dropDownListOnStage:DropDownList;
+private var _popUp:PopUpAnchor;
+
+[Before]
+public function setUp():void
+{
+_popUp = new PopUpAnchor();
+_popUp.displayPopUp = true;
+
+_sut = new DropDownListInspectable();
+_sut.addEventListener(FlexMouseEvent.MOUSE_DOWN_OUTSIDE, 
onMouseDownOutsidePopup);
+
+_popUp.popUp = _sut;
+
+_dropDownListOnStage = new DropDownList();
+}
+
+private function onMouseDownOutsidePopup(event:FlexMouseEvent):void
+{
+_popUp.displayPopUp = false;
+}
+
+[After]
+public function tearDown():void
+{
+_sut = null;
+_popUp = null;
+_dropDownListOnStage = null;
+}
+
+[Test(async, timeout=1000)]
+public function 
test_dropdown_doesnt_close_when_item_selected_from_DropDownList():void
+{
+//given
+_popUp.width = _sut.width = 150;
+_dropDownListOnStage.x = 200;
+UIImpersonator.addChild(_popUp);
+UIImpersonator.addChild(_dropDownListOnStage);
+
+//then
+assertTrue(_popUp.displayPopUp);
+assertThat(isNaN(_sut.dropDownController_.rollOverOpenDelay));
+
+//when
+_sut.openButton.dispatchEvent(new 
MouseEvent(MouseEvent.ROLL_OVER));
+_sut.openButton.dispatchEvent(new 
MouseEvent(MouseEvent.MOUSE_DOWN));
+
+//then - wait a frame
+noEnterFramesRemaining = NO_ENTER_FRAMES_TO_ALLOW;
+

[4/4] git commit: [flex-sdk] [refs/heads/develop] - FLEX-26808 Increased a test function's timeout and added a bit more information to see why another is failing.

2016-09-19 Thread mihaic
FLEX-26808 Increased a test function's timeout and added a bit more information 
to see why another is failing.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/0dff7f48
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/0dff7f48
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/0dff7f48

Branch: refs/heads/develop
Commit: 0dff7f4862f8937bd97c67ff7b02fe7245f77646
Parents: 631b09c
Author: Mihai Chira 
Authored: Mon Sep 19 13:35:33 2016 +0200
Committer: Mihai Chira 
Committed: Mon Sep 19 13:35:33 2016 +0200

--
 .../spark/tests/spark/components/DataGrid_FLEX_26808_Tests.as  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/0dff7f48/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_26808_Tests.as
--
diff --git 
a/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_26808_Tests.as 
b/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_26808_Tests.as
index de01b88..1480448 100644
--- 
a/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_26808_Tests.as
+++ 
b/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_26808_Tests.as
@@ -188,7 +188,7 @@ package spark.components {
 _sut.selectedIndices = new [0, 1];
 
 //then
-assertTrue(ArrayUtil.arraysMatch([_firstObject, _secondObject], 
VectorUtil.toArrayObject(_sut.selectedItems)));
+assertTrue("The first two objects should be selected", 
ArrayUtil.arraysMatch([_firstObject, _secondObject], 
VectorUtil.toArrayObject(_sut.selectedItems)));
 
 //given
 const mouseDown:MouseEvent = new MouseEvent(MouseEvent.MOUSE_DOWN, 
true, false, 5, 5, null, false, false, false);
@@ -204,7 +204,7 @@ package spark.components {
 _sut.removeEventListener(GridEvent.GRID_MOUSE_DOWN, 
onGridMouseDown);
 }
 
-[Test(async, timeout=1000)]
+[Test(async, timeout=1300)]
 public function test_dragging_maintains_manually_selected_items():void
 {
 //when
@@ -215,7 +215,7 @@ package spark.components {
 
 noEnterFramesRemaining = NO_ENTER_FRAMES_TO_ALLOW;
 UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, 
onEnterFrame);
-Async.handleEvent(this, _finishNotifier, Event.COMPLETE, 
test_programmatic_selection_and_dragging, 800);
+Async.handleEvent(this, _finishNotifier, Event.COMPLETE, 
test_programmatic_selection_and_dragging, 1200);
 }
 
 private function 
test_manual_selection_of_two_items_and_dragging(event:Event, 
passThroughData:Object):void



[2/2] git commit: [flex-sdk] [refs/heads/develop] - FLEX-34088 The fix for this bug became superfluous when the fix for FLEX-34078 was implemented, which also catered to this bug. So it can be safely

2016-09-09 Thread mihaic
FLEX-34088 The fix for this bug became superfluous when the fix for FLEX-34078 
was implemented, which also catered to this bug. So it can be safely removed 
(and should, because it causes other bugs - see the ticket).


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/2afdbe88
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/2afdbe88
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/2afdbe88

Branch: refs/heads/develop
Commit: 2afdbe885c20612449006320a60bed0e3501e6ce
Parents: e6e2e44
Author: Mihai Chira 
Authored: Fri Sep 9 13:43:56 2016 +0200
Committer: Mihai Chira 
Committed: Fri Sep 9 13:43:56 2016 +0200

--
 .../spark/components/supportClasses/DropDownController.as| 8 
 1 file changed, 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/2afdbe88/frameworks/projects/spark/src/spark/components/supportClasses/DropDownController.as
--
diff --git 
a/frameworks/projects/spark/src/spark/components/supportClasses/DropDownController.as
 
b/frameworks/projects/spark/src/spark/components/supportClasses/DropDownController.as
index 9ac003e..8c7fe08 100644
--- 
a/frameworks/projects/spark/src/spark/components/supportClasses/DropDownController.as
+++ 
b/frameworks/projects/spark/src/spark/components/supportClasses/DropDownController.as
@@ -607,14 +607,6 @@ public class DropDownController extends EventDispatcher
 if (openButton && target && openButton.contains(target))
 return;

-   // don't close if something just been selected in a 
DropDownList
-   if (target is IUIComponent)
-   {
-var document:Object = (target as IUIComponent).document;
-if (("hostComponent" in document) && document.hostComponent is 
DropDownList)
-   return;
-}
-
 if (hitAreaAdditions != null)
 {
var length:int = hitAreaAdditions.length;



[1/2] git commit: [flex-sdk] [refs/heads/develop] - FLEX-34088 Added unit test to reproduce the bug. Currently it passes, but I tested locally with some modifications to DropDownController and can cer

2016-09-09 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop bb3914ed9 -> 2afdbe885


FLEX-34088 Added unit test to reproduce the bug. Currently it passes, but I 
tested locally with some modifications to DropDownController and can certify it 
does indeed fail when it should - namely, when both the fix for FLEX-34088 and 
FLEX-34078 are removed. In other words, the fix for FLEX-34078 also fixes this 
issue, making the current fix superfluous. I'll remove it in the next commit.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/e6e2e445
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/e6e2e445
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/e6e2e445

Branch: refs/heads/develop
Commit: e6e2e445973d01fd00ebf93020c0a6f8c1f248c3
Parents: bb3914e
Author: Mihai Chira 
Authored: Fri Sep 9 13:41:41 2016 +0200
Committer: Mihai Chira 
Committed: Fri Sep 9 13:41:41 2016 +0200

--
 .../components/supportClasses/ButtonBase.as |   2 +-
 .../CalloutButton_FLEX_34088_Tests.as   | 146 +++
 2 files changed, 147 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e6e2e445/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as
--
diff --git 
a/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as 
b/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as
index 26bdf02..df08bdf 100644
--- 
a/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as
+++ 
b/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as
@@ -1345,7 +1345,7 @@ public class ButtonBase extends SkinnableComponent 
implements IFocusManagerCompo
 // There are two possibilities for being here:
 //1) mouseCaptured wasn't set to true (meaning 
this is the first click)
 //2) mouseCaptured was true (meaning a click 
operation hadn't finished 
-//   and we find ourselves in here again--perhaps 
it was a doublet tap).
+//   and we find ourselves in here again--perhaps 
it was a double tap).
 // In either case, let's make sure that down state 
shows up for a little bit
 // before going back to the up state.
 

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e6e2e445/frameworks/projects/spark/tests/spark/components/supportClasses/CalloutButton_FLEX_34088_Tests.as
--
diff --git 
a/frameworks/projects/spark/tests/spark/components/supportClasses/CalloutButton_FLEX_34088_Tests.as
 
b/frameworks/projects/spark/tests/spark/components/supportClasses/CalloutButton_FLEX_34088_Tests.as
new file mode 100644
index 000..e084124
--- /dev/null
+++ 
b/frameworks/projects/spark/tests/spark/components/supportClasses/CalloutButton_FLEX_34088_Tests.as
@@ -0,0 +1,146 @@
+
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//  http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+
+
+package spark.components.supportClasses {
+import flash.display.DisplayObject;
+import flash.events.Event;
+import flash.events.EventDispatcher;
+import flash.events.MouseEvent;
+
+import mx.collections.ArrayCollection;
+
+import org.flexunit.asserts.assertFalse;
+import org.flexunit.asserts.assertTrue;
+import org.flexunit.async.Async;
+import org.fluint.uiImpersonation.UIImpersonator;
+
+import spark.components.CalloutButton;
+import spark.components.DropDownList;
+
+public class CalloutButton_FLEX_34088_Tests
+{
+private static const NO_ENTER_FRAMES_TO_ALLOW:int = 1;
+private static var 

git commit: [flex-sdk] [refs/heads/develop] - FLEX-33311 Replacing all UIImpersonator.addElement() with UIImpersonator.addChild() to get the unit tests to run.

2016-08-18 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 5df1f00a7 -> 418690242


FLEX-33311 Replacing all UIImpersonator.addElement() with 
UIImpersonator.addChild() to get the unit tests to run.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/41869024
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/41869024
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/41869024

Branch: refs/heads/develop
Commit: 41869024243c57b0f3d0c232214c572ee68c3968
Parents: 5df1f00
Author: Mihai Chira 
Authored: Thu Aug 18 15:42:39 2016 +0200
Committer: Mihai Chira 
Committed: Thu Aug 18 15:42:39 2016 +0200

--
 .../tests/spark/components/DataGrid_FLEX_26808_Tests.as  | 8 
 .../tests/spark/components/DataGrid_FLEX_34837_Tests.as  | 6 +++---
 .../tests/spark/layouts/ConstraintLayout_FLEX_33311_Tests.as | 2 +-
 .../spark/tests/spark/skins/spark/FLEX_34625_Tests.as| 4 ++--
 4 files changed, 10 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/41869024/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_26808_Tests.as
--
diff --git 
a/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_26808_Tests.as 
b/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_26808_Tests.as
index 6b38388..de01b88 100644
--- 
a/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_26808_Tests.as
+++ 
b/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_26808_Tests.as
@@ -78,7 +78,7 @@ package spark.components {
 public function test_ctrl_click_removes_selected_item():void
 {
 //when
-UIImpersonator.addElement(_sut);
+UIImpersonator.addChild(_sut);
 
 //then
 assertNull(_sut.selectedItem);
@@ -121,7 +121,7 @@ package spark.components {
 public function 
test_ctrl_click_on_another_item_adds_it_to_selection():void
 {
 //when
-UIImpersonator.addElement(_sut);
+UIImpersonator.addChild(_sut);
 
 //then
 assertNull(_sut.selectedItem);
@@ -166,7 +166,7 @@ package spark.components {
 public function 
test_dragging_maintains_programmatically_selected_items():void
 {
 //when
-UIImpersonator.addElement(_sut);
+UIImpersonator.addChild(_sut);
 
 //then
 assertNull(_sut.selectedItem);
@@ -208,7 +208,7 @@ package spark.components {
 public function test_dragging_maintains_manually_selected_items():void
 {
 //when
-UIImpersonator.addElement(_sut);
+UIImpersonator.addChild(_sut);
 
 //then
 assertNull(_sut.selectedItem);

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/41869024/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_34837_Tests.as
--
diff --git 
a/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_34837_Tests.as 
b/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_34837_Tests.as
index 6c3f7ae..7492f85 100644
--- 
a/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_34837_Tests.as
+++ 
b/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_34837_Tests.as
@@ -59,7 +59,7 @@ package spark.components {
 const dataProvider:ListCollectionView = new 
ListCollectionView(tenObjects);
 
 //when
-UIImpersonator.addElement(_sut);
+UIImpersonator.addChild(_sut);
 assertNotNull("UIImpersonator doesn't work correctly!", _sut.grid);
 _sut.dataProvider = dataProvider;
 _sut.sortByColumns(new [0]); //sort by address.street
@@ -86,7 +86,7 @@ package spark.components {
 const dataProvider:ListCollectionView = new 
ListCollectionView(tenObjects);
 
 //when
-UIImpersonator.addElement(_sut);
+UIImpersonator.addChild(_sut);
 assertNotNull("UIImpersonator doesn't work correctly!", _sut.grid);
 _sut.dataProvider = dataProvider;
 _sut.sortByColumns(new [0]); //sort by address.dateMovedIn, 
in effect by month name
@@ -119,7 +119,7 @@ package spark.components {
 const dataProvider:ListCollectionView = new 
ListCollectionView(tenObjects);
 
 //when
-UIImpersonator.addElement(_sut);
+UIImpersonator.addChild(_sut);
 assertNotNull("UIImpersonator doesn't work correctly!", _sut.grid);
 _sut.dataProvider = dataProvider;
 


git commit: [flex-sdk] [refs/heads/develop] - FLEX-33311 CAUSE: It is possible for a call to ConstraintLayout.parseElementConstraints() to trigger, after a long series of other functions, a validation

2016-08-17 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 98c9446c1 -> 5df1f00a7


FLEX-33311
CAUSE:
It is possible for a call to ConstraintLayout.parseElementConstraints() to 
trigger, after a long series of other functions, a validation cycle on the same 
component whose layout is that ConstraintLayout instance. (If you want to see 
that series of stack traces, open stack.xml on the Jira ticket.) When this 
happens, either ConstraintLayout.measure() or 
ConstraintLayout.updateDisplayList() ends up calling clearConstraintCache(). 
(This is expected behaviour when there's no convoluted stack trace which ends 
up re-validating the same component, as we have here.) Now, when this inner 
validation cycle ends, and the outer call to parseConstraints() continues 
execution, it does so with all the cache variables nulled. This can result in a 
fatal if there is still a layout element remaining in parseConstraints() to 
parse via parseElementConstraints(). The latter function needs the cache Vector 
"rowBaselines", which is now null.

SOLUTION:
To cater for the special case when the call to parseConstraints() triggers 
another call to the same function, on the same ConstraintLayout instance, we 
use a counter to know when we're back in the outer call (when the counter is 0).

NOTES:
-The unit test now passes.
-Also removed an unused local variable.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/5df1f00a
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/5df1f00a
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/5df1f00a

Branch: refs/heads/develop
Commit: 5df1f00a71319c4aa6471128dab5e918e01334f0
Parents: 98c9446
Author: Mihai Chira 
Authored: Wed Aug 17 18:44:22 2016 +0200
Committer: Mihai Chira 
Committed: Wed Aug 17 18:44:22 2016 +0200

--
 .../spark/src/spark/layouts/ConstraintLayout.as | 26 ++--
 1 file changed, 18 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/5df1f00a/frameworks/projects/spark/src/spark/layouts/ConstraintLayout.as
--
diff --git a/frameworks/projects/spark/src/spark/layouts/ConstraintLayout.as 
b/frameworks/projects/spark/src/spark/layouts/ConstraintLayout.as
index 4953917..d698103 100644
--- a/frameworks/projects/spark/src/spark/layouts/ConstraintLayout.as
+++ b/frameworks/projects/spark/src/spark/layouts/ConstraintLayout.as
@@ -121,6 +121,10 @@ use namespace mx_internal;
  */
 public class ConstraintLayout extends LayoutBase
 {
+
+//See FLEX-33311 for more details on why this is used
+private var constraintCacheNeeded:int = 0;
+
 
//--
 //
 //  Class methods
@@ -1604,7 +1608,9 @@ public class ConstraintLayout extends LayoutBase
 var layoutTarget:GroupBase = target;
 if (!layoutTarget)
 return;
-
+
+constraintCacheNeeded++;
+
 var count:Number = layoutTarget.numElements;
 var layoutElement:ILayoutElement;
 
@@ -1614,7 +1620,7 @@ public class ConstraintLayout extends LayoutBase
 // Populate rowBaselines with baseline information from rows.
 var n:int = _constraintRows.length;
 var row:ConstraintRow;
-var obj:Object = {};
+
 if (rowBaselines == null)
 rowBaselines = new Vector.();
 else
@@ -1641,6 +1647,7 @@ public class ConstraintLayout extends LayoutBase
 }
 
 this.constraintCache = cache;
+constraintCacheNeeded--;
 }
 
 /**
@@ -1833,12 +1840,15 @@ public class ConstraintLayout extends LayoutBase
  */
 private function clearConstraintCache():void
 {
-colSpanElements = null;
-rowSpanElements = null;
-otherElements = null;
-rowBaselines = null;
-rowMaxAscents = null;
-constraintCache = null;
+if(!constraintCacheNeeded)
+{
+colSpanElements = null;
+rowSpanElements = null;
+otherElements = null;
+rowBaselines = null;
+rowMaxAscents = null;
+constraintCache = null;
+}
 }
 }
 }



[2/2] git commit: [flex-sdk] [refs/heads/develop] - FLEX-33311 Adding unit test to reproduce the bug. Currently fails, as expected.

2016-08-17 Thread mihaic
FLEX-33311 Adding unit test to reproduce the bug. Currently fails, as expected.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/98c9446c
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/98c9446c
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/98c9446c

Branch: refs/heads/develop
Commit: 98c9446c123749179ed3fee35e31e284a17ac8c6
Parents: 8bb9003
Author: Mihai Chira 
Authored: Wed Aug 17 18:17:07 2016 +0200
Committer: Mihai Chira 
Committed: Wed Aug 17 18:17:07 2016 +0200

--
 .../ConstraintLayout_FLEX_33311_Tests.as| 139 +++
 1 file changed, 139 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/98c9446c/frameworks/projects/spark/tests/spark/layouts/ConstraintLayout_FLEX_33311_Tests.as
--
diff --git 
a/frameworks/projects/spark/tests/spark/layouts/ConstraintLayout_FLEX_33311_Tests.as
 
b/frameworks/projects/spark/tests/spark/layouts/ConstraintLayout_FLEX_33311_Tests.as
new file mode 100644
index 000..9a3d4ce
--- /dev/null
+++ 
b/frameworks/projects/spark/tests/spark/layouts/ConstraintLayout_FLEX_33311_Tests.as
@@ -0,0 +1,139 @@
+
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//  http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+
+
+package spark.layouts {
+import flash.events.Event;
+import flash.events.EventDispatcher;
+
+import mx.containers.utilityClasses.ConstraintColumn;
+import mx.containers.utilityClasses.ConstraintRow;
+import mx.effects.Resize;
+import mx.states.SetProperty;
+import mx.states.State;
+import mx.states.Transition;
+
+import org.flexunit.asserts.assertTrue;
+import org.flexunit.async.Async;
+import org.fluint.uiImpersonation.UIImpersonator;
+
+import spark.components.DropDownList;
+import spark.components.Group;
+import spark.events.DropDownEvent;
+
+public class ConstraintLayout_FLEX_33311_Tests {
+private static const NO_ENTER_FRAMES_TO_ALLOW:int = 3;
+private static var noEnterFramesRemaining:int = NaN;
+private static const _finishNotifier:EventDispatcher = new 
EventDispatcher();
+
+private var _sut:ConstraintLayout;
+private var _parentGroup:Group;
+private var _childGroup1:Group;
+private var _childGroup2:Group;
+private var _dropDown:DropDownList;
+
+[Before]
+public function setUp():void
+{
+_sut =  new ConstraintLayout();
+_sut.constraintColumns = new [new 
ConstraintColumn()];
+var row:ConstraintRow = new ConstraintRow();
+row.id = "row1";
+_sut.constraintRows = new [row];
+
+
+_parentGroup = new Group();
+_childGroup1 = new Group();
+_childGroup2 = new Group();
+
+_dropDown = new DropDownList();
+_childGroup1.addElement(_dropDown);
+_parentGroup.addElement(_childGroup1);
+_parentGroup.addElement(_childGroup2);
+
+_parentGroup.states = [
+new State({name:"closed", overrides:[new 
SetProperty(_dropDown, "width", "200")]}),
+new State({name:"open", overrides:[new SetProperty(_dropDown, 
"width", "400")]})];
+_parentGroup.currentState = "closed";
+
+var _transition:Transition = new Transition();
+_transition.fromState = "*";
+_transition.toState = "*";
+_transition.effect = new Resize(_childGroup1);
+_parentGroup.transitions = [_transition];
+}
+
+[After]
+public function tearDown():void
+{
+_sut = null;
+_parentGroup = null;
+_childGroup1 = null;
+_childGroup2 = null;
+_dropDown = null;
+}
+
+[Test(async, 

[1/2] git commit: [flex-sdk] [refs/heads/develop] - FLEX-33311 Correcting some typos in the asdoc.

2016-08-17 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 347b08316 -> 98c9446c1


FLEX-33311 Correcting some typos in the asdoc.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/8bb90031
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/8bb90031
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/8bb90031

Branch: refs/heads/develop
Commit: 8bb90031f9cda5c39183c82659e7f2b609f6a494
Parents: 347b083
Author: Mihai Chira 
Authored: Wed Aug 17 11:27:40 2016 +0200
Committer: Mihai Chira 
Committed: Wed Aug 17 11:27:40 2016 +0200

--
 .../projects/spark/src/spark/layouts/ConstraintLayout.as   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/8bb90031/frameworks/projects/spark/src/spark/layouts/ConstraintLayout.as
--
diff --git a/frameworks/projects/spark/src/spark/layouts/ConstraintLayout.as 
b/frameworks/projects/spark/src/spark/layouts/ConstraintLayout.as
index 64db42d..4953917 100644
--- a/frameworks/projects/spark/src/spark/layouts/ConstraintLayout.as
+++ b/frameworks/projects/spark/src/spark/layouts/ConstraintLayout.as
@@ -83,7 +83,7 @@ use namespace mx_internal;
  *and right constraints.
  * 
  *If the element has both top and bottom 
constraints, 
- *it's height is set to be the container's height minus the 
top 
+ *it's height is set to be the container's height minus the 
top
  *and bottom constraints.
  *
  *The element is set to its preferred width and/or height.
@@ -96,12 +96,12 @@ use namespace mx_internal;
  *the vertical direction such that its baselinePosition 
(usually the base line
  *of its first line of text) is aligned with baseline 
constraint.
  *
- *If element's top or left constraints 
+ *If element's top or left constraints
  *are specified, then the element is
  *positioned such that the top-left corner of the element's layout bounds 
is
  *offset from the top-left corner of the container by the specified 
values.
  *
- *If element's bottom or right constraints 
are specified, 
+ *If element's bottom or right constraints 
are specified,
  *then the element is positioned such that the bottom-right corner 
  *of the element's layout bounds is
  *offset from the bottom-right corner of the container by the specified 
values.



svn commit: r1749074 - in /flex/site/trunk/content/showcase: data/ images/healthfoodlifetracking/ images/healthfoodlifetracking/prev/

2016-06-18 Thread mihaic
Author: mihaic
Date: Sat Jun 18 16:38:48 2016
New Revision: 1749074

URL: http://svn.apache.org/viewvc?rev=1749074=rev
Log:
FLEX-35016
Added information to showcase.

Added:
flex/site/trunk/content/showcase/images/healthfoodlifetracking/
flex/site/trunk/content/showcase/images/healthfoodlifetracking/1.png   
(with props)
flex/site/trunk/content/showcase/images/healthfoodlifetracking/2.png   
(with props)
flex/site/trunk/content/showcase/images/healthfoodlifetracking/3.png   
(with props)
flex/site/trunk/content/showcase/images/healthfoodlifetracking/4.png   
(with props)
flex/site/trunk/content/showcase/images/healthfoodlifetracking/5.png   
(with props)
flex/site/trunk/content/showcase/images/healthfoodlifetracking/prev/
flex/site/trunk/content/showcase/images/healthfoodlifetracking/prev/1.png   
(with props)
flex/site/trunk/content/showcase/images/healthfoodlifetracking/prev/2.png   
(with props)
flex/site/trunk/content/showcase/images/healthfoodlifetracking/prev/3.png   
(with props)
flex/site/trunk/content/showcase/images/healthfoodlifetracking/prev/4.png   
(with props)
flex/site/trunk/content/showcase/images/healthfoodlifetracking/prev/5.png   
(with props)
Modified:
flex/site/trunk/content/showcase/data/showcase.xml

Modified: flex/site/trunk/content/showcase/data/showcase.xml
URL: 
http://svn.apache.org/viewvc/flex/site/trunk/content/showcase/data/showcase.xml?rev=1749074=1749073=1749074=diff
==
--- flex/site/trunk/content/showcase/data/showcase.xml (original)
+++ flex/site/trunk/content/showcase/data/showcase.xml Sat Jun 18 16:38:48 2016
@@ -892,6 +892,20 @@ The goal is simple. Become the richest l
   


+   
+   https://play.google.com/store/apps/details?id=air.deta;
+ dev="Apache Flex 4.13; AIR 16; push notifications">
+ free lifetraking healthfood, Calorie Counter, Water 
Counter, recipes cookbook, videoHD recipes.
+
+
+
+
+
+
+
+
 
 
 

Added: flex/site/trunk/content/showcase/images/healthfoodlifetracking/1.png
URL: 
http://svn.apache.org/viewvc/flex/site/trunk/content/showcase/images/healthfoodlifetracking/1.png?rev=1749074=auto
==
Binary file - no diff available.

Propchange: flex/site/trunk/content/showcase/images/healthfoodlifetracking/1.png
--
svn:mime-type = application/octet-stream

Added: flex/site/trunk/content/showcase/images/healthfoodlifetracking/2.png
URL: 
http://svn.apache.org/viewvc/flex/site/trunk/content/showcase/images/healthfoodlifetracking/2.png?rev=1749074=auto
==
Binary file - no diff available.

Propchange: flex/site/trunk/content/showcase/images/healthfoodlifetracking/2.png
--
svn:mime-type = application/octet-stream

Added: flex/site/trunk/content/showcase/images/healthfoodlifetracking/3.png
URL: 
http://svn.apache.org/viewvc/flex/site/trunk/content/showcase/images/healthfoodlifetracking/3.png?rev=1749074=auto
==
Binary file - no diff available.

Propchange: flex/site/trunk/content/showcase/images/healthfoodlifetracking/3.png
--
svn:mime-type = application/octet-stream

Added: flex/site/trunk/content/showcase/images/healthfoodlifetracking/4.png
URL: 
http://svn.apache.org/viewvc/flex/site/trunk/content/showcase/images/healthfoodlifetracking/4.png?rev=1749074=auto
==
Binary file - no diff available.

Propchange: flex/site/trunk/content/showcase/images/healthfoodlifetracking/4.png
--
svn:mime-type = application/octet-stream

Added: flex/site/trunk/content/showcase/images/healthfoodlifetracking/5.png
URL: 
http://svn.apache.org/viewvc/flex/site/trunk/content/showcase/images/healthfoodlifetracking/5.png?rev=1749074=auto
==
Binary file - no diff available.

Propchange: flex/site/trunk/content/showcase/images/healthfoodlifetracking/5.png
--
svn:mime-type = application/octet-stream

Added: flex/site/trunk/content/showcase/images/healthfoodlifetracking/prev/1.png
URL: 
http://svn.apache.org/viewvc/flex/site/trunk/content/showcase/images/healthfoodlifetracking/prev/1.png?rev

svn commit: r1749072 - in /flex/site/trunk/content/showcase: data/ images/Tourismart/ images/Tourismart/prev/

2016-06-18 Thread mihaic
Author: mihaic
Date: Sat Jun 18 16:17:12 2016
New Revision: 1749072

URL: http://svn.apache.org/viewvc?rev=1749072=rev
Log:
FLEX-35034 FLEX-35036
Added apps data to showcase.

Added:
flex/site/trunk/content/showcase/images/Tourismart/
flex/site/trunk/content/showcase/images/Tourismart/image1.png   (with props)
flex/site/trunk/content/showcase/images/Tourismart/image2.png   (with props)
flex/site/trunk/content/showcase/images/Tourismart/image3.png   (with props)
flex/site/trunk/content/showcase/images/Tourismart/image5.png   (with props)
flex/site/trunk/content/showcase/images/Tourismart/prev/
flex/site/trunk/content/showcase/images/Tourismart/prev/image1.png   (with 
props)
flex/site/trunk/content/showcase/images/Tourismart/prev/image2.png   (with 
props)
flex/site/trunk/content/showcase/images/Tourismart/prev/image3.png   (with 
props)
flex/site/trunk/content/showcase/images/Tourismart/prev/image5.png   (with 
props)
Modified:
flex/site/trunk/content/showcase/data/showcase.xml

Modified: flex/site/trunk/content/showcase/data/showcase.xml
URL: 
http://svn.apache.org/viewvc/flex/site/trunk/content/showcase/data/showcase.xml?rev=1749072=1749071=1749072=diff
==
--- flex/site/trunk/content/showcase/data/showcase.xml (original)
+++ flex/site/trunk/content/showcase/data/showcase.xml Sat Jun 18 16:17:12 2016
@@ -291,6 +291,17 @@ Functions include product browsing, filt
 
 

+   http://simpleapps.gr/;
+ dev="Apache Flex 4.14; AIR 19">
+'Glimpses of Santorini' is tablet app about the worldwide 
famous Greek Island of Santorini. In Glimpses of Santorini you will find all 
the needed information about your travel to the beautiful island. From villages 
to beaches, we have created unique and useful content. In the dynamic map, you 
can find all the nearby sights while you can have instant access to live 
weather feeds. Enjoy more than 350 fantastic photos.
+
+   https://play.google.com/store/apps/details?id=com.winwebsoft.santorini"/>
+   https://itunes.apple.com/us/app/glimpses-of-santorini/id992194071?mt=8"/>
+
+
+   
http://www.goal-games.de/; dev="Flex 4.6">
 History is not just a date, building and person - its a 
story. The Glory of India is an iOS + Android app which co-relates a lot of 
information to form a story around Indian history. Developed with Flex 4.6 and 
its mobile components, it delivers a consistent experience across devices. 
There's also a free lite version (limited) which is generated from the common 
code-base. 
 
@@ -780,7 +791,7 @@ As with any Beta software, please give u
http://simpleapps.gr/;
- dev="Flex 4.15; AIR 19, 20">
+ dev="Apache Flex 4.15; AIR 19, 20">
 TEDxAthens 2016 is an event - agenda app for the upcoming 
TEDx Athens event. It provides information about the Program, Speakers and 
Venue. We also implemented Push notifications to be used for news and 
announcements during the event.
 
https://play.google.com/store/apps/details?id=tech.simpleapps.tedxathens2016"/>
@@ -804,6 +815,23 @@ AppStore app coming soon.
https://play.google.com/store/apps/details?id=air.com.redcodelabs.TodoLists;
 />


+   
+   http://simpleapps.gr/;
+ dev="Apache Flex 4.14; AIR 18">
+Tourismart lite helps lodging owners simplify and 
organize their daily tasks. Guests list, bookings and expenses are now 
accessible anywhere, no internet connection is required. The application is 
easily customizable to reflect on your needs and the size of your hotel. You 
can quickly check room availability through your tablet and make a booking for 
a customer even during a call. Keep track of your booking history, current and 
future room reservations with one click.
+
+   https://play.google.com/store/apps/details?id=gr.tourismart.offline"/>
+   https://itunes.apple.com/us/app/tourismart-hotel-management/id946699823?mt=8"/>
+
+
+
+
+
+
+
+
 
 
 http://svn.apache.org/viewvc/flex/site/trunk/content/showcase/images/Tourismart/image1.png?rev=1749072=auto
==
Binary file - no diff available.

Propchange: flex/site/trunk/content/showcase/images/Tourismart/image1.png
--
svn:mime-type = application/octet-stream

Added: flex/site/trunk/content/showcase/images/Tourismart/image2.png
URL: 
http://svn.apache.org/viewvc/flex/site/trunk/content/showcase/images/Tourismart/image2.png?rev=1749072=auto
==

[2/2] git commit: [flex-tlf] [refs/heads/develop] - FLEX-35100 CAUSE: TextBlock.createTextLine() orTextBlock.recreateTextLine() return null when there's no more text to create lines for (as indicated

2016-06-18 Thread mihaic
FLEX-35100
CAUSE: TextBlock.createTextLine() orTextBlock.recreateTextLine() return null 
when there's no more text to create lines for (as indicated by the previousLine 
parameter) or the TextBlock's content's text is null or "". (It's also possible 
when the width parameter is insufficient, but in this case the fitSomething 
parameter is true, which excludes this case).

SOLUTION: Added a null check for textLine.


Project: http://git-wip-us.apache.org/repos/asf/flex-tlf/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-tlf/commit/cb2794ed
Tree: http://git-wip-us.apache.org/repos/asf/flex-tlf/tree/cb2794ed
Diff: http://git-wip-us.apache.org/repos/asf/flex-tlf/diff/cb2794ed

Branch: refs/heads/develop
Commit: cb2794edbda69257b9660132d27931220049a355
Parents: 9526d45
Author: Mihai Chira 
Authored: Sat Jun 18 16:37:17 2016 +0200
Committer: Mihai Chira 
Committed: Sat Jun 18 16:37:17 2016 +0200

--
 textLayout/src/flashx/textLayout/compose/TextFlowLine.as | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/cb2794ed/textLayout/src/flashx/textLayout/compose/TextFlowLine.as
--
diff --git a/textLayout/src/flashx/textLayout/compose/TextFlowLine.as 
b/textLayout/src/flashx/textLayout/compose/TextFlowLine.as
index c3c73f0..dbc935c 100644
--- a/textLayout/src/flashx/textLayout/compose/TextFlowLine.as
+++ b/textLayout/src/flashx/textLayout/compose/TextFlowLine.as
@@ -933,7 +933,10 @@ package flashx.textLayout.compose
}
else
textLine = 
swfContext.callInContext(textBlock.createTextLine, textBlock, [ previousLine, 
_targetWidth, effLineOffset, true ]);
-   
+
+   if(textLine == null)
+   return null;
+
textLine.x = this.x;
CONFIG::debug { Debugging.traceFTEAssign(textLine,"x", 
this.x);  }
textLine.y = createShapeY(bp);



[1/2] git commit: [flex-tlf] [refs/heads/develop] - FLEX-35100 Unit testing my assumptions of TextBlock.createTextLine() and TextBlock.recreateTextLine().

2016-06-18 Thread mihaic
Repository: flex-tlf
Updated Branches:
  refs/heads/develop 3ce6a7b71 -> cb2794edb


FLEX-35100
Unit testing my assumptions of TextBlock.createTextLine() and 
TextBlock.recreateTextLine().


Project: http://git-wip-us.apache.org/repos/asf/flex-tlf/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-tlf/commit/9526d456
Tree: http://git-wip-us.apache.org/repos/asf/flex-tlf/tree/9526d456
Diff: http://git-wip-us.apache.org/repos/asf/flex-tlf/diff/9526d456

Branch: refs/heads/develop
Commit: 9526d4561fe8c83733adc74622ef9bfca36443d3
Parents: 3ce6a7b
Author: Mihai Chira 
Authored: Sat Jun 18 16:25:27 2016 +0200
Committer: Mihai Chira 
Committed: Sat Jun 18 16:25:27 2016 +0200

--
 automation_tests/src/AllTestsSuite.as   |   2 +
 .../UnitTest/Tests/TextBlock_FLEX_35100_Test.as | 378 +++
 2 files changed, 380 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/9526d456/automation_tests/src/AllTestsSuite.as
--
diff --git a/automation_tests/src/AllTestsSuite.as 
b/automation_tests/src/AllTestsSuite.as
index 62f2f45..b0dbf9a 100644
--- a/automation_tests/src/AllTestsSuite.as
+++ b/automation_tests/src/AllTestsSuite.as
@@ -57,6 +57,7 @@ package
 import UnitTest.Tests.StyleTest;
 import UnitTest.Tests.TCYTest;
 import UnitTest.Tests.TabTest;
+import UnitTest.Tests.TextBlock_FLEX_35100_Test;
 import UnitTest.Tests.TextContainerManagerTest;
 import UnitTest.Tests.TextFlowEditTest;
 import UnitTest.Tests.TextFlowTextLineFactoryTest;
@@ -114,6 +115,7 @@ package
 public var scrollToRangeTest:ScrollToRangeTest;
 public var 
pasteWithMultiParagraph:PasteWithMutliParagraph_FLEX_34876_Test;
public var flex_34807:FLEX_34807_Test;
+public var flex_35100:TextBlock_FLEX_35100_Test;
 }
 
 }

http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/9526d456/automation_tests/src/UnitTest/Tests/TextBlock_FLEX_35100_Test.as
--
diff --git a/automation_tests/src/UnitTest/Tests/TextBlock_FLEX_35100_Test.as 
b/automation_tests/src/UnitTest/Tests/TextBlock_FLEX_35100_Test.as
new file mode 100644
index 000..17f9789
--- /dev/null
+++ b/automation_tests/src/UnitTest/Tests/TextBlock_FLEX_35100_Test.as
@@ -0,0 +1,378 @@
+
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//  http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+
+package UnitTest.Tests {
+import UnitTest.ExtendedClasses.VellumTestCase;
+import UnitTest.Fixtures.TestConfig;
+
+import flash.text.engine.ElementFormat;
+
+import flash.text.engine.TextBlock;
+import flash.text.engine.TextElement;
+import flash.text.engine.TextLine;
+import flash.text.engine.TextLineCreationResult;
+
+import org.flexunit.assertThat;
+import org.flexunit.asserts.assertEquals;
+import org.flexunit.asserts.assertNotNull;
+import org.flexunit.asserts.assertNull;
+
+public class TextBlock_FLEX_35100_Test extends VellumTestCase {
+
+private static const WIDTH_FOR_TWO_LINES:int = 50;
+private static var _sut:TextBlock;
+
+public function TextBlock_FLEX_35100_Test()
+{
+super("", "TextBlock_FLEX_35100_Tests", TestConfig.getInstance());
+
+metaData = {};
+}
+
+[Before]
+override public function setUpTest():void
+{
+super.setUpTest();
+_sut = new TextBlock(new TextElement("Hello world!", new 
ElementFormat()));
+}
+
+[After]
+override public function tearDownTest():void
+{
+super.tearDownTest();
+_sut = null;
+}
+
+

+//
+// createTextLine()
+//
+

svn commit: r1749067 - in /flex/site/trunk/content/showcase: data/ images/TEDxAthens2016/ images/TEDxAthens2016/prev/

2016-06-18 Thread mihaic
Author: mihaic
Date: Sat Jun 18 15:53:58 2016
New Revision: 1749067

URL: http://svn.apache.org/viewvc?rev=1749067=rev
Log:
FLEX-35035
Added app details to showcase.

Added:
flex/site/trunk/content/showcase/images/TEDxAthens2016/
flex/site/trunk/content/showcase/images/TEDxAthens2016/prev/
flex/site/trunk/content/showcase/images/TEDxAthens2016/prev/screen1.jpeg   
(with props)
flex/site/trunk/content/showcase/images/TEDxAthens2016/prev/screen2.jpeg   
(with props)
flex/site/trunk/content/showcase/images/TEDxAthens2016/prev/screen3.jpeg   
(with props)
flex/site/trunk/content/showcase/images/TEDxAthens2016/prev/screen4.jpeg   
(with props)
flex/site/trunk/content/showcase/images/TEDxAthens2016/screen1.jpeg   (with 
props)
flex/site/trunk/content/showcase/images/TEDxAthens2016/screen2.jpeg   (with 
props)
flex/site/trunk/content/showcase/images/TEDxAthens2016/screen3.jpeg   (with 
props)
flex/site/trunk/content/showcase/images/TEDxAthens2016/screen4.jpeg   (with 
props)
Modified:
flex/site/trunk/content/showcase/data/showcase.xml

Modified: flex/site/trunk/content/showcase/data/showcase.xml
URL: 
http://svn.apache.org/viewvc/flex/site/trunk/content/showcase/data/showcase.xml?rev=1749067=1749066=1749067=diff
==
--- flex/site/trunk/content/showcase/data/showcase.xml (original)
+++ flex/site/trunk/content/showcase/data/showcase.xml Sat Jun 18 15:53:58 2016
@@ -777,6 +777,23 @@ As with any Beta software, please give u
 
 

+   http://simpleapps.gr/;
+ dev="Flex 4.15; AIR 19, 20">
+TEDxAthens 2016 is an event - agenda app for the upcoming 
TEDx Athens event. It provides information about the Program, Speakers and 
Venue. We also implemented Push notifications to be used for news and 
announcements during the event.
+
+   https://play.google.com/store/apps/details?id=tech.simpleapps.tedxathens2016"/>
+   https://itunes.apple.com/us/app/tedxathens-2016/id1076197243?mt=8"/>
+
+
+
+
+
+   
+
+
+   


Added: flex/site/trunk/content/showcase/images/TEDxAthens2016/prev/screen1.jpeg
URL: 
http://svn.apache.org/viewvc/flex/site/trunk/content/showcase/images/TEDxAthens2016/prev/screen1.jpeg?rev=1749067=auto
==
Binary file - no diff available.

Propchange: 
flex/site/trunk/content/showcase/images/TEDxAthens2016/prev/screen1.jpeg
--
svn:mime-type = application/octet-stream

Added: flex/site/trunk/content/showcase/images/TEDxAthens2016/prev/screen2.jpeg
URL: 
http://svn.apache.org/viewvc/flex/site/trunk/content/showcase/images/TEDxAthens2016/prev/screen2.jpeg?rev=1749067=auto
==
Binary file - no diff available.

Propchange: 
flex/site/trunk/content/showcase/images/TEDxAthens2016/prev/screen2.jpeg
--
svn:mime-type = application/octet-stream

Added: flex/site/trunk/content/showcase/images/TEDxAthens2016/prev/screen3.jpeg
URL: 
http://svn.apache.org/viewvc/flex/site/trunk/content/showcase/images/TEDxAthens2016/prev/screen3.jpeg?rev=1749067=auto
==
Binary file - no diff available.

Propchange: 
flex/site/trunk/content/showcase/images/TEDxAthens2016/prev/screen3.jpeg
--
svn:mime-type = application/octet-stream

Added: flex/site/trunk/content/showcase/images/TEDxAthens2016/prev/screen4.jpeg
URL: 
http://svn.apache.org/viewvc/flex/site/trunk/content/showcase/images/TEDxAthens2016/prev/screen4.jpeg?rev=1749067=auto
==
Binary file - no diff available.

Propchange: 
flex/site/trunk/content/showcase/images/TEDxAthens2016/prev/screen4.jpeg
--
svn:mime-type = application/octet-stream

Added: flex/site/trunk/content/showcase/images/TEDxAthens2016/screen1.jpeg
URL: 
http://svn.apache.org/viewvc/flex/site/trunk/content/showcase/images/TEDxAthens2016/screen1.jpeg?rev=1749067=auto
==
Binary file - no diff available.

Propchange: flex/site/trunk/content/showcase/images/TEDxAthens2016/screen1.jpeg
--
svn:mime-type = application/octet-stream

Added: flex/site/trunk/content/showcase/images/TEDxAthens2016/screen2.jpeg
URL: 
http://svn.apache.org/viewvc/fle

git commit: [flex-sdk] [refs/heads/develop] - FLEX-31948 Same changes for AdvancedDataGridBaseEx as for DataGrid.

2016-04-19 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop d5a809bbd -> ce0ec309d


FLEX-31948
Same changes for AdvancedDataGridBaseEx as for DataGrid.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/ce0ec309
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/ce0ec309
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/ce0ec309

Branch: refs/heads/develop
Commit: ce0ec309df7d81b617df3ad0175f5659f3079970
Parents: d5a809b
Author: Mihai Chira 
Authored: Tue Apr 19 15:28:23 2016 +0200
Committer: Mihai Chira 
Committed: Tue Apr 19 15:28:23 2016 +0200

--
 .../advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/ce0ec309/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
--
diff --git 
a/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as 
b/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
index f0e6efb..c2a53f3 100644
--- 
a/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
+++ 
b/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
@@ -2798,7 +2798,8 @@ public class AdvancedDataGridBaseEx extends 
AdvancedDataGridBase implements IIME
  */
 override public function itemToLabel(data:Object):String
 {
-return displayableColumns[sortIndex == -1 ? 0 : 
sortIndex].itemToLabel(data);
+var column:AdvancedDataGridColumn = displayableColumns[sortIndex == -1 
? 0 : sortIndex];
+return column ? column.itemToLabel(data) : "";
 }
 
 
//--



git commit: [flex-tlf] [refs/heads/develop] - FLEX-35078 Changes while reading the code: minor asdoc edits, code formatting changes, and Array instantiation simplification.

2016-04-19 Thread mihaic
Repository: flex-tlf
Updated Branches:
  refs/heads/develop 913056000 -> 3ce6a7b71


FLEX-35078
Changes while reading the code: minor asdoc edits, code formatting changes, and 
Array instantiation simplification.


Project: http://git-wip-us.apache.org/repos/asf/flex-tlf/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-tlf/commit/3ce6a7b7
Tree: http://git-wip-us.apache.org/repos/asf/flex-tlf/tree/3ce6a7b7
Diff: http://git-wip-us.apache.org/repos/asf/flex-tlf/diff/3ce6a7b7

Branch: refs/heads/develop
Commit: 3ce6a7b717f615424c23491433c8e00dcc20e688
Parents: 9130560
Author: Mihai Chira 
Authored: Wed Apr 13 12:42:34 2016 +0200
Committer: Mihai Chira 
Committed: Wed Apr 13 12:42:34 2016 +0200

--
 .../flashx/textLayout/compose/TextFlowLine.as   | 24 
 .../flashx/textLayout/edit/SelectionManager.as  | 22 +-
 2 files changed, 21 insertions(+), 25 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/3ce6a7b7/textLayout/src/flashx/textLayout/compose/TextFlowLine.as
--
diff --git a/textLayout/src/flashx/textLayout/compose/TextFlowLine.as 
b/textLayout/src/flashx/textLayout/compose/TextFlowLine.as
index bd6e015..c3c73f0 100644
--- a/textLayout/src/flashx/textLayout/compose/TextFlowLine.as
+++ b/textLayout/src/flashx/textLayout/compose/TextFlowLine.as
@@ -1455,11 +1455,11 @@ package flashx.textLayout.compose
var curIdx:int = begIdx;
//the current FlowLeafElement as determined by curIdx
var curElem:FlowLeafElement = null;
-   //the hightest glyph.  Needed to normalize the 
rectangles we'll be building
+   //the highest glyph. Needed to normalize the rectangles 
we'll be building
var largestRise:Number = 0;

//blockRectArray holds each leaf's blocks which could 
be 1 or more
-   var blockRectArray:Array = new Array();
+   var blockRectArray:Array = [];
//floatRectArray holds the selection rects for any 
floats in the range.
var floatRectArray:Array = null;
//tcyDrawRects:Array
@@ -1478,10 +1478,9 @@ package flashx.textLayout.compose
else if(curElem is InlineGraphicElement && 
(curElem as InlineGraphicElement).computedFloat != Float.NONE)
{
if(floatRectArray == null)
-   floatRectArray = new Array();
+   floatRectArray = [];

-   //  var blockRect:Rectangle = (curElem as 
InlineGraphicElement).graphic.getBounds(textLine);
-   var ilg:InlineGraphicElement = (curElem 
as InlineGraphicElement);
+   var ilg:InlineGraphicElement = curElem 
as InlineGraphicElement;
var floatInfo:FloatCompositionData = 
controller.getFloatAtPosition(paraAbsStart + curIdx);
if (floatInfo)
{
@@ -1491,7 +1490,7 @@ package flashx.textLayout.compose
++curIdx;
continue;
}
-   //the number of potential glyphs to hilite.  
Could larger than needs be if we are only selecting part of it.
+   //the number of potential glyphs to highlight. 
Could be larger than needed if we are only selecting part of it.
var numCharsSelecting:int = curElem.textLength 
+ curElem.getElementRelativeStart(_para) - curIdx;
// special handling for TableLeafElements (do 
nothing)
if(curElem is TableLeafElement)
@@ -1505,7 +1504,7 @@ package flashx.textLayout.compose
++curIdx;
continue;
}
-   //the index of the last glyph to hilite.  If a 
partial selection, use endIdx
+   //the index of the last glyph to highlight. If 
a partial selection, use endIdx
var endPos:int = (numCharsSelecting + curIdx) > 
endIdx ? endIdx : (numCharsSelecting + curIdx);

//if this is not a TCY in vertical, the blocks 
should all be running in the 

git commit: [flex-sdk] [refs/heads/develop] - FLEX-31948 Removing the fatal by checking whether the column exists. Plus some minor code changes while reading code: simplifying if clauses, removing sup

2016-04-18 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop c7e77bbed -> d5a809bbd


FLEX-31948
Removing the fatal by checking whether the column exists.
Plus some minor code changes while reading code: simplifying if clauses, 
removing superfluous brackets, adding semicolons.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/d5a809bb
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/d5a809bb
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/d5a809bb

Branch: refs/heads/develop
Commit: d5a809bbd07edd421277a759fba66d8cba97a05d
Parents: c7e77bb
Author: Mihai Chira 
Authored: Mon Apr 18 12:46:53 2016 +0200
Committer: Mihai Chira 
Committed: Mon Apr 18 12:46:53 2016 +0200

--
 .../framework/src/mx/resources/ResourceManagerImpl.as| 11 +--
 frameworks/projects/mx/src/mx/controls/ComboBox.as   |  4 +---
 frameworks/projects/mx/src/mx/controls/DataGrid.as   |  3 ++-
 .../projects/spark/src/spark/components/DropDownList.as  | 10 +++---
 frameworks/projects/spark/src/spark/components/List.as   |  4 ++--
 frameworks/projects/spark/src/spark/utils/LabelUtil.as   |  5 ++---
 6 files changed, 15 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/d5a809bb/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as
--
diff --git 
a/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as 
b/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as
index 29093b9..92915a0 100644
--- a/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as
+++ b/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as
@@ -530,7 +530,7 @@ public class ResourceManagerImpl extends EventDispatcher 
implements IResourceMan
 
 if (updateFlag)
 update();
-}
+};
 moduleInfo.addEventListener(ModuleEvent.READY, readyHandler,
 false, 0, true);
 
@@ -554,7 +554,7 @@ public class ResourceManagerImpl extends EventDispatcher 
implements IResourceMan
 {
 throw new Error(message);
 }
-}
+};
 moduleInfo.addEventListener(ModuleEvent.ERROR, errorHandler,
 false, 0, true);
 
@@ -576,7 +576,7 @@ public class ResourceManagerImpl extends EventDispatcher 
implements IResourceMan
 
 // Start loading the module.
 moduleInfo.load(applicationDomain, securityDomain);
-}
+};
 timer.addEventListener(TimerEvent.TIMER, timerHandler,
false, 0, true);
 timer.start();
@@ -927,8 +927,7 @@ public class ResourceManagerImpl extends EventDispatcher 
implements IResourceMan
   parameters:Array = null,
   locale:String = null):String
 {
-var resourceBundle:IResourceBundle =
-findBundle(bundleName, resourceName, locale);
+var resourceBundle:IResourceBundle = findBundle(bundleName, 
resourceName, locale);
 if (!resourceBundle)
 return null;
 
@@ -1255,7 +1254,7 @@ class ResourceModuleInfo
 /**
  *  @private
  */
-public var moduleInfo:IModuleInfo
+public var moduleInfo:IModuleInfo;
 
 //--
 //  readyHandler

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/d5a809bb/frameworks/projects/mx/src/mx/controls/ComboBox.as
--
diff --git a/frameworks/projects/mx/src/mx/controls/ComboBox.as 
b/frameworks/projects/mx/src/mx/controls/ComboBox.as
index 8dec126..582e062 100644
--- a/frameworks/projects/mx/src/mx/controls/ComboBox.as
+++ b/frameworks/projects/mx/src/mx/controls/ComboBox.as
@@ -1388,9 +1388,7 @@ public class ComboBox extends ComboBase
  */
 public function get selectedLabel():String
 {
-var item:Object = selectedItem;
-
-return itemToLabel(item);
+return itemToLabel(selectedItem);
 }
 
 
//--

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/d5a809bb/frameworks/projects/mx/src/mx/controls/DataGrid.as
--
diff --git a/frameworks/projects/mx/src/mx/controls/DataGrid.as 
b/frameworks/projects/mx/src/mx/controls/DataGrid.as
index 92dca9b..a035e70 100644
--- a/frameworks/projects/mx/src/mx/controls/DataGrid.as
+++ b/frameworks/projects/mx/src/mx/controls/DataGrid.as
@@ -5103,7 +5103,8 @@ public class DataGrid extends DataGridBase 

[2/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35043 PROBLEM: The assumptions in SF_ORIG_list_events_tester.List_events_collectionKind_move made obvious another problem caused by FLEX-34885:

2016-03-31 Thread mihaic
FLEX-35043
PROBLEM: The assumptions in 
SF_ORIG_list_events_tester.List_events_collectionKind_move made obvious another 
problem caused by FLEX-34885: calling itemUpdated(item) did not reposition the 
item according to the sorting rules (unless the Sort had a 
customCompareFunction).

CAUSE: FLEX-34885 assumed that the initial logic of checking for 
!updateEntry.property was to detect when entire objects were replaced with 
others in the collection. However, it was also detecting when the developer 
signalled that something (undefined) about an object had changed, and they 
wanted the sorting / filtering to be reapplied.

SOLUTION: now we call moveItemInView() also when updateEntry.property is null 
and there are no oldValue or newValue specified in the CollectionEvent.

NOTES:
-also updated ListCollectionView_PropertyChangeEvent_Tests and added a new 
function for objects which are not bindable. As expected, there is a failure 
without this change to ListCollectionView, and with the change all unit tests 
pass.
-made explicit a conversion from Object into Boolean in a call to 
moveItemInView().
-reformated event instantiations to be on one line.
-made some minor changes to SF_ORIG_ListBasic.mxml, which is used by 
SF_ORIG_list_events_tester.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/2c14851e
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/2c14851e
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/2c14851e

Branch: refs/heads/develop
Commit: 2c14851e9549ec390e45c0609257e10bda7cc0dd
Parents: f7077c6
Author: Mihai Chira 
Authored: Thu Mar 31 15:17:18 2016 +0200
Committer: Mihai Chira 
Committed: Thu Mar 31 15:17:18 2016 +0200

--
 .../framework/src/mx/collections/ArrayList.as   |   3 +-
 .../src/mx/collections/ListCollectionView.as|  20 ++--
 ...tCollectionView_PropertyChangeEvent_Tests.as | 113 ---
 .../Sort/SWFs/SF_ORIG_ListBasic.mxml|   5 +-
 4 files changed, 109 insertions(+), 32 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/2c14851e/frameworks/projects/framework/src/mx/collections/ArrayList.as
--
diff --git a/frameworks/projects/framework/src/mx/collections/ArrayList.as 
b/frameworks/projects/framework/src/mx/collections/ArrayList.as
index dbfbb42..2a89718 100644
--- a/frameworks/projects/framework/src/mx/collections/ArrayList.as
+++ b/frameworks/projects/framework/src/mx/collections/ArrayList.as
@@ -620,8 +620,7 @@ public class ArrayList extends EventDispatcher
  oldValue:Object = null, 
  newValue:Object = null):void
 {
-var event:PropertyChangeEvent =
-new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE);
+var event:PropertyChangeEvent = new 
PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE);
 
 event.kind = PropertyChangeEventKind.UPDATE;
 event.source = item;

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/2c14851e/frameworks/projects/framework/src/mx/collections/ListCollectionView.as
--
diff --git 
a/frameworks/projects/framework/src/mx/collections/ListCollectionView.as 
b/frameworks/projects/framework/src/mx/collections/ListCollectionView.as
index 15fc15d..f03556f 100644
--- a/frameworks/projects/framework/src/mx/collections/ListCollectionView.as
+++ b/frameworks/projects/framework/src/mx/collections/ListCollectionView.as
@@ -1489,7 +1489,9 @@ public class ListCollectionView extends Proxy implements 
ICollectionView, IList,
 {
 var oldOrNewValueSpecified:Boolean = updateInfo.oldValue 
!= null || updateInfo.newValue != null;
 var objectReplacedInCollection:Boolean = 
updateInfo.property == null && oldOrNewValueSpecified;
+var somethingUnknownAboutTheObjectChanged:Boolean = 
updateInfo.property == null && !oldOrNewValueSpecified;
 updateEntry = {item: item, move: defaultMove, events: 
[updateInfo],
+undefinedChange:somethingUnknownAboutTheObjectChanged,
 objectReplacedWithAnother: objectReplacedInCollection, 
oldItem: updateInfo.oldValue};
 updatedItems.push(updateEntry);
 }
@@ -1500,6 +1502,7 @@ public class ListCollectionView extends Proxy implements 
ICollectionView, IList,
 updateEntry.move = updateEntry.move
 || filterFunction != null
 || updateEntry.objectReplacedWithAnother
+|| updateEntry.undefinedChange
 || (sort && 

[3/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35043 FLEX-34879 Avoiding the use of the deprecated setter. All tests still pass.

2016-03-31 Thread mihaic
FLEX-35043 FLEX-34879
Avoiding the use of the deprecated setter. All tests still pass.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/c7e77bbe
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/c7e77bbe
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/c7e77bbe

Branch: refs/heads/develop
Commit: c7e77bbedd8778eb6d54aa4bcab4bf9006c60ce2
Parents: 2c14851
Author: Mihai Chira 
Authored: Thu Mar 31 15:21:31 2016 +0200
Committer: Mihai Chira 
Committed: Thu Mar 31 15:21:31 2016 +0200

--
 .../collections/ListCollectionView_PropertyChangeEvent_Tests.as   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/c7e77bbe/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
--
diff --git 
a/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
 
b/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
index a51827a..012b9de 100644
--- 
a/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
+++ 
b/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
@@ -389,8 +389,7 @@ package mx.collections {
 _sut.removeAll();
 _sut.addAll(new ArrayList([testWorkout, {duration:20}, 
{duration:5}]));
 
-var sortField:SortField = new SortField("duration");
-sortField.sortCompareType = SortFieldCompareTypes.NUMERIC;
+var sortField:SortField = new SortField("duration", false, false, 
null, SortFieldCompareTypes.NUMERIC);
 var sort:InspectableSort = new InspectableSort([sortField]);
 _sut.sort = sort;
 _sut.refresh();



[1/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-26808 Added unit tests to make sure that the selection (made either programmatically or through ctrl-clicking on the grid) is preserved when th

2016-03-31 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 7b7ba9727 -> c7e77bbed


FLEX-26808
Added unit tests to make sure that the selection (made either programmatically 
or through ctrl-clicking on the grid) is preserved when the user starts 
dragging the items. The tests pass locally.

-Also added VectorUtil.toArrayObject() to convert a Vector. to an Array 
(uses the same private function as VectorUtil.toArrayInt(), so I haven't added 
unit tests).
-Added a missing semicolon in Grid.as


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/f7077c66
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/f7077c66
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/f7077c66

Branch: refs/heads/develop
Commit: f7077c669f807704706d2152cef2bcb360cb13a5
Parents: 7b7ba97
Author: Mihai Chira 
Authored: Thu Mar 31 13:10:38 2016 +0200
Committer: Mihai Chira 
Committed: Thu Mar 31 13:10:38 2016 +0200

--
 .../framework/src/mx/utils/VectorUtil.as|  13 +-
 .../projects/spark/src/spark/components/Grid.as |   2 +-
 .../components/DataGrid_FLEX_26808_Tests.as | 125 ++-
 3 files changed, 136 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f7077c66/frameworks/projects/framework/src/mx/utils/VectorUtil.as
--
diff --git a/frameworks/projects/framework/src/mx/utils/VectorUtil.as 
b/frameworks/projects/framework/src/mx/utils/VectorUtil.as
index 3e73895..c635746 100644
--- a/frameworks/projects/framework/src/mx/utils/VectorUtil.as
+++ b/frameworks/projects/framework/src/mx/utils/VectorUtil.as
@@ -29,8 +29,19 @@ package mx.utils {
 
 public static function toArrayInt(v:Vector.):Array
 {
+return v ? VectorToArray(v) : [];
+}
+
+public static function toArrayObject(v:Vector.):Array
+{
+return v ? VectorToArray(v) : [];
+}
+
+private static function VectorToArray(v:Object):Array
+{
+//this function assumes that v is a Vector!
 var result:Array = [];
-for (var i:int = 0; i < (v ? v.length : 0); i++)
+for (var i:int = 0; i < v.length; i++)
 {
 result.push(v[i]);
 }

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f7077c66/frameworks/projects/spark/src/spark/components/Grid.as
--
diff --git a/frameworks/projects/spark/src/spark/components/Grid.as 
b/frameworks/projects/spark/src/spark/components/Grid.as
index a489f31..23a6d5f 100644
--- a/frameworks/projects/spark/src/spark/components/Grid.as
+++ b/frameworks/projects/spark/src/spark/components/Grid.as
@@ -2377,7 +2377,7 @@ public class Grid extends Group implements 
IDataGridElement, IDataProviderEnhanc
 var f:Function = function():void
 {
 doSetSelectedIndices(valueCopy);
-}
+};
 deferredOperations.push(f);  // function f() to be called by 
commitProperties()
 invalidateProperties();
 }

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f7077c66/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_26808_Tests.as
--
diff --git 
a/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_26808_Tests.as 
b/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_26808_Tests.as
index f5912afd..6b38388 100644
--- 
a/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_26808_Tests.as
+++ 
b/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_26808_Tests.as
@@ -26,8 +26,11 @@ package spark.components {
 import mx.collections.ArrayList;
 import mx.collections.IList;
 import mx.collections.ListCollectionView;
+import mx.utils.ArrayUtil;
+import mx.utils.VectorUtil;
 
 import org.flexunit.asserts.assertEquals;
+import org.flexunit.asserts.assertFalse;
 import org.flexunit.asserts.assertNull;
 import org.flexunit.asserts.assertTrue;
 import org.flexunit.async.Async;
@@ -44,6 +47,7 @@ package spark.components {
 private static var noEnterFramesRemaining:int = NaN;
 private var _sut:DataGridInspectable;
 private var _firstObject:FLEX_26808_VO;
+private var _secondObject:FLEX_26808_VO;
 
 [Before]
 public function setUp():void
@@ -58,6 +62,7 @@ package spark.components {
 
 const tenObjects:IList = generateVOs(10);
 _firstObject = tenObjects.getItemAt(0) as FLEX_26808_VO;
+_secondObject = tenObjects.getItemAt(1) as FLEX_26808_VO;
 

[2/4] git commit: [flex-sdk] [refs/heads/develop] - FLEX-26808 Adding unit test. For now we're just testing that Ctrl+Click deselects the (selected) first item (test passes). Dragging behaviour will f

2016-03-23 Thread mihaic
FLEX-26808
Adding unit test. For now we're just testing that Ctrl+Click deselects the 
(selected) first item (test passes). Dragging behaviour will follow.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/ae65e686
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/ae65e686
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/ae65e686

Branch: refs/heads/develop
Commit: ae65e686c6a5c04cace2326d786a5eb83fd4f7f8
Parents: 74225ba
Author: Mihai Chira 
Authored: Wed Mar 23 12:21:26 2016 +0100
Committer: Mihai Chira 
Committed: Wed Mar 23 12:21:26 2016 +0100

--
 .../components/DataGrid_FLEX_26808_Tests.as | 203 +++
 1 file changed, 203 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/ae65e686/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_26808_Tests.as
--
diff --git 
a/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_26808_Tests.as 
b/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_26808_Tests.as
new file mode 100644
index 000..f5912afd
--- /dev/null
+++ 
b/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_26808_Tests.as
@@ -0,0 +1,203 @@
+
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//  http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+
+
+package spark.components {
+import flash.events.Event;
+import flash.events.EventDispatcher;
+import flash.events.MouseEvent;
+
+import mx.collections.ArrayCollection;
+import mx.collections.ArrayList;
+import mx.collections.IList;
+import mx.collections.ListCollectionView;
+
+import org.flexunit.asserts.assertEquals;
+import org.flexunit.asserts.assertNull;
+import org.flexunit.asserts.assertTrue;
+import org.flexunit.async.Async;
+import org.fluint.uiImpersonation.UIImpersonator;
+
+import spark.components.gridClasses.GridColumn;
+import spark.components.gridClasses.GridSelectionMode;
+import spark.events.GridEvent;
+
+public class DataGrid_FLEX_26808_Tests
+{
+private static const NO_ENTER_FRAMES_TO_ALLOW:int = 2;
+private static const _finishNotifier:EventDispatcher = new 
EventDispatcher();
+private static var noEnterFramesRemaining:int = NaN;
+private var _sut:DataGridInspectable;
+private var _firstObject:FLEX_26808_VO;
+
+[Before]
+public function setUp():void
+{
+_sut = new DataGridInspectable();
+
+_sut.dragEnabled = true;
+_sut.selectionMode = GridSelectionMode.MULTIPLE_ROWS;
+_sut.columns = new ArrayCollection([new GridColumn("name")]);
+_sut.width = 200;
+_sut.height = 200;
+
+const tenObjects:IList = generateVOs(10);
+_firstObject = tenObjects.getItemAt(0) as FLEX_26808_VO;
+const dataProvider:ListCollectionView = new 
ListCollectionView(tenObjects);
+_sut.dataProvider = dataProvider;
+}
+
+[After]
+public function tearDown():void
+{
+_sut = null;
+noEnterFramesRemaining = NaN;
+}
+
+[Test(async, timeout=1000)]
+public function test_ctrl_click_removes_selected_item():void
+{
+//when
+UIImpersonator.addElement(_sut);
+
+//then
+assertNull(_sut.selectedItem);
+
+noEnterFramesRemaining = NO_ENTER_FRAMES_TO_ALLOW;
+UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, 
onEnterFrame);
+Async.handleEvent(this, _finishNotifier, Event.COMPLETE, 
testSelectionAndDeselection, 800);
+}
+
+private function testSelectionAndDeselection(event:Event, 
passThroughData:Object):void
+{
+function 

[3/4] git commit: [flex-sdk] [refs/heads/develop] - FLEX-34837 As noticed in FLEX-26808, if the dimensions are not specified the grid layout will not render its GridViews. Test still passes.

2016-03-23 Thread mihaic
FLEX-34837
As noticed in FLEX-26808, if the dimensions are not specified the grid layout 
will not render its GridViews. Test still passes.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/cd338fdf
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/cd338fdf
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/cd338fdf

Branch: refs/heads/develop
Commit: cd338fdf4a6232b32f8eb02d0174a461c2919ef8
Parents: ae65e68
Author: Mihai Chira 
Authored: Wed Mar 23 12:23:42 2016 +0100
Committer: Mihai Chira 
Committed: Wed Mar 23 12:23:42 2016 +0100

--
 .../spark/tests/spark/components/DataGrid_FLEX_34837_Tests.as  | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/cd338fdf/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_34837_Tests.as
--
diff --git 
a/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_34837_Tests.as 
b/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_34837_Tests.as
index ab59317..6c3f7ae 100644
--- 
a/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_34837_Tests.as
+++ 
b/frameworks/projects/spark/tests/spark/components/DataGrid_FLEX_34837_Tests.as
@@ -37,6 +37,8 @@ package spark.components {
 public function setUp():void
 {
 _sut = new DataGrid();
+_sut.width = 200;
+_sut.height = 200;
 }
 
 [After]



[4/4] git commit: [flex-sdk] [refs/heads/develop] - FLEX-26808 Adding VectorUtil.toArrayInt() to convert a Vector to an Array (and a few unit tests for it). This is useful for the unit testing we're d

2016-03-23 Thread mihaic
FLEX-26808
Adding VectorUtil.toArrayInt() to convert a Vector to an Array (and a few unit 
tests for it). This is useful for the unit testing we're doing for this ticket.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/f543314c
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/f543314c
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/f543314c

Branch: refs/heads/develop
Commit: f543314c4f2c5b962492cceca55a53d7718741fe
Parents: cd338fd
Author: Mihai Chira 
Authored: Wed Mar 23 12:54:12 2016 +0100
Committer: Mihai Chira 
Committed: Wed Mar 23 12:54:12 2016 +0100

--
 .../framework/src/mx/utils/VectorUtil.as| 11 
 .../framework/tests/mx/utils/VectorUtilTests.as | 55 
 2 files changed, 66 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f543314c/frameworks/projects/framework/src/mx/utils/VectorUtil.as
--
diff --git a/frameworks/projects/framework/src/mx/utils/VectorUtil.as 
b/frameworks/projects/framework/src/mx/utils/VectorUtil.as
index f909a7b..3e73895 100644
--- a/frameworks/projects/framework/src/mx/utils/VectorUtil.as
+++ b/frameworks/projects/framework/src/mx/utils/VectorUtil.as
@@ -26,5 +26,16 @@ package mx.utils {
 {
 return v && v.length ? v[0] : -1;
 }
+
+public static function toArrayInt(v:Vector.):Array
+{
+var result:Array = [];
+for (var i:int = 0; i < (v ? v.length : 0); i++)
+{
+result.push(v[i]);
+}
+
+return result;
+}
 }
 }

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f543314c/frameworks/projects/framework/tests/mx/utils/VectorUtilTests.as
--
diff --git a/frameworks/projects/framework/tests/mx/utils/VectorUtilTests.as 
b/frameworks/projects/framework/tests/mx/utils/VectorUtilTests.as
index 2ef9ccd..674ec97 100644
--- a/frameworks/projects/framework/tests/mx/utils/VectorUtilTests.as
+++ b/frameworks/projects/framework/tests/mx/utils/VectorUtilTests.as
@@ -22,6 +22,12 @@ package mx.utils {
 import org.flexunit.asserts.assertTrue;
 
 public class VectorUtilTests {
+
+
//--
+//
+//  getFirstItem()
+//
+
//--
 [Test]
 public function test_empty_vector():void
 {
@@ -93,5 +99,54 @@ package mx.utils {
 assertStrictlyEquals(2, vector[1]);
 assertEquals(3, VectorUtil.getFirstItem(vector));
 }
+
+
+
//--
+//
+//  toArrayInt()
+//
+
//--
+[Test]
+public function test_toArrayInt_with_different_items():void
+{
+//given
+var vector:Vector. = new [1, 2, 3];
+
+//then
+assertTrue(ArrayUtil.arraysMatch([1, 2, 3], 
VectorUtil.toArrayInt(vector)));
+}
+
+[Test]
+public function test_toArrayInt_with_duplicate_items():void
+{
+//given
+var vector:Vector. = new [2, 2, 3, 1];
+
+//then
+assertTrue(ArrayUtil.arraysMatch([2, 2, 3, 1], 
VectorUtil.toArrayInt(vector)));
+}
+
+[Test]
+public function test_toArrayInt_with_0_items():void
+{
+//given
+var vector:Vector. = new [];
+
+//when
+var result:Array = VectorUtil.toArrayInt(vector);
+
+//then
+assertEquals(0, result.length);
+}
+
+[Test]
+public function test_toArrayInt_with_null():void
+{
+//when
+var result:Array = VectorUtil.toArrayInt(null);
+
+//then
+assertEquals(0, result.length);
+}
 }
 }



[1/4] git commit: [flex-sdk] [refs/heads/develop] - FLEX-26808 Minor refactoring while reading the code: asdocs improvements, and adding missing semicolon.

2016-03-23 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 2324f43f0 -> f543314c4


FLEX-26808
Minor refactoring while reading the code: asdocs improvements, and adding 
missing semicolon.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/74225ba2
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/74225ba2
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/74225ba2

Branch: refs/heads/develop
Commit: 74225ba2b3be288c944a898406a94b27f02e444d
Parents: 2324f43
Author: Mihai Chira 
Authored: Wed Mar 23 12:17:59 2016 +0100
Committer: Mihai Chira 
Committed: Wed Mar 23 12:17:59 2016 +0100

--
 frameworks/projects/spark/src/spark/components/Grid.as | 2 +-
 .../src/spark/components/supportClasses/SkinnableComponent.as  | 2 +-
 frameworks/projects/spark/src/spark/utils/MouseEventUtil.as| 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/74225ba2/frameworks/projects/spark/src/spark/components/Grid.as
--
diff --git a/frameworks/projects/spark/src/spark/components/Grid.as 
b/frameworks/projects/spark/src/spark/components/Grid.as
index 78b2429..a489f31 100644
--- a/frameworks/projects/spark/src/spark/components/Grid.as
+++ b/frameworks/projects/spark/src/spark/components/Grid.as
@@ -4329,7 +4329,7 @@ public class Grid extends Group implements 
IDataGridElement, IDataProviderEnhanc
  *  Create and/or configure this Grid's GridViews.  We're assuming that the
  *  Grid's viewFactory, columns and dataProvider are specified.
 * 
-*  If GridVeiws are added or removed, a "gridViewsChanged" event is 
dispatched.
+*  If GridViews are added or removed, a "gridViewsChanged" event is 
dispatched.
  */
 private function configureGridViews():void
 {

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/74225ba2/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
--
diff --git 
a/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
 
b/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
index 2a8c730..2fceebf 100644
--- 
a/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
+++ 
b/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
@@ -216,7 +216,7 @@ public class SkinnableComponent extends UIComponent
 
 /**
  *  The instance of the skin class for this component instance. 
- *  This is a read-only property that gets set automomatically when Flex 
+ *  This is a read-only property that gets set automatically when Flex
  *  calls the attachSkin() method.
  *  
  *  @langversion 3.0

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/74225ba2/frameworks/projects/spark/src/spark/utils/MouseEventUtil.as
--
diff --git a/frameworks/projects/spark/src/spark/utils/MouseEventUtil.as 
b/frameworks/projects/spark/src/spark/utils/MouseEventUtil.as
index 97fc04f..ca6f08c 100644
--- a/frameworks/projects/spark/src/spark/utils/MouseEventUtil.as
+++ b/frameworks/projects/spark/src/spark/utils/MouseEventUtil.as
@@ -118,7 +118,7 @@ package spark.utils
 target.systemManager.deployMouseShields(false);
 break;
 }
-}
+};
 target.addEventListener(MouseEvent.MOUSE_DOWN, f);
 target.addEventListener("removeHandler", f);
 }



[4/7] git commit: [flex-sdk] [refs/heads/develop] - FLEX-26808 Improved asdocs and comment.

2016-03-22 Thread mihaic
FLEX-26808
Improved asdocs and comment.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/e0fbd86e
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/e0fbd86e
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/e0fbd86e

Branch: refs/heads/develop
Commit: e0fbd86e97e4b38a20008c8abbcdfce639ba0445
Parents: 6b86881
Author: Mihai Chira 
Authored: Tue Mar 22 13:53:19 2016 +0100
Committer: Mihai Chira 
Committed: Tue Mar 22 13:53:19 2016 +0100

--
 frameworks/projects/spark/src/spark/components/List.as | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e0fbd86e/frameworks/projects/spark/src/spark/components/List.as
--
diff --git a/frameworks/projects/spark/src/spark/components/List.as 
b/frameworks/projects/spark/src/spark/components/List.as
index 8100e78..e95f850 100644
--- a/frameworks/projects/spark/src/spark/components/List.as
+++ b/frameworks/projects/spark/src/spark/components/List.as
@@ -937,8 +937,9 @@ public class List extends ListBase implements 
IFocusManagerComponent
 /**
  *  @private
  *  Used internally to specify whether the selectedIndices changed 
programmatically or due to 
- *  user interaction. 
- * 
+ *  user interaction.
+ *
+ *  @param value the new indices.
  *  @param dispatchChangeEvent if true, the component will dispatch a 
"change" event if the
  *  value has changed. Otherwise, it will dispatch a "valueCommit" event. 
  * 
@@ -2011,7 +2012,7 @@ public class List extends ListBase implements 
IFocusManagerComponent
 (mouseDownObject is DisplayObjectContainer && 
 
DisplayObjectContainer(mouseDownObject).contains(event.target as 
DisplayObject)));
 
-// check to make sure they clciked on an item and selection 
should change
+// check to make sure they clicked on an item and selection 
should change
 if (selectionChange)
 {
 // now handle the cases where the item is being selected 
or de-selected



[2/7] git commit: [flex-sdk] [refs/heads/develop] - FLEX-26808 Simplified getFirstItemValue using the ternary operator.

2016-03-22 Thread mihaic
FLEX-26808
Simplified getFirstItemValue using the ternary operator.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/c316cba2
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/c316cba2
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/c316cba2

Branch: refs/heads/develop
Commit: c316cba2a63b671080a6b3be0f69aa8813482fe6
Parents: 5d677c2
Author: Mihai Chira 
Authored: Tue Mar 22 12:30:55 2016 +0100
Committer: Mihai Chira 
Committed: Tue Mar 22 12:30:55 2016 +0100

--
 frameworks/projects/framework/src/mx/utils/VectorUtil.as | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/c316cba2/frameworks/projects/framework/src/mx/utils/VectorUtil.as
--
diff --git a/frameworks/projects/framework/src/mx/utils/VectorUtil.as 
b/frameworks/projects/framework/src/mx/utils/VectorUtil.as
index 79a0056..51a3da3 100644
--- a/frameworks/projects/framework/src/mx/utils/VectorUtil.as
+++ b/frameworks/projects/framework/src/mx/utils/VectorUtil.as
@@ -24,10 +24,7 @@ package mx.utils {
  */
 public static function getFirstItemValue(v:Vector.):int
 {
-if (v && v.length > 0)
-return v[0];
-else
-return -1;
+return v && v.length ? v[0] : -1;
 }
 }
 }



[5/7] git commit: [flex-sdk] [refs/heads/develop] - FLEX-26808 CAUSE: DataGrid.grid_mouseDownHandler() committed the selection before checking whether the user was likely to begin a drag operation.

2016-03-22 Thread mihaic
FLEX-26808
CAUSE: DataGrid.grid_mouseDownHandler() committed the selection before checking 
whether the user was likely to begin a drag operation.

SOLUTION: Following the pattern in the spark List component, we're committing 
the selection on MOUSE_DOWN only if the user has clicked on an item which isn't 
selected yet, or the grid is not dragEnabled, or we're not in row selection 
mode (i.e. either GridSelectionMode.SINGLE_ROW or  
GridSelectionMode.MULTIPLE_ROWS). But when it looks like the user might start a 
dragOperation, we're deferring the selection adjustment to the MOUSE_UP event 
(caught either in DataGrid.grid_mouseUpHandler() or in 
DataGrid.sandbox_mouseUpHandler() ).

NOTES:
-also removed some duplication between DataGrid.grid_mouseDownHandler() and 
DataGrid.removeMouseHandlersForDragStart().
-also corrected some asdocs @see references.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/23f0bd47
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/23f0bd47
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/23f0bd47

Branch: refs/heads/develop
Commit: 23f0bd47c7b9e50d8da8f5a9f78b26ed8529c141
Parents: e0fbd86
Author: Mihai Chira 
Authored: Tue Mar 22 14:08:11 2016 +0100
Committer: Mihai Chira 
Committed: Tue Mar 22 14:08:11 2016 +0100

--
 .../spark/src/spark/components/DataGrid.as  | 108 +++
 1 file changed, 40 insertions(+), 68 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/23f0bd47/frameworks/projects/spark/src/spark/components/DataGrid.as
--
diff --git a/frameworks/projects/spark/src/spark/components/DataGrid.as 
b/frameworks/projects/spark/src/spark/components/DataGrid.as
index fb0676f..76cf418 100644
--- a/frameworks/projects/spark/src/spark/components/DataGrid.as
+++ b/frameworks/projects/spark/src/spark/components/DataGrid.as
@@ -5600,6 +5600,8 @@ public class DataGrid extends SkinnableContainerBase
 grid.hoverColumnIndex = event.columnIndex;
 updateHoverOnRollOver = true;
 }
+
+removeMouseHandlersForDragStart(event);
 }
 
 /**
@@ -5620,40 +5622,15 @@ public class DataGrid extends SkinnableContainerBase
 if (rowIndex == -1 || isCellSelection && columnIndex == -1)
 return;
 
-
-if (event.ctrlKey)
+if (dragEnabled && isRowSelectionMode() && 
selectionContainsIndex(rowIndex))
 {
-// ctrl-click toggles the selection and updates caret and anchor.
-if (!toggleSelection(rowIndex, columnIndex))
-return;
-
-grid.anchorRowIndex = rowIndex;
-grid.anchorColumnIndex = columnIndex;
+pendingSelectionOnMouseUp = true;
 }
 else
 {
-if (event.shiftKey)
-{
-// shift-click extends the selection and updates the caret.
-if  (grid.selectionMode == GridSelectionMode.MULTIPLE_ROWS || 
grid.selectionMode == GridSelectionMode.MULTIPLE_CELLS)
-{
-if (!extendSelection(rowIndex, columnIndex))
-return;
-}
-}
-else
-{
-// click sets the selection and updates the caret and anchor 
positions.
-setSelectionAnchorCaret(rowIndex, columnIndex);
-}
+adjustSelection(event, rowIndex, columnIndex);
 }
 
-
-if (dragEnabled && isRowSelectionMode() && 
selectionContainsIndex(rowIndex))
-{
-pendingSelectionOnMouseUp = true;
-}
-
 // If selection is pending on mouse up then we have just moused down on
 // an item, part of an already commited selection.
 // However if we moused down on an item that's not currently selected,
@@ -5667,14 +5644,14 @@ public class DataGrid extends SkinnableContainerBase
 mouseDownRowIndex = rowIndex;
 mouseDownColumnIndex = columnIndex;
 
-var listenForDrag:Boolean = (dragEnabled && 
+var listenForDrag:Boolean = dragEnabled &&
 getStyle("interactionMode") == InteractionMode.MOUSE && 
selectedIndices && 
-this.selectedIndices.indexOf(rowIndex) != -1);
+this.selectedIndices.indexOf(rowIndex) != -1;
 // Handle any drag gestures that may have been started
 if (listenForDrag)
 {
 // Listen for GRID_MOUSE_DRAG.
-// The user may have cliked on the item renderer close
+// The user may have clicked on the item renderer close
 // to the edge of the list, and we still want to start a drag
 

[7/7] git commit: [flex-sdk] [refs/heads/develop] - FLEX-26808 Optimizing imports.

2016-03-22 Thread mihaic
FLEX-26808
Optimizing imports.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/5be0fedb
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/5be0fedb
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/5be0fedb

Branch: refs/heads/develop
Commit: 5be0fedb6a0688bbccaa796177f1a4d39c03edd0
Parents: a34e9c3
Author: Mihai Chira 
Authored: Tue Mar 22 14:49:43 2016 +0100
Committer: Mihai Chira 
Committed: Tue Mar 22 14:49:43 2016 +0100

--
 frameworks/projects/spark/src/spark/components/List.as | 4 
 1 file changed, 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/5be0fedb/frameworks/projects/spark/src/spark/components/List.as
--
diff --git a/frameworks/projects/spark/src/spark/components/List.as 
b/frameworks/projects/spark/src/spark/components/List.as
index e95f850..de4db73 100644
--- a/frameworks/projects/spark/src/spark/components/List.as
+++ b/frameworks/projects/spark/src/spark/components/List.as
@@ -25,12 +25,10 @@ import flash.display.DisplayObjectContainer;
 import flash.events.Event;
 import flash.events.KeyboardEvent;
 import flash.events.MouseEvent;
-import flash.events.TimerEvent;
 import flash.geom.Point;
 import flash.system.ApplicationDomain;
 import flash.text.TextField;
 import flash.ui.Keyboard;
-import flash.utils.Timer;
 
 import mx.collections.ArrayCollection;
 import mx.collections.IList;
@@ -44,8 +42,6 @@ import mx.core.InteractionMode;
 import mx.core.ScrollPolicy;
 import mx.core.UIComponentGlobals;
 import mx.core.mx_internal;
-import mx.events.CollectionEvent;
-import mx.events.CollectionEventKind;
 import mx.events.DragEvent;
 import mx.events.FlexEvent;
 import mx.events.SandboxMouseEvent;



git commit: [flex-sdk] [refs/heads/develop] - FLEX-26808 Added VectorUtil to manifest.

2016-03-22 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 5be0fedb6 -> 2324f43f0


FLEX-26808
Added VectorUtil to manifest.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/2324f43f
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/2324f43f
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/2324f43f

Branch: refs/heads/develop
Commit: 2324f43f0f140ee0f7b31a69f8e97e34f8cc9f60
Parents: 5be0fed
Author: Mihai Chira 
Authored: Tue Mar 22 15:01:34 2016 +0100
Committer: Mihai Chira 
Committed: Tue Mar 22 15:01:34 2016 +0100

--
 frameworks/projects/framework/manifest.xml | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/2324f43f/frameworks/projects/framework/manifest.xml
--
diff --git a/frameworks/projects/framework/manifest.xml 
b/frameworks/projects/framework/manifest.xml
index ce26f05..06d73e2 100644
--- a/frameworks/projects/framework/manifest.xml
+++ b/frameworks/projects/framework/manifest.xml
@@ -103,6 +103,7 @@
 
 
 
+
 
 
 



[1/7] git commit: [flex-sdk] [refs/heads/develop] - FLEX-26808 Moving Vector-related function List.getFirstItemValue() to new VectorUtil class (unit tested in VectorUtilTests.as)

2016-03-22 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop eec643c45 -> 5be0fedb6


FLEX-26808
Moving Vector-related function List.getFirstItemValue() to new VectorUtil class 
(unit tested in VectorUtilTests.as)


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/5d677c20
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/5d677c20
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/5d677c20

Branch: refs/heads/develop
Commit: 5d677c2079eedcece9beb25469ea370347f10081
Parents: eec643c
Author: Mihai Chira 
Authored: Tue Mar 22 12:28:26 2016 +0100
Committer: Mihai Chira 
Committed: Tue Mar 22 12:28:26 2016 +0100

--
 .../framework/src/mx/utils/VectorUtil.as| 33 +++
 .../framework/tests/mx/utils/VectorUtilTests.as | 97 
 .../projects/spark/src/spark/components/List.as | 23 +
 3 files changed, 135 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/5d677c20/frameworks/projects/framework/src/mx/utils/VectorUtil.as
--
diff --git a/frameworks/projects/framework/src/mx/utils/VectorUtil.as 
b/frameworks/projects/framework/src/mx/utils/VectorUtil.as
new file mode 100644
index 000..79a0056
--- /dev/null
+++ b/frameworks/projects/framework/src/mx/utils/VectorUtil.as
@@ -0,0 +1,33 @@
+
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//  http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+
+package mx.utils {
+public class VectorUtil {
+/**
+ *  Given a Vector, returns the value of the first item,
+ *  or -1 if there are no items in the Vector;
+ */
+public static function getFirstItemValue(v:Vector.):int
+{
+if (v && v.length > 0)
+return v[0];
+else
+return -1;
+}
+}
+}

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/5d677c20/frameworks/projects/framework/tests/mx/utils/VectorUtilTests.as
--
diff --git a/frameworks/projects/framework/tests/mx/utils/VectorUtilTests.as 
b/frameworks/projects/framework/tests/mx/utils/VectorUtilTests.as
new file mode 100644
index 000..e42cea5
--- /dev/null
+++ b/frameworks/projects/framework/tests/mx/utils/VectorUtilTests.as
@@ -0,0 +1,97 @@
+
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//  http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+
+package mx.utils {
+import org.flexunit.asserts.assertEquals;
+import org.flexunit.asserts.assertStrictlyEquals;
+import org.flexunit.asserts.assertTrue;
+
+public class VectorUtilTests {
+[Test]
+public function test_empty_vector():void
+{
+assertEquals(-1, VectorUtil.getFirstItemValue(new Vector.()));
+}
+
+[Test]
+public function test_null_parameter():void
+{
+assertEquals(-1, VectorUtil.getFirstItemValue(null));
+  

[6/7] git commit: [flex-sdk] [refs/heads/develop] - FLEX-26808 Terminating statements, correcting asdocs, and removing an unused variable and unused method.

2016-03-22 Thread mihaic
FLEX-26808
Terminating statements, correcting asdocs, and removing an unused variable and 
unused method.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/a34e9c3f
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/a34e9c3f
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/a34e9c3f

Branch: refs/heads/develop
Commit: a34e9c3f7c48a67ccd462cd801e7e77c5bd93afd
Parents: 23f0bd4
Author: Mihai Chira 
Authored: Tue Mar 22 14:15:51 2016 +0100
Committer: Mihai Chira 
Committed: Tue Mar 22 14:15:51 2016 +0100

--
 .../spark/src/spark/components/DataGrid.as  | 41 +---
 1 file changed, 10 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a34e9c3f/frameworks/projects/spark/src/spark/components/DataGrid.as
--
diff --git a/frameworks/projects/spark/src/spark/components/DataGrid.as 
b/frameworks/projects/spark/src/spark/components/DataGrid.as
index 76cf418..2c44d22 100644
--- a/frameworks/projects/spark/src/spark/components/DataGrid.as
+++ b/frameworks/projects/spark/src/spark/components/DataGrid.as
@@ -1992,7 +1992,7 @@ public class DataGrid extends SkinnableContainerBase
  * 
  *  @default null.
  *
- *  @see #dataField 
+ *  @see spark.components.gridClasses.GridColumn#dataField
  *  @see spark.components.gridClasses.IGridItemEditor
  * 
  *  @langversion 3.0
@@ -2587,7 +2587,7 @@ public class DataGrid extends SkinnableContainerBase
 }
 
 /**
- *  @copy spark.components.Grid#invalidateTypicalItem()
+ *  @copy spark.components.Grid#invalidateTypicalItemRenderer()
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -3710,7 +3710,7 @@ public class DataGrid extends SkinnableContainerBase
 var f:Function = function(g:Grid):void
 {
 g.selectedCell = valueCopy;
-}
+};
 deferredGridOperations.push(f);
 }
 }
@@ -3748,7 +3748,7 @@ public class DataGrid extends SkinnableContainerBase
 var f:Function = function(g:Grid):void
 {
 g.selectedCells = valueCopy;
-}
+};
 deferredGridOperations.push(f);
 }
 }   
@@ -3830,7 +3830,7 @@ public class DataGrid extends SkinnableContainerBase
 var f:Function = function(g:Grid):void
 {
 g.selectedIndices = valueCopy;
-}
+};
 deferredGridOperations.push(f);
 }
 }
@@ -3874,7 +3874,7 @@ public class DataGrid extends SkinnableContainerBase
 var f:Function = function(g:Grid):void
 {
 g.selectedItem = value;
-}
+};
 deferredGridOperations.push(f);
 }
 }
@@ -3921,7 +3921,7 @@ public class DataGrid extends SkinnableContainerBase
 var f:Function = function(g:Grid):void
 {
 g.selectedItems = valueCopy;
-}
+};
 deferredGridOperations.push(f);
 }
 }  
@@ -5423,14 +5423,11 @@ public class DataGrid extends SkinnableContainerBase
 // Cancel so another component doesn't handle this event.
 event.preventDefault(); 
 
-var selectionChanged:Boolean = false;
-
 if (event.shiftKey)
 {
 // The shift key-nav key combination extends the selection and 
 // updates the caret.
-selectionChanged = 
-extendSelection(newPosition.rowIndex, newPosition.columnIndex);
+extendSelection(newPosition.rowIndex, newPosition.columnIndex);
 }
 else if (event.ctrlKey)
 {
@@ -6095,7 +6092,7 @@ public class DataGrid extends SkinnableContainerBase
  *  a drag-and-drop operation.
  *  Override this method to add other data to the drag source.
  * 
- *  @param ds The DragSource object to which to add the data.
+ *  @param dragSource The DragSource object to which to add the data.
  *  
  *  @langversion 3.0
  *  @playerversion Flash 11
@@ -6474,25 +6471,7 @@ public class DataGrid extends SkinnableContainerBase
 // Destroy the dropIndicator instance
 destroyDropIndicator();
 }
-
-/**
- *  @private
- *  
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-private function 
touchInteractionStartHandler(event:TouchInteractionEvent):void
-{
-// cancel actual selection
-mouseDownRowIndex = -1;
-mouseDownColumnIndex = -1;

[3/7] git commit: [flex-sdk] [refs/heads/develop] - FLEX-26808 Renamed getFirstItemValue to getFirstItem.

2016-03-22 Thread mihaic
FLEX-26808
Renamed getFirstItemValue to getFirstItem.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/6b868813
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/6b868813
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/6b868813

Branch: refs/heads/develop
Commit: 6b8688135917f69a10b5cb7fb48d684b3afe0b89
Parents: c316cba
Author: Mihai Chira 
Authored: Tue Mar 22 12:40:30 2016 +0100
Committer: Mihai Chira 
Committed: Tue Mar 22 12:40:30 2016 +0100

--
 .../projects/framework/src/mx/utils/VectorUtil.as |  2 +-
 .../framework/tests/mx/utils/VectorUtilTests.as   | 14 +++---
 .../projects/spark/src/spark/components/List.as   |  6 +++---
 3 files changed, 11 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/6b868813/frameworks/projects/framework/src/mx/utils/VectorUtil.as
--
diff --git a/frameworks/projects/framework/src/mx/utils/VectorUtil.as 
b/frameworks/projects/framework/src/mx/utils/VectorUtil.as
index 51a3da3..f909a7b 100644
--- a/frameworks/projects/framework/src/mx/utils/VectorUtil.as
+++ b/frameworks/projects/framework/src/mx/utils/VectorUtil.as
@@ -22,7 +22,7 @@ package mx.utils {
  *  Given a Vector, returns the value of the first item,
  *  or -1 if there are no items in the Vector;
  */
-public static function getFirstItemValue(v:Vector.):int
+public static function getFirstItem(v:Vector.):int
 {
 return v && v.length ? v[0] : -1;
 }

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/6b868813/frameworks/projects/framework/tests/mx/utils/VectorUtilTests.as
--
diff --git a/frameworks/projects/framework/tests/mx/utils/VectorUtilTests.as 
b/frameworks/projects/framework/tests/mx/utils/VectorUtilTests.as
index e42cea5..2ef9ccd 100644
--- a/frameworks/projects/framework/tests/mx/utils/VectorUtilTests.as
+++ b/frameworks/projects/framework/tests/mx/utils/VectorUtilTests.as
@@ -25,13 +25,13 @@ package mx.utils {
 [Test]
 public function test_empty_vector():void
 {
-assertEquals(-1, VectorUtil.getFirstItemValue(new Vector.()));
+assertEquals(-1, VectorUtil.getFirstItem(new Vector.()));
 }
 
 [Test]
 public function test_null_parameter():void
 {
-assertEquals(-1, VectorUtil.getFirstItemValue(null));
+assertEquals(-1, VectorUtil.getFirstItem(null));
 }
 
 [Test]
@@ -44,7 +44,7 @@ package mx.utils {
 vector.push(3, 2, 1);
 
 //then
-assertEquals(3, VectorUtil.getFirstItemValue(vector));
+assertEquals(3, VectorUtil.getFirstItem(vector));
 }
 
 [Test]
@@ -54,7 +54,7 @@ package mx.utils {
 var vector:Vector. = new [35, 25, 15];
 
 //then
-assertEquals(35, VectorUtil.getFirstItemValue(vector));
+assertEquals(35, VectorUtil.getFirstItem(vector));
 }
 
 [Test]
@@ -64,7 +64,7 @@ package mx.utils {
 var vector:Vector. = new [-1, 2, 1];
 
 //then
-assertEquals(-1, VectorUtil.getFirstItemValue(vector));
+assertEquals(-1, VectorUtil.getFirstItem(vector));
 }
 
 [Test]
@@ -76,7 +76,7 @@ package mx.utils {
 //then
 assertStrictlyEquals(0, vector[0]);
 assertStrictlyEquals(0, vector[1]);
-assertEquals(0, VectorUtil.getFirstItemValue(vector));
+assertEquals(0, VectorUtil.getFirstItem(vector));
 }
 
 [Test]
@@ -91,7 +91,7 @@ package mx.utils {
 //then
 assertStrictlyEquals(3, vector[0]);
 assertStrictlyEquals(2, vector[1]);
-assertEquals(3, VectorUtil.getFirstItemValue(vector));
+assertEquals(3, VectorUtil.getFirstItem(vector));
 }
 }
 }

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/6b868813/frameworks/projects/spark/src/spark/components/List.as
--
diff --git a/frameworks/projects/spark/src/spark/components/List.as 
b/frameworks/projects/spark/src/spark/components/List.as
index 1e2bcec..8100e78 100644
--- a/frameworks/projects/spark/src/spark/components/List.as
+++ b/frameworks/projects/spark/src/spark/components/List.as
@@ -1242,7 +1242,7 @@ public class List extends ListBase implements 
IFocusManagerComponent
 }
 // Keep _proposedSelectedIndex in-sync with multiple selection 
properties. 
 if (!isEmpty(_proposedSelectedIndices))
-

[3/4] git commit: [flex-sdk] [refs/heads/develop] - Revert "TFC-12136"

2016-03-02 Thread mihaic
Revert "TFC-12136"

This reverts commit 45e61644e6a3543937a0fa3db11c3b98b228ae2d.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/2797a2c3
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/2797a2c3
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/2797a2c3

Branch: refs/heads/develop
Commit: 2797a2c3233ee08f5345719559e7cb40ee100db2
Parents: 951d8d2
Author: Mihai Chira 
Authored: Wed Mar 2 13:19:01 2016 +0100
Committer: Mihai Chira 
Committed: Wed Mar 2 13:19:01 2016 +0100

--
 .../projects/framework/src/mx/collections/ComplexSortField.as   | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/2797a2c3/frameworks/projects/framework/src/mx/collections/ComplexSortField.as
--
diff --git 
a/frameworks/projects/framework/src/mx/collections/ComplexSortField.as 
b/frameworks/projects/framework/src/mx/collections/ComplexSortField.as
index 56d6053..eb29649 100644
--- a/frameworks/projects/framework/src/mx/collections/ComplexSortField.as
+++ b/frameworks/projects/framework/src/mx/collections/ComplexSortField.as
@@ -20,7 +20,6 @@
 package mx.collections {
 import mx.utils.ObjectUtil;
 
-[Alternative(replacement="spark.collections.ComplexSortField", 
since="4.15")]
 public class ComplexSortField extends SortField implements 
IComplexSortField
 {
 private var _nameParts:Array;



[1/4] git commit: [flex-sdk] [refs/heads/develop] - TFC-12136 Removing all the PropertyChangeEvent dispatches which have no value set for property and oldValue, and the itemUpdated() calls in collecti

2016-03-02 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 244f63300 -> eec643c45


TFC-12136
Removing all the PropertyChangeEvent dispatches which have no value set for 
property and oldValue, and the itemUpdated() calls in collections (which yield 
the same type of events) when they come after updates to object's public and 
bindable properties, because that makes the dispatches superfluous. (The ones 
I'm leaving in are the ones after updating private properties on objects, so 
after bypassing the bindable getters and setters, e.g. in 
AbstractEmployeeTimeAllocationGroupTO; and the ones I don't have time to 
understand why they're there.)

As a result, IMulticurrencyLineItem does not need to extend IEventDispatcher 
anymore.

NOTES:
-see the comment in this ticket for why it should be pretty safe to do this.
-also made some minor refactoring where appropriate.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/45e61644
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/45e61644
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/45e61644

Branch: refs/heads/develop
Commit: 45e61644e6a3543937a0fa3db11c3b98b228ae2d
Parents: 244f633
Author: Mihai Chira 
Authored: Wed Mar 2 12:55:30 2016 +0100
Committer: Mihai Chira 
Committed: Wed Mar 2 12:55:30 2016 +0100

--
 .../projects/framework/src/mx/collections/ComplexSortField.as   | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/45e61644/frameworks/projects/framework/src/mx/collections/ComplexSortField.as
--
diff --git 
a/frameworks/projects/framework/src/mx/collections/ComplexSortField.as 
b/frameworks/projects/framework/src/mx/collections/ComplexSortField.as
index eb29649..56d6053 100644
--- a/frameworks/projects/framework/src/mx/collections/ComplexSortField.as
+++ b/frameworks/projects/framework/src/mx/collections/ComplexSortField.as
@@ -20,6 +20,7 @@
 package mx.collections {
 import mx.utils.ObjectUtil;
 
+[Alternative(replacement="spark.collections.ComplexSortField", 
since="4.15")]
 public class ComplexSortField extends SortField implements 
IComplexSortField
 {
 private var _nameParts:Array;



[2/4] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35039 Ignoring failing tests until we decide to work on this bug. Also renamed the functions to point to the relevant ticket.

2016-03-02 Thread mihaic
FLEX-35039
Ignoring failing tests until we decide to work on this bug. Also renamed the 
functions to point to the relevant ticket.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/951d8d2b
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/951d8d2b
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/951d8d2b

Branch: refs/heads/develop
Commit: 951d8d2b1cdc9fdcf9e56c6a50ccd0766a8f5bcf
Parents: 45e6164
Author: Mihai Chira 
Authored: Wed Mar 2 13:10:04 2016 +0100
Committer: Mihai Chira 
Committed: Wed Mar 2 13:10:04 2016 +0100

--
 .../ArrayCollection_FilterNumbers_Tests.as  | 20 ++--
 .../ArrayCollection_FilterStrings_Tests.as  | 18 +-
 2 files changed, 19 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/951d8d2b/frameworks/projects/framework/tests/mx/collections/ArrayCollection_FilterNumbers_Tests.as
--
diff --git 
a/frameworks/projects/framework/tests/mx/collections/ArrayCollection_FilterNumbers_Tests.as
 
b/frameworks/projects/framework/tests/mx/collections/ArrayCollection_FilterNumbers_Tests.as
index af6d036..5bacfb9 100644
--- 
a/frameworks/projects/framework/tests/mx/collections/ArrayCollection_FilterNumbers_Tests.as
+++ 
b/frameworks/projects/framework/tests/mx/collections/ArrayCollection_FilterNumbers_Tests.as
@@ -40,18 +40,18 @@ package mx.collections {
_sut.addItem(1);
_sut.addItem(2);
}
-   
-   protected function allIn(object:Object):Boolean
+
+   private static function allIn(object:Object):Boolean
{
return true;
}
-   
-   protected function allOut(object:Object):Boolean
+
+   private static function allOut(object:Object):Boolean
{
return false;
}
-   
-   protected function isOne(object:Object):Boolean
+
+   private static function isOne(object:Object):Boolean
{
return object == 1;
}
@@ -200,10 +200,10 @@ package mx.collections {
assertEquals("First element not correct",  1, _sut[0]);
assertEquals("Second element not correct",  1, _sut[1]);
}
-   
-   //Fails in Apache Flex 4.9.1. See FLEX-35039
-   [Test]
-   public function swapItemsTwoThenOne():void
+
+[Ignore]
+   [Test] //See FLEX-35039
+   public function swapItemsTwoThenOne_reproduces_FLEX_35039():void
{
//given
addNumbers();

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/951d8d2b/frameworks/projects/framework/tests/mx/collections/ArrayCollection_FilterStrings_Tests.as
--
diff --git 
a/frameworks/projects/framework/tests/mx/collections/ArrayCollection_FilterStrings_Tests.as
 
b/frameworks/projects/framework/tests/mx/collections/ArrayCollection_FilterStrings_Tests.as
index d82371c..f61d3ec 100644
--- 
a/frameworks/projects/framework/tests/mx/collections/ArrayCollection_FilterStrings_Tests.as
+++ 
b/frameworks/projects/framework/tests/mx/collections/ArrayCollection_FilterStrings_Tests.as
@@ -43,17 +43,17 @@ package mx.collections {
_sut.addItem("C");
}

-   protected function allIn(object:Object):Boolean
+   private static function allIn(object:Object):Boolean
{
return true;
}
-   
-   protected function allOut(object:Object):Boolean
+
+   private static function allOut(object:Object):Boolean
{
return false;
}
-   
-   protected function isA(object:Object):Boolean
+
+   private static function isA(object:Object):Boolean
{
return object == "A";
}
@@ -218,10 +218,10 @@ package mx.collections {
assertEquals("First element not correct",  "A", 
_sut[0]);
assertEquals("Second element not correct",  "A", 
_sut[1]);
}
-   
-   //Fails in Apache Flex 4.9.1. See FLEX-35039
-   [Test]
-   public function swapItemsTwoThenOne():void
+
+   [Ignore]
+   [Test] //See FLEX-35039
+ 

git commit: [flex-sdk] [refs/heads/develop] - FLEX-35043 Updating unit tests to reflect new behaviour.

2016-03-02 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 2c0c18713 -> 244f63300


FLEX-35043
Updating unit tests to reflect new behaviour.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/244f6330
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/244f6330
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/244f6330

Branch: refs/heads/develop
Commit: 244f6330052a6852fb860da9f6645e7f494f4ac2
Parents: 2c0c187
Author: Mihai Chira 
Authored: Wed Mar 2 10:23:30 2016 +0100
Committer: Mihai Chira 
Committed: Wed Mar 2 10:23:30 2016 +0100

--
 ...tCollectionView_PropertyChangeEvent_Tests.as | 28 +++-
 1 file changed, 15 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/244f6330/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
--
diff --git 
a/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
 
b/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
index ec41511..56d0b40 100644
--- 
a/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
+++ 
b/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
@@ -27,6 +27,7 @@ package mx.collections {
 import mx.utils.ObjectUtil;
 
 import org.flexunit.asserts.assertEquals;
+import org.flexunit.asserts.assertNull;
 import org.flexunit.asserts.assertTrue;
 
 public class ListCollectionView_PropertyChangeEvent_Tests
@@ -136,7 +137,7 @@ package mx.collections {
 }
 
 [Test] //FLEX-35043
-public function 
test_when_collection_item_dispatches_PropertyChangeEvent_null_is_removed_from_list():void
+public function 
test_when_collection_item_dispatches_PropertyChangeEvent_null_is_not_removed_from_list():void
 {
 //given
 _sut.addItem(null);
@@ -150,7 +151,7 @@ package mx.collections {
 
 //then
 assertTrue(positionOfNull != -1);
-assertEquals(-1, _sut.getItemIndex(null));
+assertEquals(positionOfNull, _sut.getItemIndex(null));
 assertEquals(positionOfFirstWorkout, 
_sut.getItemIndex(_firstWorkout));
 }
 
@@ -194,7 +195,7 @@ package mx.collections {
 }
 
 [Test] //FLEX-35043
-public function 
test_when_item_is_changed_bypassing_binding_and_collection_notified_of_itemUpdated_without_property_null_is_removed_from_list():void
+public function 
test_when_item_is_changed_bypassing_binding_and_collection_notified_of_itemUpdated_without_property_null_is_not_removed_from_list():void
 {
 //given
 _sut.addItem(null);
@@ -210,12 +211,12 @@ package mx.collections {
 
 //then
 assertTrue(positionOfNull != -1);
-assertEquals(-1, _sut.getItemIndex(null));
+assertEquals(positionOfNull, _sut.getItemIndex(null));
 assertEquals(positionOfFirstWorkout, 
_sut.getItemIndex(_firstWorkout));
 }
 
 [Test] //FLEX-35043
-public function 
test_when_collection_item_dispatches_PropertyChangeEvent_with_UPDATE_null_is_removed_from_list():void
+public function 
test_when_collection_item_dispatches_PropertyChangeEvent_with_UPDATE_null_is_not_removed_from_list():void
 {
 //given
 _sut.addItem(null);
@@ -229,7 +230,7 @@ package mx.collections {
 
 //then
 assertTrue(positionOfNull != -1);
-assertEquals(-1, _sut.getItemIndex(null));
+assertEquals(positionOfNull, _sut.getItemIndex(null));
 assertEquals(positionOfFirstWorkout, 
_sut.getItemIndex(_firstWorkout));
 }
 
@@ -261,6 +262,7 @@ package mx.collections {
 var sort:InspectableSort = new InspectableSort([new 
SortField("name")]);
 _sut.sort = sort;
 _sut.refresh();
+
 const positionOfNull:int = _sut.getItemIndex(null);
 const positionOfFirstWorkout:int = 
_sut.getItemIndex(_firstWorkout);
 
@@ -289,13 +291,13 @@ package mx.collections {
 //object's correct position has been inspected with Sort
 assertEquals(_firstWorkout, InspectableSort.lastItemSearchedFor);
 //and null (PropertyChangeEvent.oldValue) has been sought for when 
trying to remove it
-assertTrue(InspectableSort.itemsSearchedFor.indexOf(null) != -1);
+assertEquals(-1, InspectableSort.itemsSearchedFor.indexOf(null));
 //and it's in the same position
 

[2/2] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35043 CAUSE: The solution implemented for FLEX-34885, which had an problematic consequence: when calling itemUpdated(item) on a collection with

2016-03-02 Thread mihaic
FLEX-35043
CAUSE: The solution implemented for FLEX-34885, which had an problematic 
consequence: when calling itemUpdated(item) on a collection with only the first 
parameter provided (which developers usually do to signal that some - 
unspecified - properties of the item have changed), 
ListCollectionView.handlePropertyChangeEvents() would treat that as if the 
object had been just introduced to the collection - as "property" was null -, 
replacing a null value - since oldValue was null as well. (That is to say, when 
the "property" value of the PropertyChangeEvent was null, it was taken to mean 
that the oldValue - which was also null here - was changed into that item, i.e. 
the object reference changed in the collection, not just one of the object's 
properties.) As such, it would try to remove that supposedly existing null 
value from the collection (and sometimes a null does exist, but shouldn't be 
removed).

In a way this was logical based on the properties supplied to itemUpdated(), 
but we also know that a frequent use of that function is with only one 
parameter, to specify that some of the object's properties have changed (but 
the object itself should still be in the collection). So we should continue to 
support this use case.

SOLUTION: now ListCollectionView.handlePropertyChangeEvents() only assumes that 
the entire object has been replaced in the collection if the event's "property" 
is null AND if either its "oldValue" or "newValue" is non-null. In other words, 
if the developer entered all these arguments into the function or in the event 
they're dispatching, and one of them is non-null, it probably means they want 
to signal that the entire object has changed in the collection.

NOTES:
-renamed "entireObjectChanged" into "objectReplacedWithAnother" to emphasize 
that it's not the object's internal state that "entirely changed", but that the 
object itself was replaced in the collection by another object instance.
-some of the unit tests in ListCollectionView_PropertyChangeEvent_Tests are now 
failing, which is expected.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/2c0c1871
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/2c0c1871
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/2c0c1871

Branch: refs/heads/develop
Commit: 2c0c1871368dc43520334a84c5e7d046acdb0cb8
Parents: 831ed07
Author: Mihai Chira 
Authored: Wed Mar 2 10:12:46 2016 +0100
Committer: Mihai Chira 
Committed: Wed Mar 2 10:12:46 2016 +0100

--
 .../framework/src/mx/collections/ListCollectionView.as   | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/2c0c1871/frameworks/projects/framework/src/mx/collections/ListCollectionView.as
--
diff --git 
a/frameworks/projects/framework/src/mx/collections/ListCollectionView.as 
b/frameworks/projects/framework/src/mx/collections/ListCollectionView.as
index a002f1d..15fc15d 100644
--- a/frameworks/projects/framework/src/mx/collections/ListCollectionView.as
+++ b/frameworks/projects/framework/src/mx/collections/ListCollectionView.as
@@ -1487,8 +1487,10 @@ public class ListCollectionView extends Proxy implements 
ICollectionView, IList,
 }
 else
 {
+var oldOrNewValueSpecified:Boolean = updateInfo.oldValue 
!= null || updateInfo.newValue != null;
+var objectReplacedInCollection:Boolean = 
updateInfo.property == null && oldOrNewValueSpecified;
 updateEntry = {item: item, move: defaultMove, events: 
[updateInfo],
-entireObjectChanged: updateInfo.property == null, 
oldItem: updateInfo.property == null ? updateInfo.oldValue : null};
+objectReplacedWithAnother: objectReplacedInCollection, 
oldItem: updateInfo.oldValue};
 updatedItems.push(updateEntry);
 }
 
@@ -1497,7 +1499,7 @@ public class ListCollectionView extends Proxy implements 
ICollectionView, IList,
 //if the property affects the sort, we'll need to move
 updateEntry.move = updateEntry.move
 || filterFunction != null
-|| updateEntry.entireObjectChanged
+|| updateEntry.objectReplacedWithAnother
 || (sort && 
sort.propertyAffectsSort(String(updateInfo.property)));
 }
 
@@ -1509,7 +1511,7 @@ public class ListCollectionView extends Proxy implements 
ICollectionView, IList,
 updateEntry = updatedItems[i];
 if (updateEntry.move)
 {
-

[1/2] git commit: [flex-sdk] [refs/heads/develop] - FLEX-34885 Tagging which unit tests are relevant to FLEX-35043.

2016-03-02 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 3a71cc8ee -> 2c0c18713


FLEX-34885
Tagging which unit tests are relevant to FLEX-35043.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/831ed071
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/831ed071
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/831ed071

Branch: refs/heads/develop
Commit: 831ed07133e87826dfd7de9411d5bb12e9126a84
Parents: 3a71cc8
Author: Mihai Chira 
Authored: Wed Mar 2 09:52:28 2016 +0100
Committer: Mihai Chira 
Committed: Wed Mar 2 09:52:28 2016 +0100

--
 .../ListCollectionView_PropertyChangeEvent_Tests.as   | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/831ed071/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
--
diff --git 
a/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
 
b/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
index 0f59439..ec41511 100644
--- 
a/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
+++ 
b/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
@@ -135,7 +135,7 @@ package mx.collections {
 assertEquals(positionOfFirstWorkout, 
_sut.getItemIndex(_firstWorkout));
 }
 
-[Test]
+[Test] //FLEX-35043
 public function 
test_when_collection_item_dispatches_PropertyChangeEvent_null_is_removed_from_list():void
 {
 //given
@@ -173,7 +173,7 @@ package mx.collections {
 assertEquals(positionOfFirstWorkout, 
_sut.getItemIndex(_firstWorkout));
 }
 
-[Test]
+[Test] //FLEX-35043
 public function 
test_when_item_is_changed_bypassing_binding_and_collection_notified_of_itemUpdated_with_property_null_is_not_removed_from_list():void
 {
 //given
@@ -193,7 +193,7 @@ package mx.collections {
 assertEquals(positionOfFirstWorkout, 
_sut.getItemIndex(_firstWorkout));
 }
 
-[Test]
+[Test] //FLEX-35043
 public function 
test_when_item_is_changed_bypassing_binding_and_collection_notified_of_itemUpdated_without_property_null_is_removed_from_list():void
 {
 //given
@@ -214,7 +214,7 @@ package mx.collections {
 assertEquals(positionOfFirstWorkout, 
_sut.getItemIndex(_firstWorkout));
 }
 
-[Test]
+[Test] //FLEX-35043
 public function 
test_when_collection_item_dispatches_PropertyChangeEvent_with_UPDATE_null_is_removed_from_list():void
 {
 //given
@@ -273,7 +273,7 @@ package mx.collections {
 assertEquals(positionOfFirstWorkout, 
_sut.getItemIndex(_firstWorkout));
 }
 
-[Test]
+[Test] //FLEX-35043
 public function 
test_when_collection_item_dispatches_PropertyChangeEvent_item_is_added_in_correct_place_based_on_sort_and_there_is_no_fatal():void
 {
 //given
@@ -294,7 +294,7 @@ package mx.collections {
 assertEquals(positionOfFirstWorkout, 
_sut.getItemIndex(_firstWorkout));
 }
 
-[Test]
+[Test] //FLEX-35043
 public function 
test_when_collection_item_dispatches_PropertyChangeEvent_sort_compare_function_called_with_null_and_fatals_if_no_null_check():void
 {
 function compareWorkouts(a:Object, b:Object, fields:Array = 
null):int
@@ -318,7 +318,7 @@ package mx.collections {
 assertTrue(_uncaughtError is TypeError);
 }
 
-[Test]
+[Test] //FLEX-35043
 public function 
test_when_collection_notified_of_itemUpdated_without_valid_property_sort_compare_function_called_with_null_and_fatals_if_no_null_check():void
 {
 function compareWorkouts(a:Object, b:Object, fields:Array = 
null):int



[3/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-34885 Adding unit tests to show that IList/ICollectionView.itemUpdated() creates the same unexpected results as dispatching generic PropertyCha

2016-03-01 Thread mihaic
FLEX-34885
Adding unit tests to show that IList/ICollectionView.itemUpdated() creates the 
same unexpected results as dispatching generic PropertyChangeEvents from list 
items.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/3a71cc8e
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/3a71cc8e
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/3a71cc8e

Branch: refs/heads/develop
Commit: 3a71cc8ee613c5d8bf45c93ee4a8123b623201ab
Parents: cccf3a4
Author: Mihai Chira 
Authored: Tue Mar 1 13:43:56 2016 +0100
Committer: Mihai Chira 
Committed: Tue Mar 1 13:43:56 2016 +0100

--
 ...tCollectionView_PropertyChangeEvent_Tests.as | 99 
 1 file changed, 99 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/3a71cc8e/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
--
diff --git 
a/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
 
b/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
index 35ba4cc..0f59439 100644
--- 
a/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
+++ 
b/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
@@ -174,6 +174,47 @@ package mx.collections {
 }
 
 [Test]
+public function 
test_when_item_is_changed_bypassing_binding_and_collection_notified_of_itemUpdated_with_property_null_is_not_removed_from_list():void
+{
+//given
+_sut.addItem(null);
+_sut.filterFunction = allowAll;
+_sut.refresh();
+const positionOfNull:int = _sut.getItemIndex(null);
+const positionOfFirstWorkout:int = 
_sut.getItemIndex(_firstWorkout);
+
+//when
+_firstWorkout.setMuscleGroupsWithoutTriggeringBinding("biceps");
+_sut.itemUpdated(_firstWorkout, "muscleGroups", null, 
_firstWorkout.muscleGroups);
+
+//then
+assertTrue(positionOfNull != -1);
+assertEquals(positionOfNull, _sut.getItemIndex(null));
+assertEquals(positionOfFirstWorkout, 
_sut.getItemIndex(_firstWorkout));
+}
+
+[Test]
+public function 
test_when_item_is_changed_bypassing_binding_and_collection_notified_of_itemUpdated_without_property_null_is_removed_from_list():void
+{
+//given
+_sut.addItem(null);
+_sut.filterFunction = allowAll;
+_sut.refresh();
+const positionOfNull:int = _sut.getItemIndex(null);
+const positionOfFirstWorkout:int = 
_sut.getItemIndex(_firstWorkout);
+
+//when
+_firstWorkout.setMuscleGroupsWithoutTriggeringBinding("biceps");
+_firstWorkout.setMinAgeWithoutTriggeringBinding(14);
+_sut.itemUpdated(_firstWorkout);
+
+//then
+assertTrue(positionOfNull != -1);
+assertEquals(-1, _sut.getItemIndex(null));
+assertEquals(positionOfFirstWorkout, 
_sut.getItemIndex(_firstWorkout));
+}
+
+[Test]
 public function 
test_when_collection_item_dispatches_PropertyChangeEvent_with_UPDATE_null_is_removed_from_list():void
 {
 //given
@@ -277,6 +318,32 @@ package mx.collections {
 assertTrue(_uncaughtError is TypeError);
 }
 
+[Test]
+public function 
test_when_collection_notified_of_itemUpdated_without_valid_property_sort_compare_function_called_with_null_and_fatals_if_no_null_check():void
+{
+function compareWorkouts(a:Object, b:Object, fields:Array = 
null):int
+{
+if(a.duration > b.duration)
+return 1;
+if(a.duration < b.duration)
+return -1;
+
+return 0;
+}
+//given
+var sort:InspectableSort = new InspectableSort([], 
compareWorkouts);
+_sut.sort = sort;
+_sut.refresh();
+
+//when
+_firstWorkout.setMuscleGroupsWithoutTriggeringBinding("chest");
+_firstWorkout.setMinAgeWithoutTriggeringBinding(20);
+_sut.itemUpdated(_firstWorkout);
+
+//then - fatal because compareWorkouts was called with null, which 
it didn't expect (but should have)
+assertTrue(_uncaughtError is TypeError);
+}
+
 private static function allowAll(object:Object):Boolean
 {
 _lastFilteredObject = object;
@@ -313,12 +380,44 @@ class 

[2/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-34885 Making sure that the changes for this ticket haven't introduced the bug of removing a null from the collection when an item's Bindable pr

2016-03-01 Thread mihaic
FLEX-34885
Making sure that the changes for this ticket haven't introduced the bug of 
removing a null from the collection when an item's Bindable property changes. 
Looks all right.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/cccf3a46
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/cccf3a46
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/cccf3a46

Branch: refs/heads/develop
Commit: cccf3a468e6c5f65b01b580bb9456d7f756e48e2
Parents: 4b4cc0b
Author: Mihai Chira 
Authored: Tue Mar 1 12:58:03 2016 +0100
Committer: Mihai Chira 
Committed: Tue Mar 1 12:58:03 2016 +0100

--
 ...stCollectionView_PropertyChangeEvent_Tests.as | 19 +++
 1 file changed, 19 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/cccf3a46/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
--
diff --git 
a/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
 
b/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
index c7d684b..35ba4cc 100644
--- 
a/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
+++ 
b/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
@@ -155,6 +155,25 @@ package mx.collections {
 }
 
 [Test]
+public function 
test_when_collection_item_is_changed_null_is_not_removed_from_list():void
+{
+//given
+_sut.addItem(null);
+_sut.filterFunction = allowAll;
+_sut.refresh();
+const positionOfNull:int = _sut.getItemIndex(null);
+const positionOfFirstWorkout:int = 
_sut.getItemIndex(_firstWorkout);
+
+//when
+_firstWorkout.duration += 10;
+
+//then
+assertTrue(positionOfNull != -1);
+assertEquals(positionOfNull, _sut.getItemIndex(null));
+assertEquals(positionOfFirstWorkout, 
_sut.getItemIndex(_firstWorkout));
+}
+
+[Test]
 public function 
test_when_collection_item_dispatches_PropertyChangeEvent_with_UPDATE_null_is_removed_from_list():void
 {
 //given



git commit: [flex-sdk] [refs/heads/develop] - FLEX-34885 Adding more checks to make sure that when generic PropertyChangeEvents are dispatched, the objects that dispatch them are not moved to another

2016-02-23 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 4f8074747 -> 1a15b4a51


FLEX-34885
Adding more checks to make sure that when generic PropertyChangeEvents are 
dispatched, the objects that dispatch them are not moved to another location in 
the ListCollectionView.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/1a15b4a5
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/1a15b4a5
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/1a15b4a5

Branch: refs/heads/develop
Commit: 1a15b4a510926a91c11aacdc5c8e059189e4ec3b
Parents: 4f80747
Author: Mihai Chira 
Authored: Tue Feb 23 13:00:51 2016 +0100
Committer: Mihai Chira 
Committed: Tue Feb 23 13:00:51 2016 +0100

--
 .../ListCollectionView_PropertyChangeEvent_Tests.as| 6 ++
 1 file changed, 6 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/1a15b4a5/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
--
diff --git 
a/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
 
b/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
index 7845080..b18c7de 100644
--- 
a/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
+++ 
b/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
@@ -101,6 +101,7 @@ package mx.collections {
 //given
 _sut.filterFunction = allowAll;
 _sut.refresh();
+const positionOfFirstWorkout:int = 
_sut.getItemIndex(_firstWorkout);
 
 _noTimesFilterFunctionCalled = 0;
 _lastFilteredObject = null;
@@ -111,6 +112,7 @@ package mx.collections {
 //then - no fatal, and object has been filtered
 assertEquals(1, _noTimesFilterFunctionCalled);
 assertEquals(_firstWorkout, _lastFilteredObject);
+assertEquals(positionOfFirstWorkout, 
_sut.getItemIndex(_firstWorkout));
 }
 
 [Test]
@@ -121,6 +123,7 @@ package mx.collections {
 _sut.filterFunction = allowAll;
 _sut.refresh();
 var positionOfNull:int = _sut.getItemIndex(null);
+const positionOfFirstWorkout:int = 
_sut.getItemIndex(_firstWorkout);
 
 //when
 _firstWorkout.dispatchEvent(PROPERTY_CHANGE_EVENT);
@@ -128,6 +131,7 @@ package mx.collections {
 //then
 assertTrue(positionOfNull != -1);
 assertEquals(-1, _sut.getItemIndex(null));
+assertEquals(positionOfFirstWorkout, 
_sut.getItemIndex(_firstWorkout));
 }
 
 [Test]
@@ -138,6 +142,7 @@ package mx.collections {
 _sut.filterFunction = allowAll;
 _sut.refresh();
 var positionOfNull:int = _sut.getItemIndex(null);
+const positionOfFirstWorkout:int = 
_sut.getItemIndex(_firstWorkout);
 
 //when
 _firstWorkout.dispatchEvent(PROPERTY_CHANGE_EVENT_UPDATE);
@@ -145,6 +150,7 @@ package mx.collections {
 //then
 assertTrue(positionOfNull != -1);
 assertEquals(-1, _sut.getItemIndex(null));
+assertEquals(positionOfFirstWorkout, 
_sut.getItemIndex(_firstWorkout));
 }
 
 [Test]



[2/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-34885 Added a new unit test class, ListCollectionView_PropertyChangeEvent_Tests, that not only tests a few scenarios to make sure that ListColl

2016-02-23 Thread mihaic
FLEX-34885
Added a new unit test class, ListCollectionView_PropertyChangeEvent_Tests, that 
not only tests a few scenarios to make sure that ListCollectionView reacts as 
expected to PropertyChangeEvents, but also makes explicit 2 of the consequences 
of manually dispatching PropertyChangeEvents through the VOs in the list 
without specifying a "property" and an "oldValue" in the PropertyChangeEvent:
1. null is assumed to have been replaced in the collection by that VO, so it 
will be removed if it already exists. This may be unexpected to developers.
2. if there's a customCompareFunction in the Sort object, it will be called 
with null as one of the arguments. This may again be unexpected to developers.

NOTES:
-also removed some whitespace and improved asdocs.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/860ab480
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/860ab480
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/860ab480

Branch: refs/heads/develop
Commit: 860ab480c4387eeaca0076e2f89f50784cee03c4
Parents: b870fbc
Author: Mihai Chira 
Authored: Tue Feb 23 11:53:20 2016 +0100
Committer: Mihai Chira 
Committed: Tue Feb 23 11:53:20 2016 +0100

--
 .../framework/src/mx/collections/ArrayList.as   |  16 +-
 .../src/mx/collections/ListCollectionView.as|  28 +-
 .../framework/src/mx/collections/Sort.as|   4 +-
 ...tCollectionView_PropertyChangeEvent_Tests.as | 277 +++
 4 files changed, 294 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/860ab480/frameworks/projects/framework/src/mx/collections/ArrayList.as
--
diff --git a/frameworks/projects/framework/src/mx/collections/ArrayList.as 
b/frameworks/projects/framework/src/mx/collections/ArrayList.as
index 276afc5..dbfbb42 100644
--- a/frameworks/projects/framework/src/mx/collections/ArrayList.as
+++ b/frameworks/projects/framework/src/mx/collections/ArrayList.as
@@ -748,8 +748,7 @@ public class ArrayList extends EventDispatcher
 {
 if (hasEventListener(CollectionEvent.COLLECTION_CHANGE))
 {
-var event:CollectionEvent =
-new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
+var event:CollectionEvent = new 
CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
 event.kind = kind;
if(kind != CollectionEventKind.RESET && kind != 
CollectionEventKind.REFRESH)
event.items.push(item);
@@ -761,8 +760,7 @@ public class ArrayList extends EventDispatcher
 if (hasEventListener(PropertyChangeEvent.PROPERTY_CHANGE) && 
(kind == CollectionEventKind.ADD || kind == 
CollectionEventKind.REMOVE))
 {
-var objEvent:PropertyChangeEvent =
-new 
PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE);
+var objEvent:PropertyChangeEvent = new 
PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE);
 objEvent.property = location;
 if (kind == CollectionEventKind.ADD)
 objEvent.newValue = item;
@@ -814,9 +812,7 @@ public class ArrayList extends EventDispatcher
 {
 if (item && (item is IEventDispatcher))
 {
-IEventDispatcher(item).addEventListener(
-PropertyChangeEvent.PROPERTY_CHANGE, 
-itemUpdateHandler, false, 0, true);
+
IEventDispatcher(item).addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, 
itemUpdateHandler, false, 0, true);
 }
 }
 
@@ -837,12 +833,8 @@ public class ArrayList extends EventDispatcher
 {
 if (item && item is IEventDispatcher)
 {
-IEventDispatcher(item).removeEventListener(
-PropertyChangeEvent.PROPERTY_CHANGE, 
-itemUpdateHandler);
+
IEventDispatcher(item).removeEventListener(PropertyChangeEvent.PROPERTY_CHANGE, 
itemUpdateHandler);
 }
 }
-
 }
-
 }

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/860ab480/frameworks/projects/framework/src/mx/collections/ListCollectionView.as
--
diff --git 
a/frameworks/projects/framework/src/mx/collections/ListCollectionView.as 
b/frameworks/projects/framework/src/mx/collections/ListCollectionView.as
index 173a2d9..a002f1d 100644
--- a/frameworks/projects/framework/src/mx/collections/ListCollectionView.as
+++ 

[2/2] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35037 Renaming test files to 1) show what they're testing and 2) make sure they're picked up and ran by the test scripts.

2016-02-22 Thread mihaic
FLEX-35037
Renaming test files to 1) show what they're testing and 2) make sure they're 
picked up and ran by the test scripts.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/81643dd1
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/81643dd1
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/81643dd1

Branch: refs/heads/develop
Commit: 81643dd12a659647b88921e27c2a10d43661a27b
Parents: 1d8d02c
Author: Mihai Chira 
Authored: Mon Feb 22 19:15:36 2016 +0100
Committer: Mihai Chira 
Committed: Mon Feb 22 19:15:36 2016 +0100

--
 .../tests/mx/collections/AddRemoveNumbers.as| 174 --
 .../tests/mx/collections/AddRemoveObjects.as| 274 ---
 .../tests/mx/collections/AddRemoveStrings.as| 200 ---
 .../ArrayCollection_AddRemoveNumbers_Tests.as   | 174 ++
 .../ArrayCollection_AddRemoveObjects_Tests.as   | 274 +++
 .../ArrayCollection_AddRemoveStrings_Tests.as   | 200 +++
 ...ArrayCollection_FilerAndSortNumbers_Tests.as | 114 +++
 ...ArrayCollection_FilerAndSortStrings_Tests.as | 114 +++
 .../ArrayCollection_FilterNumbers_Tests.as  | 315 +
 .../ArrayCollection_FilterStrings_Tests.as  | 341 +++
 .../ArrayCollection_SortNumbers_Tests.as| 212 
 .../ArrayCollection_SortStrings_Tests.as| 254 ++
 .../tests/mx/collections/FilerAndSortNumbers.as | 114 ---
 .../tests/mx/collections/FilerAndSortStrings.as | 114 ---
 .../tests/mx/collections/FilterNumbers.as   | 315 -
 .../tests/mx/collections/FilterStrings.as   | 341 ---
 .../tests/mx/collections/SortNumbers.as | 212 
 .../tests/mx/collections/SortStrings.as | 254 --
 18 files changed, 1998 insertions(+), 1998 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/81643dd1/frameworks/projects/framework/tests/mx/collections/AddRemoveNumbers.as
--
diff --git 
a/frameworks/projects/framework/tests/mx/collections/AddRemoveNumbers.as 
b/frameworks/projects/framework/tests/mx/collections/AddRemoveNumbers.as
deleted file mode 100644
index efd43f5..000
--- a/frameworks/projects/framework/tests/mx/collections/AddRemoveNumbers.as
+++ /dev/null
@@ -1,174 +0,0 @@
-
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//  http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-
-package mx.collections {
-import org.flexunit.asserts.*;
-
-public class AddRemoveNumbers
-   {   
-   protected var _sut:ArrayCollection;
-   
-   [Before]
-   public function setUp():void
-   {
-   _sut = new ArrayCollection();
-   }
-   
-   [After]
-   public function tearDown():void
-   {
-   _sut = null;
-   }
-   
-   [Test]
-   public function empty():void
-   {
-   //then
-   assertEquals(_sut.length, 0);
-   }
-   
-   [Test]
-   public function addNumbers():void
-   {
-   _sut.addItem(1);
-   assertEquals("Length is not one",  1, _sut.length);
-   assertEquals("First element not correct",  1, _sut[0]);
-   _sut.addItem(2);
-   assertEquals("Length is not two",  2, _sut.length);
-   assertEquals("Second element not correct",  2, _sut[1]);
-   }
-   
-   [Test]
-   public function addDuplicate():void
-   {
-   addNumbers();
- 

[1/5] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35037 Added unit tests donated by Justin Mclean. Currently some are failing.

2016-02-22 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 3f7bd745a -> 1d8d02c64


FLEX-35037
Added unit tests donated by Justin Mclean. Currently some are failing.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/192f1e30
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/192f1e30
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/192f1e30

Branch: refs/heads/develop
Commit: 192f1e30b0dabf40afc6fd23be67f7c3a91686a9
Parents: 3f7bd74
Author: Mihai Chira 
Authored: Mon Feb 22 18:00:26 2016 +0100
Committer: Mihai Chira 
Committed: Mon Feb 22 18:00:26 2016 +0100

--
 .../tests/mx/collections/AddRemoveNumbers.as| 158 +
 .../tests/mx/collections/AddRemoveObjects.as| 203 
 .../tests/mx/collections/AddRemoveStrings.as| 167 ++
 .../tests/mx/collections/FilerAndSortNumbers.as | 100 ++
 .../tests/mx/collections/FilerAndSortStrings.as | 100 ++
 .../tests/mx/collections/FilterNumbers.as   | 298 +
 .../tests/mx/collections/FilterStrings.as   | 324 +++
 .../tests/mx/collections/SortNumbers.as | 198 
 .../tests/mx/collections/SortStrings.as | 240 ++
 9 files changed, 1788 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/192f1e30/frameworks/projects/framework/tests/mx/collections/AddRemoveNumbers.as
--
diff --git 
a/frameworks/projects/framework/tests/mx/collections/AddRemoveNumbers.as 
b/frameworks/projects/framework/tests/mx/collections/AddRemoveNumbers.as
new file mode 100644
index 000..28354f2
--- /dev/null
+++ b/frameworks/projects/framework/tests/mx/collections/AddRemoveNumbers.as
@@ -0,0 +1,158 @@
+package mx.collections {
+   import mx.collections.ArrayCollection;
+   
+   import org.flexunit.asserts.*;
+
+   public class AddRemoveNumbers
+   {   
+   protected var _sut:ArrayCollection;
+   
+   [Before]
+   public function setUp():void
+   {
+   _sut = new ArrayCollection();
+   }
+   
+   [After]
+   public function tearDown():void
+   {
+   _sut = null;
+   }
+   
+   [Test]
+   public function empty():void
+   {
+   //then
+   assertEquals(_sut.length, 0);
+   }
+   
+   [Test]
+   public function addNumbers():void
+   {
+   _sut.addItem(1);
+   assertEquals("Length is not one", _sut.length, 1);
+   assertEquals("First element not correct", _sut[0], 1);
+   _sut.addItem(2);
+   assertEquals("Length is not two", _sut.length, 2);
+   assertEquals("Second element not correct", _sut[1], 2);
+   }
+   
+   [Test]
+   public function addDuplicate():void
+   {
+   addNumbers();
+   _sut.addItem(1);
+   assertEquals("Length is not three", _sut.length, 3);
+   assertEquals("First element not correct", _sut[0], 1);
+   assertEquals("Second element not correct", _sut[1], 2);
+   assertEquals("Second element not correct", _sut[2], 1);
+   }
+   
+   [Test]
+   public function removeDuplicate():void
+   {
+   addNumbers();
+   _sut.addItem(1);
+   _sut.removeItemAt(0);
+   assertEquals("Length is not two", _sut.length, 2);
+   assertEquals("First element not correct", _sut[0], 2);
+   assertEquals("Second element not correct", _sut[1], 1);
+   }
+   
+   [Test]
+   public function removeAllNumbers():void
+   {
+   addNumbers();
+   _sut.removeAll();
+   assertEquals("Length is not zero", _sut.length, 0);
+   }
+   
+   [Test]
+   public function removeFirstNumbers():void
+   {
+   addNumbers();
+   _sut.removeItemAt(0);
+   assertEquals("First element not correct", _sut[0], 2);
+   assertEquals("Length is not one", _sut.length, 1);
+   _sut.removeItemAt(0);

[4/5] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35037 Swapping arguments in asserts, to get better error messages. (No changes in test results.)

2016-02-22 Thread mihaic
FLEX-35037
Swapping arguments in asserts, to get better error messages. (No changes in 
test results.)


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/a0006003
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/a0006003
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/a0006003

Branch: refs/heads/develop
Commit: a0006003c0ea348c0e98c0faf3ff87204f6f746e
Parents: 1773814
Author: Mihai Chira 
Authored: Mon Feb 22 19:01:42 2016 +0100
Committer: Mihai Chira 
Committed: Mon Feb 22 19:01:42 2016 +0100

--
 .../tests/mx/collections/AddRemoveNumbers.as|  58 +++
 .../tests/mx/collections/AddRemoveObjects.as|  96 ++--
 .../tests/mx/collections/AddRemoveStrings.as|  38 ++---
 .../tests/mx/collections/FilerAndSortNumbers.as |  52 +++
 .../tests/mx/collections/FilerAndSortStrings.as |  52 +++
 .../tests/mx/collections/FilterNumbers.as   |  98 ++--
 .../tests/mx/collections/FilterStrings.as   | 152 +--
 .../tests/mx/collections/SortNumbers.as |  82 +-
 .../tests/mx/collections/SortStrings.as | 144 +-
 9 files changed, 386 insertions(+), 386 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a0006003/frameworks/projects/framework/tests/mx/collections/AddRemoveNumbers.as
--
diff --git 
a/frameworks/projects/framework/tests/mx/collections/AddRemoveNumbers.as 
b/frameworks/projects/framework/tests/mx/collections/AddRemoveNumbers.as
index 9269d7e..efd43f5 100644
--- a/frameworks/projects/framework/tests/mx/collections/AddRemoveNumbers.as
+++ b/frameworks/projects/framework/tests/mx/collections/AddRemoveNumbers.as
@@ -46,11 +46,11 @@ package mx.collections {
public function addNumbers():void
{
_sut.addItem(1);
-   assertEquals("Length is not one", _sut.length, 1);
-   assertEquals("First element not correct", _sut[0], 1);
+   assertEquals("Length is not one",  1, _sut.length);
+   assertEquals("First element not correct",  1, _sut[0]);
_sut.addItem(2);
-   assertEquals("Length is not two", _sut.length, 2);
-   assertEquals("Second element not correct", _sut[1], 2);
+   assertEquals("Length is not two",  2, _sut.length);
+   assertEquals("Second element not correct",  2, _sut[1]);
}

[Test]
@@ -58,10 +58,10 @@ package mx.collections {
{
addNumbers();
_sut.addItem(1);
-   assertEquals("Length is not three", _sut.length, 3);
-   assertEquals("First element not correct", _sut[0], 1);
-   assertEquals("Second element not correct", _sut[1], 2);
-   assertEquals("Second element not correct", _sut[2], 1);
+   assertEquals("Length is not three",  3, _sut.length);
+   assertEquals("First element not correct",  1, _sut[0]);
+   assertEquals("Second element not correct",  2, _sut[1]);
+   assertEquals("Second element not correct",  1, _sut[2]);
}

[Test]
@@ -70,9 +70,9 @@ package mx.collections {
addNumbers();
_sut.addItem(1);
_sut.removeItemAt(0);
-   assertEquals("Length is not two", _sut.length, 2);
-   assertEquals("First element not correct", _sut[0], 2);
-   assertEquals("Second element not correct", _sut[1], 1);
+   assertEquals("Length is not two",  2, _sut.length);
+   assertEquals("First element not correct",  2, _sut[0]);
+   assertEquals("Second element not correct",  1, _sut[1]);
}

[Test]
@@ -80,7 +80,7 @@ package mx.collections {
{
addNumbers();
_sut.removeAll();
-   assertEquals("Length is not zero", _sut.length, 0);
+   assertEquals("Length is not zero",  0, _sut.length);
}

[Test]
@@ -88,10 +88,10 @@ package mx.collections {
{
addNumbers();
_sut.removeItemAt(0);
-   assertEquals("First element not correct", _sut[0], 2);
-   

[2/5] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35037 Fixed the logic of some of the failing tests. The ones that are still failing seem to point to actual bugs.

2016-02-22 Thread mihaic
FLEX-35037
Fixed the logic of some of the failing tests. The ones that are still failing 
seem to point to actual bugs.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/1905bf31
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/1905bf31
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/1905bf31

Branch: refs/heads/develop
Commit: 1905bf319828a7d93263671e205e6a690b292f60
Parents: 192f1e3
Author: Mihai Chira 
Authored: Mon Feb 22 18:36:32 2016 +0100
Committer: Mihai Chira 
Committed: Mon Feb 22 18:36:32 2016 +0100

--
 .../tests/mx/collections/AddRemoveObjects.as| 255 +++
 .../tests/mx/collections/AddRemoveStrings.as| 157 +++-
 .../tests/mx/collections/FilterNumbers.as   |  19 +-
 .../tests/mx/collections/FilterStrings.as   |  15 +-
 4 files changed, 261 insertions(+), 185 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/1905bf31/frameworks/projects/framework/tests/mx/collections/AddRemoveObjects.as
--
diff --git 
a/frameworks/projects/framework/tests/mx/collections/AddRemoveObjects.as 
b/frameworks/projects/framework/tests/mx/collections/AddRemoveObjects.as
index 845b97a..df489f0 100644
--- a/frameworks/projects/framework/tests/mx/collections/AddRemoveObjects.as
+++ b/frameworks/projects/framework/tests/mx/collections/AddRemoveObjects.as
@@ -1,147 +1,192 @@
 package mx.collections {
-   import mx.collections.ArrayCollection;
-   
-   import org.flexunit.asserts.*;
+import org.flexunit.asserts.*;
 
-   public class AddRemoveObjects
+public class AddRemoveObjects
{   
-   protected var ac:ArrayCollection;
+   private var _sut:ArrayCollection;

-   protected var players:Array=[
+   protected var players:Array = [

{team:"TeamOne",jerseyNumber:80,lastName:"PlayerA",firstName:"Aa"},
{team:"TeamTwo",jerseyNumber:7, 
lastName:"PlayerB",firstName:"Bb"},
{team:"TeamOne",jerseyNumber:12, 
lastName:"PlayerC",firstName:"Cc"},

{team:"TeamOne",jerseyNumber:21,lastName:"PlayerD",firstName:"Dd"},
{team:"TeamThree",jerseyNumber:34, 
lastName:"PlayerE",firstName:"Ee"},
{team:"TeamOne",jerseyNumber:12, 
lastName:"PlayerF",firstName:"Ff"},
-   {team:"TeamTwo",jerseyNumber:7, 
lastName:"PlayerG",firstName:"Gg"},
+   {team:"TeamTwo",jerseyNumber:7, 
lastName:"PlayerG",firstName:"Gg"}
];

[Before]
public function setUp():void
{
-   ac = new ArrayCollection();
+   _sut = new ArrayCollection();
}

[After]
public function tearDown():void
{
-   ac = null;
+   _sut = null;
}

[Test]
public function empty():void
{
-   assertEquals(ac.length, 0);
+   assertEquals(_sut.length, 0);
}

[Test]
public function addObjects():void
{
-   ac = new ArrayCollection(players);
-   assertEquals("Length is not seven", ac.length, 7);
-   assertEquals("First element not correct", ac[0], 
players[0]);
-   assertEquals("Second element not correct", ac[1], 
players[1]);
-   assertEquals("Third element not correct", ac[2], 
players[2]);
-   assertEquals("Fouth element not correct", ac[3], 
players[3]);
-   assertEquals("Fifth element not correct", ac[4], 
players[4]);
-   assertEquals("Sixth element not correct", ac[5], 
players[5]);
-   assertEquals("Seventh element not correct", ac[6], 
players[6]);
+   _sut = new ArrayCollection(players);
+   assertEquals("Length is not seven", _sut.length, 7);
+   assertEquals("First element not correct", _sut[0], 
players[0]);
+   assertEquals("Second element not correct", _sut[1], 
players[1]);
+   assertEquals("Third element not correct", _sut[2], 
players[2]);
+   assertEquals("Fouth element not correct", _sut[3], 
players[3]);
+   assertEquals("Fifth element not correct", _sut[4], 
players[4]);
+   

[5/5] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35037 Renaming ac to _sut ("system under test") and making it private instead of protected.

2016-02-22 Thread mihaic
FLEX-35037
Renaming ac to _sut ("system under test") and making it private instead of 
protected.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/1d8d02c6
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/1d8d02c6
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/1d8d02c6

Branch: refs/heads/develop
Commit: 1d8d02c643a9d4cd911c44e867cfc42fdc80d9b5
Parents: a000600
Author: Mihai Chira 
Authored: Mon Feb 22 19:04:45 2016 +0100
Committer: Mihai Chira 
Committed: Mon Feb 22 19:04:45 2016 +0100

--
 .../tests/mx/collections/FilerAndSortNumbers.as |  95 ++--
 .../tests/mx/collections/FilerAndSortStrings.as |  95 ++--
 .../tests/mx/collections/FilterNumbers.as   | 217 
 .../tests/mx/collections/FilterStrings.as   | 273 +-
 ...rchicalCollectionViewCursor_FindAny_Tests.as | 510 +++
 .../tests/mx/collections/SortNumbers.as | 145 +++---
 .../tests/mx/collections/SortStrings.as | 227 -
 7 files changed, 1033 insertions(+), 529 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/1d8d02c6/frameworks/projects/framework/tests/mx/collections/FilerAndSortNumbers.as
--
diff --git 
a/frameworks/projects/framework/tests/mx/collections/FilerAndSortNumbers.as 
b/frameworks/projects/framework/tests/mx/collections/FilerAndSortNumbers.as
index 46a1613..85fdccc 100644
--- a/frameworks/projects/framework/tests/mx/collections/FilerAndSortNumbers.as
+++ b/frameworks/projects/framework/tests/mx/collections/FilerAndSortNumbers.as
@@ -21,30 +21,29 @@ package mx.collections {
 
 public class FilerAndSortNumbers
{
-
-protected var ac:ArrayCollection;
+private var _sut:ArrayCollection;

[Before]
public function setUp():void
{
-   ac = new ArrayCollection();
+   _sut = new ArrayCollection();
}

[After]
public function tearDown():void
{
-   ac = null;
+   _sut = null;
}


protected function addNumbers():void
{
-   ac.addItem(6);
-   ac.addItem(2);
-   ac.addItem(3);
-   ac.addItem(1);
-   ac.addItem(5);
-   ac.addItem(4);
+   _sut.addItem(6);
+   _sut.addItem(2);
+   _sut.addItem(3);
+   _sut.addItem(1);
+   _sut.addItem(5);
+   _sut.addItem(4);
}

protected function even(object:Object):Boolean
@@ -61,53 +60,53 @@ package mx.collections {
public function filterAndSortCombinations():void
{
addNumbers();
-   ac.filterFunction = even;
-   ac.sort = new Sort();
-   ac.refresh();
+   _sut.filterFunction = even;
+   _sut.sort = new Sort();
+   _sut.refresh();

-   assertEquals("Length is not three",  3, ac.length);
-   assertEquals("First element not correct",  2, ac[0]);
-   assertEquals("Second element not correct",  4, ac[1]);
-   assertEquals("Third element not correct",  6, ac[2]);
+   assertEquals("Length is not three",  3, _sut.length);
+   assertEquals("First element not correct",  2, _sut[0]);
+   assertEquals("Second element not correct",  4, _sut[1]);
+   assertEquals("Third element not correct",  6, _sut[2]);

-   ac.filterFunction = odd;
-   ac.refresh();
+   _sut.filterFunction = odd;
+   _sut.refresh();

-   assertEquals("Length is not three",  3, ac.length);
-   assertEquals("First element not correct",  1, ac[0]);
-   assertEquals("Second element not correct",  3, ac[1]);
-   assertEquals("Third element not correct",  5, ac[2]);
+   assertEquals("Length is not three",  3, _sut.length);
+   assertEquals("First element not correct",  1, _sut[0]);
+   assertEquals("Second element not correct",  3, 

git commit: [flex-sdk] [refs/heads/develop] - FLEX-34885 Testing some assumptions about how bindings work in relation to PropertyChangeEvents, because dispatches of generic PropertyChangeEvents might

2016-02-22 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 9778f4142 -> 3f7bd745a


FLEX-34885
Testing some assumptions about how bindings work in relation to 
PropertyChangeEvents, because dispatches of generic PropertyChangeEvents might 
interfere with assumptions put in for this fix. More unit tests will follow, 
specifically for interactions with lists.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/3f7bd745
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/3f7bd745
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/3f7bd745

Branch: refs/heads/develop
Commit: 3f7bd745a388cf67d356edb0f4ac9661675d6efb
Parents: 9778f41
Author: Mihai Chira 
Authored: Mon Feb 22 14:00:04 2016 +0100
Committer: Mihai Chira 
Committed: Mon Feb 22 14:00:04 2016 +0100

--
 .../mx/binding/utils/BindingUtils_Tests.as  | 201 +++
 1 file changed, 201 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/3f7bd745/frameworks/projects/framework/tests/mx/binding/utils/BindingUtils_Tests.as
--
diff --git 
a/frameworks/projects/framework/tests/mx/binding/utils/BindingUtils_Tests.as 
b/frameworks/projects/framework/tests/mx/binding/utils/BindingUtils_Tests.as
new file mode 100644
index 000..5170531
--- /dev/null
+++ b/frameworks/projects/framework/tests/mx/binding/utils/BindingUtils_Tests.as
@@ -0,0 +1,201 @@
+
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//  http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+
+
+package mx.binding.utils {
+import mx.events.PropertyChangeEvent;
+import mx.events.PropertyChangeEventKind;
+import mx.utils.ObjectUtil;
+
+import org.flexunit.asserts.assertEquals;
+import org.flexunit.asserts.assertTrue;
+
+public class BindingUtils_Tests
+{
+private static var noTimesStreetBindingTriggered:int;
+private static var noTimesStreetNumberBindingTriggered:int;
+private static var address:AddressVO;
+private static var addressWatcher:ChangeWatcher;
+private static var addressNumberWatcher:ChangeWatcher;
+private static var PROPERTY_CHANGE_EVENT:PropertyChangeEvent;
+private static var PROPERTY_CHANGE_EVENT_UPDATE:PropertyChangeEvent;
+private static var 
PROPERTY_CHANGE_EVENT_UPDATE_CONVENIENCE:PropertyChangeEvent;
+
+private static const STREET_INITIAL:String = "La Rambla";
+private static const STREET_OTHER:String = "Champs-Elysées";
+private static const STREET_NO_INITIAL:int = 23;
+private static const STREET_NO_OTHER:int = 54;
+
+[Before]
+public function setUp():void
+{
+noTimesStreetBindingTriggered = 0;
+noTimesStreetNumberBindingTriggered = 0;
+
+PROPERTY_CHANGE_EVENT = new 
PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE);
+PROPERTY_CHANGE_EVENT_UPDATE = new 
PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE, false, false, 
PropertyChangeEventKind.UPDATE);
+PROPERTY_CHANGE_EVENT_UPDATE_CONVENIENCE = 
PropertyChangeEvent.createUpdateEvent(null, null, null, null);
+
+address = new AddressVO(STREET_INITIAL, STREET_NO_INITIAL);
+
+addressWatcher = BindingUtils.bindSetter(setStreet, address, 
"street", false, false);
+addressNumberWatcher = BindingUtils.bindSetter(setStreetNumber, 
address, "number", false, false);
+}
+
+[After]
+public function tearDown():void
+{
+addressWatcher.unwatch();
+addressNumberWatcher.unwatch();
+
+PROPERTY_CHANGE_EVENT = null;
+PROPERTY_CHANGE_EVENT_UPDATE = null;
+PROPERTY_CHANGE_EVENT_UPDATE_CONVENIENCE = null;
+}
+
+[Test]
+public function 

git commit: [flex-sdk] [refs/heads/develop] - FLEX-33058 Lengthened the test's timeout.

2016-02-22 Thread mihaic
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 22f81c478 -> 58a2e5dfb


FLEX-33058
Lengthened the test's timeout.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/58a2e5df
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/58a2e5df
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/58a2e5df

Branch: refs/heads/develop
Commit: 58a2e5dfb5a400785d8fe31918c26787bbb9e6bb
Parents: 22f81c4
Author: Mihai Chira 
Authored: Mon Feb 22 10:24:30 2016 +0100
Committer: Mihai Chira 
Committed: Mon Feb 22 10:24:30 2016 +0100

--
 .../advancedgrids/tests/mx/controls/FLEX_33058_Tests.as  | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/58a2e5df/frameworks/projects/advancedgrids/tests/mx/controls/FLEX_33058_Tests.as
--
diff --git 
a/frameworks/projects/advancedgrids/tests/mx/controls/FLEX_33058_Tests.as 
b/frameworks/projects/advancedgrids/tests/mx/controls/FLEX_33058_Tests.as
index 67145bd..8884095 100644
--- a/frameworks/projects/advancedgrids/tests/mx/controls/FLEX_33058_Tests.as
+++ b/frameworks/projects/advancedgrids/tests/mx/controls/FLEX_33058_Tests.as
@@ -69,7 +69,7 @@ package mx.controls {
 noEnterFramesRemaining = NaN;
 }
 
-[Test(async, timeout=500)]
+[Test(async, timeout=1000)]
 public function test_sorting_doesnt_throw_fatal():void
 {
 //given
@@ -81,7 +81,7 @@ package mx.controls {
 //then wait a few frames
 noEnterFramesRemaining = NO_ENTER_FRAMES_TO_ALLOW;
 UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, 
onEnterFrame);
-Async.handleEvent(this, _finishNotifier, Event.COMPLETE, 
onGridAddedToStage);
+Async.handleEvent(this, _finishNotifier, Event.COMPLETE, 
onGridAddedToStage, 300);
 }
 
 private function onGridAddedToStage(event:Event, 
passThroughData:Object):void
@@ -92,7 +92,7 @@ package mx.controls {
 //then - wait a few more frames
 noEnterFramesRemaining = NO_ENTER_FRAMES_TO_ALLOW;
 UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, 
onEnterFrame);
-Async.handleEvent(this, _finishNotifier, Event.COMPLETE, 
onGridDrawn);
+Async.handleEvent(this, _finishNotifier, Event.COMPLETE, 
onGridDrawn, 300);
 }
 
 private function onGridDrawn(event:Event, passThroughData:Object):void
@@ -106,7 +106,7 @@ package mx.controls {
 //then - wait a few more frames
 noEnterFramesRemaining = NO_ENTER_FRAMES_TO_ALLOW;
 UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, 
onEnterFrame);
-Async.handleEvent(this, _finishNotifier, Event.COMPLETE, 
onGridSetupComplete);
+Async.handleEvent(this, _finishNotifier, Event.COMPLETE, 
onGridSetupComplete, 300);
 }
 
 private static function onGridSetupComplete(event:Event, 
passThroughData:Object):void



[3/7] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35031 -Added more unit tests for ObjectUtil.getEnumerableProperties. -Added the option of specifying whether strict equality should be used in

2016-02-17 Thread mihaic
FLEX-35031
-Added more unit tests for ObjectUtil.getEnumerableProperties.
-Added the option of specifying whether strict equality should be used in 
ArrayUtil.arraysMatch() and ArrayUtil.arrayValuesMatch(), or just a regular 
equality check.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/7a0e9eb9
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/7a0e9eb9
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/7a0e9eb9

Branch: refs/heads/develop
Commit: 7a0e9eb9f2ec1e8e169652f31bd0512909e7b5b9
Parents: 680b405
Author: Mihai Chira 
Authored: Wed Feb 17 13:56:00 2016 +0100
Committer: Mihai Chira 
Committed: Wed Feb 17 13:56:00 2016 +0100

--
 .../framework/src/mx/utils/ArrayUtil.as | 22 +++--
 .../framework/tests/mx/utils/ArrayUtil_Tests.as | 29 +---
 .../tests/mx/utils/ObjectUtil_Tests.as  | 49 ++--
 3 files changed, 85 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/7a0e9eb9/frameworks/projects/framework/src/mx/utils/ArrayUtil.as
--
diff --git a/frameworks/projects/framework/src/mx/utils/ArrayUtil.as 
b/frameworks/projects/framework/src/mx/utils/ArrayUtil.as
index 85ec79c..5fd30d9 100644
--- a/frameworks/projects/framework/src/mx/utils/ArrayUtil.as
+++ b/frameworks/projects/framework/src/mx/utils/ArrayUtil.as
@@ -110,10 +110,13 @@ public class ArrayUtil
 
 /**
  *  Checks if the Array instances contain the same values
- *  against the same indexes.
+ *  against the same indexes, even if in different orders.
  *
  *  @param a The first Array instance.
  *  @param b The second Array instance.
+ *  @param strictEqualityCheck true if we should compare the
+ *  values of the two Arrays using the strict equality
+ *  operator (===) or not (==).
  *  @return true if the two Arrays contain the same values
  *  (determined using the strict equality operator) associated
  *  with the same indexes.
@@ -123,7 +126,7 @@ public class ArrayUtil
  *  @playerversion AIR 1.1
  *  @productversion Flex 3
  */
-public static function arraysMatch(a:Array, b:Array):Boolean
+public static function arraysMatch(a:Array, b:Array, 
strictEqualityCheck:Boolean = true):Boolean
 {
 if(!a || !b)
 return false;
@@ -137,7 +140,13 @@ public class ArrayUtil
 {
 var index:String = indexesA[i];
 
-if(!b.hasOwnProperty(index) || a[index] !== b[index])
+if(!b.hasOwnProperty(index))
+return false;
+
+if(strictEqualityCheck && a[index] !== b[index])
+return false;
+
+if(!strictEqualityCheck && a[index] != b[index])
 return false;
 }
 
@@ -150,6 +159,9 @@ public class ArrayUtil
  *
  *  @param a The first Array instance.
  *  @param b The second Array instance.
+ *  @param strictEqualityCheck true if we should compare the
+ *  values of the two Arrays using the strict equality
+ *  operator (===) or not (==).
  *  @return true if the two Arrays contain the same values.
  *
  *  @langversion 3.0
@@ -157,7 +169,7 @@ public class ArrayUtil
  *  @playerversion AIR 1.1
  *  @productversion Flex 3
  */
-public static function arrayValuesMatch(a:Array, b:Array):Boolean
+public static function arrayValuesMatch(a:Array, b:Array, 
strictEqualityCheck:Boolean = true):Boolean
 {
 if(!a || !b)
 return false;
@@ -168,7 +180,7 @@ public class ArrayUtil
 var valuesOfB:Array = getArrayValues(b);
 valuesOfB.sort();
 
-return arraysMatch(valuesOfA, valuesOfB);
+return arraysMatch(valuesOfA, valuesOfB, strictEqualityCheck);
 }
 
 /**

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/7a0e9eb9/frameworks/projects/framework/tests/mx/utils/ArrayUtil_Tests.as
--
diff --git a/frameworks/projects/framework/tests/mx/utils/ArrayUtil_Tests.as 
b/frameworks/projects/framework/tests/mx/utils/ArrayUtil_Tests.as
index d11f468..36c8b84 100644
--- a/frameworks/projects/framework/tests/mx/utils/ArrayUtil_Tests.as
+++ b/frameworks/projects/framework/tests/mx/utils/ArrayUtil_Tests.as
@@ -114,22 +114,37 @@ package mx.utils
 public function 
test_arrays_match_when_indexes_expressed_in_string_and_int():void
 {
 //given
+var arrayA:Array = ["value", "value"];
+var arrayB:Array = [];
+
+//when
+arrayB["0"] = "value";
+arrayB["1"] = "value";
+
+//then
+

[5/7] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35031 FLEX-33058 Clarifying intent by renaming function and changing the order of its parameters.

2016-02-17 Thread mihaic
FLEX-35031 FLEX-33058
Clarifying intent by renaming function and changing the order of its parameters.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/e255d6d8
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/e255d6d8
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/e255d6d8

Branch: refs/heads/develop
Commit: e255d6d87f59ade95cb43285504f2097b41bd820
Parents: 94d038a
Author: Mihai Chira 
Authored: Wed Feb 17 15:08:47 2016 +0100
Committer: Mihai Chira 
Committed: Wed Feb 17 15:08:47 2016 +0100

--
 .../src/mx/collections/HierarchicalCollectionViewCursor.as | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e255d6d8/frameworks/projects/advancedgrids/src/mx/collections/HierarchicalCollectionViewCursor.as
--
diff --git 
a/frameworks/projects/advancedgrids/src/mx/collections/HierarchicalCollectionViewCursor.as
 
b/frameworks/projects/advancedgrids/src/mx/collections/HierarchicalCollectionViewCursor.as
index a55db72..dfe45a0 100644
--- 
a/frameworks/projects/advancedgrids/src/mx/collections/HierarchicalCollectionViewCursor.as
+++ 
b/frameworks/projects/advancedgrids/src/mx/collections/HierarchicalCollectionViewCursor.as
@@ -324,7 +324,7 @@ public class HierarchicalCollectionViewCursor extends 
EventDispatcher
 var done:Boolean = false;
 while (!done)
 {
-if (objectMatchesValues(hierarchicalData.getData(current), 
valuesToMatch))
+if (valuesAreSubsetOfObject(valuesToMatch, 
hierarchicalData.getData(current)))
 return true;
 
 done = !moveNext();
@@ -333,7 +333,7 @@ public class HierarchicalCollectionViewCursor extends 
EventDispatcher
 return false;
 }
 
-private static function objectMatchesValues(object:Object, 
values:Object):Boolean
+private static function valuesAreSubsetOfObject(values:Object, 
object:Object):Boolean
 {
 if(!object && !values)
 return true;
@@ -393,7 +393,7 @@ public class HierarchicalCollectionViewCursor extends 
EventDispatcher
 var done:Boolean = false;
 while (!done)
 {
-if (objectMatchesValues(hierarchicalData.getData(current), 
valuesToMatch))
+if (valuesAreSubsetOfObject(valuesToMatch, 
hierarchicalData.getData(current)))
 return true;
 
 done = !movePrevious();



  1   2   3   >