You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pi...@apache.org on 2014/06/06 07:11:46 UTC

[1/7] git commit: [flex-tlf] [refs/heads/master] - handle 0x2028 line separator

Repository: flex-tlf
Updated Branches:
  refs/heads/master 3b7adac46 -> e10a51adc


handle 0x2028 line separator


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

Branch: refs/heads/master
Commit: 53a58595e4859226e20798b6a337540c6bce0d7e
Parents: 3b7adac
Author: Alex Harui <ah...@apache.org>
Authored: Thu Oct 10 23:22:57 2013 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Oct 10 23:23:38 2013 -0700

----------------------------------------------------------------------
 textLayout/src/flashx/textLayout/elements/ParagraphElement.as | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/53a58595/textLayout/src/flashx/textLayout/elements/ParagraphElement.as
----------------------------------------------------------------------
diff --git a/textLayout/src/flashx/textLayout/elements/ParagraphElement.as b/textLayout/src/flashx/textLayout/elements/ParagraphElement.as
index f8fea72..896f873 100644
--- a/textLayout/src/flashx/textLayout/elements/ParagraphElement.as
+++ b/textLayout/src/flashx/textLayout/elements/ParagraphElement.as
@@ -488,6 +488,9 @@ package flashx.textLayout.elements
 					tl = tl.previousLine;
 					if (!tl)
 						return -1;
+					// need this when 0x2028 line separator in use
+					if (tl.textBlockBeginIndex + tl.rawTextLength == relativePosition)
+						return tl.textBlockBeginIndex + tl.rawTextLength - 1;
 					return tl.textBlockBeginIndex + tl.rawTextLength;
 				}
 				while (--relativePosition)


[5/7] git commit: [flex-tlf] [refs/heads/master] - No need for this file

Posted by pi...@apache.org.
No need for this file


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

Branch: refs/heads/master
Commit: 653c94080ed93e42c2878bc4fa7e19a181548496
Parents: 65cf758
Author: Justin Mclean <jm...@apache.org>
Authored: Thu Feb 13 12:37:08 2014 +1100
Committer: Justin Mclean <jm...@apache.org>
Committed: Thu Feb 13 12:37:08 2014 +1100

----------------------------------------------------------------------
 readme.txt | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/653c9408/readme.txt
----------------------------------------------------------------------
diff --git a/readme.txt b/readme.txt
deleted file mode 100644
index c1013d6..0000000
--- a/readme.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is a under-development branch with table feature
\ No newline at end of file


[7/7] git commit: [flex-tlf] [refs/heads/master] - FLEX-34098 and FLEX-33985: Fix more cases in the discretionary hyphens workaround

Posted by pi...@apache.org.
FLEX-34098 and FLEX-33985:  Fix more cases in the discretionary hyphens workaround


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

Branch: refs/heads/master
Commit: e10a51adc5e91d21a34adc157e862b80a6071b0d
Parents: 8dc66d8
Author: Alex Harui <ah...@apache.org>
Authored: Mon Mar 17 13:24:27 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Mar 17 13:24:27 2014 -0700

----------------------------------------------------------------------
 .../src/flashx/textLayout/elements/ParagraphElement.as  | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/e10a51ad/textLayout/src/flashx/textLayout/elements/ParagraphElement.as
----------------------------------------------------------------------
diff --git a/textLayout/src/flashx/textLayout/elements/ParagraphElement.as b/textLayout/src/flashx/textLayout/elements/ParagraphElement.as
index c2d343b..f4579fc 100644
--- a/textLayout/src/flashx/textLayout/elements/ParagraphElement.as
+++ b/textLayout/src/flashx/textLayout/elements/ParagraphElement.as
@@ -481,10 +481,10 @@ package flashx.textLayout.elements
 			if (ContainerController.tlf_internal::usesDiscretionaryHyphens)
 			{
 				var textBlock:TextBlock = getTextBlock();
-                var isRTL:Boolean = textBlock.bidiLevel == 1;
 				var tl:TextLine = textBlock.getTextLineAtCharIndex(relativePosition);
 				var currentAtomIndex:int = tl.getAtomIndexAtCharIndex(relativePosition);
                 //trace("relpos", relativePosition, "atomIndex", currentAtomIndex);
+                var isRTL:Boolean = tl.getAtomBidiLevel(currentAtomIndex) == 1;
                 if (isRTL)
                 {
                    var foo:int = getTextBlock().findPreviousAtomBoundary(relativePosition);
@@ -509,6 +509,8 @@ package flashx.textLayout.elements
                                break;
                        }
                    }
+                   if (CharacterUtil.isLowSurrogate(getText(relativePosition, relativePosition + 1).charCodeAt(0)))
+                       relativePosition--;
                    //trace("previous", relativePosition, foo);
                 }
                 else
@@ -528,6 +530,8 @@ package flashx.textLayout.elements
     					if (tl.getAtomIndexAtCharIndex(relativePosition) < currentAtomIndex)
     						break;
     				}
+                    if (CharacterUtil.isLowSurrogate(getText(relativePosition, relativePosition + 1).charCodeAt(0)))
+                        relativePosition--;
                 }
 				return relativePosition;
 			}
@@ -559,10 +563,10 @@ package flashx.textLayout.elements
 			if (ContainerController.tlf_internal::usesDiscretionaryHyphens)
 			{
 				var textBlock:TextBlock = getTextBlock();
-                var isRTL:Boolean = textBlock.bidiLevel == 1;
 				var tl:TextLine = textBlock.getTextLineAtCharIndex(relativePosition);
 				var currentAtomIndex:int = tl.getAtomIndexAtCharIndex(relativePosition);
                 //trace("relpos", relativePosition, "atomIndex", currentAtomIndex);
+                var isRTL:Boolean = tl.getAtomBidiLevel(currentAtomIndex) == 1;
                 if (isRTL)
                 {
                     var foo:int = getTextBlock().findNextAtomBoundary(relativePosition);
@@ -582,6 +586,8 @@ package flashx.textLayout.elements
                                 break;
                         }
                     }
+                    if (CharacterUtil.isHighSurrogate(getText(relativePosition, relativePosition + 1).charCodeAt(0)))
+                        relativePosition++;
                     //trace("next", relativePosition, foo);
                 }
                 else
@@ -598,6 +604,8 @@ package flashx.textLayout.elements
     					if (tl.getAtomIndexAtCharIndex(relativePosition) > currentAtomIndex)
     						break;
     				}
+                    if (CharacterUtil.isHighSurrogate(getText(relativePosition, relativePosition + 1).charCodeAt(0)))
+                        relativePosition++;
                 }
 				return relativePosition;
 			}


[2/7] git commit: [flex-tlf] [refs/heads/master] - FLEX-34020 In TLF truncation, these static variables got re-used by the various attempts at composing different lengths of text to see what would fit. Changed to instance vars and all tests still passed

Posted by pi...@apache.org.
FLEX-34020 In TLF truncation, these static variables got re-used by the various attempts at composing different lengths of text to see what would fit.  Changed to instance vars and all tests still passed.


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

Branch: refs/heads/master
Commit: f8c8369543a5a92f0727cce8330de8d4ecf8670c
Parents: 53a5859
Author: Alex Harui <ah...@apache.org>
Authored: Sun Feb 9 22:54:14 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Sun Feb 9 22:54:14 2014 -0800

----------------------------------------------------------------------
 textLayout/src/flashx/textLayout/factory/TextLineFactoryBase.as | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/f8c83695/textLayout/src/flashx/textLayout/factory/TextLineFactoryBase.as
----------------------------------------------------------------------
diff --git a/textLayout/src/flashx/textLayout/factory/TextLineFactoryBase.as b/textLayout/src/flashx/textLayout/factory/TextLineFactoryBase.as
index b738cac..c59999b 100644
--- a/textLayout/src/flashx/textLayout/factory/TextLineFactoryBase.as
+++ b/textLayout/src/flashx/textLayout/factory/TextLineFactoryBase.as
@@ -84,9 +84,9 @@ package flashx.textLayout.factory
 		static tlf_internal var _factoryComposer:SimpleCompose;
 
 		/** @private */		
-		static protected var _truncationLineIndex:int; 	// used during truncation
+		protected var _truncationLineIndex:int; 	// used during truncation
 		/** @private */		
-		static protected var _pass0Lines:Array; 		// used during truncation
+		protected var _pass0Lines:Array; 		// used during truncation
 		
 		/** @private return the next factory composer that will be used */
 		static tlf_internal function peekFactoryCompose():SimpleCompose


[6/7] git commit: [flex-tlf] [refs/heads/master] - comment out trace statements

Posted by pi...@apache.org.
comment out trace statements


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

Branch: refs/heads/master
Commit: 8dc66d8c94d852ced1fca5fbc5868be6b4e3daa6
Parents: 653c940
Author: Alex Harui <ah...@apache.org>
Authored: Wed Mar 12 19:07:24 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Mar 12 19:08:07 2014 -0700

----------------------------------------------------------------------
 .../src/flashx/textLayout/elements/ParagraphElement.as  | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/8dc66d8c/textLayout/src/flashx/textLayout/elements/ParagraphElement.as
----------------------------------------------------------------------
diff --git a/textLayout/src/flashx/textLayout/elements/ParagraphElement.as b/textLayout/src/flashx/textLayout/elements/ParagraphElement.as
index fbf2e68..c2d343b 100644
--- a/textLayout/src/flashx/textLayout/elements/ParagraphElement.as
+++ b/textLayout/src/flashx/textLayout/elements/ParagraphElement.as
@@ -484,7 +484,7 @@ package flashx.textLayout.elements
                 var isRTL:Boolean = textBlock.bidiLevel == 1;
 				var tl:TextLine = textBlock.getTextLineAtCharIndex(relativePosition);
 				var currentAtomIndex:int = tl.getAtomIndexAtCharIndex(relativePosition);
-                trace("relpos", relativePosition, "atomIndex", currentAtomIndex);
+                //trace("relpos", relativePosition, "atomIndex", currentAtomIndex);
                 if (isRTL)
                 {
                    var foo:int = getTextBlock().findPreviousAtomBoundary(relativePosition);
@@ -509,7 +509,7 @@ package flashx.textLayout.elements
                                break;
                        }
                    }
-                   trace("previous", relativePosition, foo);
+                   //trace("previous", relativePosition, foo);
                 }
                 else
                 {
@@ -532,7 +532,7 @@ package flashx.textLayout.elements
 				return relativePosition;
 			}
             var pos:int = getTextBlock().findPreviousAtomBoundary(relativePosition);
-            trace("previous", relativePosition, pos);
+            //trace("previous", relativePosition, pos);
 			return pos;
 		}
 
@@ -562,7 +562,7 @@ package flashx.textLayout.elements
                 var isRTL:Boolean = textBlock.bidiLevel == 1;
 				var tl:TextLine = textBlock.getTextLineAtCharIndex(relativePosition);
 				var currentAtomIndex:int = tl.getAtomIndexAtCharIndex(relativePosition);
-                trace("relpos", relativePosition, "atomIndex", currentAtomIndex);
+                //trace("relpos", relativePosition, "atomIndex", currentAtomIndex);
                 if (isRTL)
                 {
                     var foo:int = getTextBlock().findNextAtomBoundary(relativePosition);
@@ -582,7 +582,7 @@ package flashx.textLayout.elements
                                 break;
                         }
                     }
-                    trace("next", relativePosition, foo);
+                    //trace("next", relativePosition, foo);
                 }
                 else
                 {
@@ -602,7 +602,7 @@ package flashx.textLayout.elements
 				return relativePosition;
 			}
 			var pos:int = getTextBlock().findNextAtomBoundary(relativePosition);
-            trace("next", relativePosition, pos);
+            //trace("next", relativePosition, pos);
             return pos;
 		}
 		


[4/7] git commit: [flex-tlf] [refs/heads/master] - No need forthis file as we're now a top level project

Posted by pi...@apache.org.
No need forthis file as we're now a top level project


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

Branch: refs/heads/master
Commit: 65cf758b6f2686e5b7da7c3bcd2c985cf844fe18
Parents: db303b5
Author: Justin Mclean <jm...@apache.org>
Authored: Thu Feb 13 12:36:39 2014 +1100
Committer: Justin Mclean <jm...@apache.org>
Committed: Thu Feb 13 12:36:39 2014 +1100

----------------------------------------------------------------------
 DISCLAIMER | 8 --------
 1 file changed, 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/65cf758b/DISCLAIMER
----------------------------------------------------------------------
diff --git a/DISCLAIMER b/DISCLAIMER
deleted file mode 100644
index 46661d6..0000000
--- a/DISCLAIMER
+++ /dev/null
@@ -1,8 +0,0 @@
-Apache Flex is an effort undergoing incubation at The Apache 
-Software Foundation (ASF), sponsored by the Apache Incubator. 
-Incubation is required of all newly accepted projects until a further 
-review indicates that the infrastructure, communications, and decision 
-making process have stabilized in a manner consistent with other 
-successful ASF projects. While incubation status is not necessarily a 
-reflection of the completeness or stability of the code, it does indicate 
-that the project has yet to be fully endorsed by the ASF.


[3/7] git commit: [flex-tlf] [refs/heads/master] - FLEX-33985 In RTL text, computing the next/previous atom is much more tricky

Posted by pi...@apache.org.
FLEX-33985 In RTL text, computing the next/previous atom is much more tricky


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

Branch: refs/heads/master
Commit: db303b5410522441a7afaeb7553bb4222735ecaf
Parents: f8c8369
Author: Alex Harui <ah...@apache.org>
Authored: Sun Feb 9 22:55:19 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Sun Feb 9 22:55:19 2014 -0800

----------------------------------------------------------------------
 .../textLayout/elements/ParagraphElement.as     | 119 ++++++++++++++-----
 1 file changed, 90 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/db303b54/textLayout/src/flashx/textLayout/elements/ParagraphElement.as
----------------------------------------------------------------------
diff --git a/textLayout/src/flashx/textLayout/elements/ParagraphElement.as b/textLayout/src/flashx/textLayout/elements/ParagraphElement.as
index 896f873..fbf2e68 100644
--- a/textLayout/src/flashx/textLayout/elements/ParagraphElement.as
+++ b/textLayout/src/flashx/textLayout/elements/ParagraphElement.as
@@ -481,26 +481,59 @@ package flashx.textLayout.elements
 			if (ContainerController.tlf_internal::usesDiscretionaryHyphens)
 			{
 				var textBlock:TextBlock = getTextBlock();
+                var isRTL:Boolean = textBlock.bidiLevel == 1;
 				var tl:TextLine = textBlock.getTextLineAtCharIndex(relativePosition);
 				var currentAtomIndex:int = tl.getAtomIndexAtCharIndex(relativePosition);
-				if (currentAtomIndex == 0)
-				{
-					tl = tl.previousLine;
-					if (!tl)
-						return -1;
-					// need this when 0x2028 line separator in use
-					if (tl.textBlockBeginIndex + tl.rawTextLength == relativePosition)
-						return tl.textBlockBeginIndex + tl.rawTextLength - 1;
-					return tl.textBlockBeginIndex + tl.rawTextLength;
-				}
-				while (--relativePosition)
-				{
-					if (tl.getAtomIndexAtCharIndex(relativePosition) < currentAtomIndex)
-						break;
-				}
+                trace("relpos", relativePosition, "atomIndex", currentAtomIndex);
+                if (isRTL)
+                {
+                   var foo:int = getTextBlock().findPreviousAtomBoundary(relativePosition);
+                   if (currentAtomIndex == 0)
+                   {
+                       // when cursor is left of all characters (end of line)
+                       // atomIndex is 0, so compensate
+                       if (tl.atomCount > 0)
+                       {
+                           while (--relativePosition)
+                           {
+                               if (tl.getAtomIndexAtCharIndex(relativePosition) != currentAtomIndex)
+                                   break;
+                           }
+                       }
+                   }
+                   else
+                   {
+                       while (--relativePosition)
+                       {
+                           if (tl.getAtomIndexAtCharIndex(relativePosition) != currentAtomIndex)
+                               break;
+                       }
+                   }
+                   trace("previous", relativePosition, foo);
+                }
+                else
+                {
+    				if (currentAtomIndex == 0)
+    				{
+    					tl = tl.previousLine;
+    					if (!tl)
+    						return -1;
+    					// need this when 0x2028 line separator in use
+    					if (tl.textBlockBeginIndex + tl.rawTextLength == relativePosition)
+    						return tl.textBlockBeginIndex + tl.rawTextLength - 1;
+    					return tl.textBlockBeginIndex + tl.rawTextLength;
+    				}
+    				while (--relativePosition)
+    				{
+    					if (tl.getAtomIndexAtCharIndex(relativePosition) < currentAtomIndex)
+    						break;
+    				}
+                }
 				return relativePosition;
 			}
-			return getTextBlock().findPreviousAtomBoundary(relativePosition);
+            var pos:int = getTextBlock().findPreviousAtomBoundary(relativePosition);
+            trace("previous", relativePosition, pos);
+			return pos;
 		}
 
 		/** 
@@ -526,23 +559,51 @@ package flashx.textLayout.elements
 			if (ContainerController.tlf_internal::usesDiscretionaryHyphens)
 			{
 				var textBlock:TextBlock = getTextBlock();
+                var isRTL:Boolean = textBlock.bidiLevel == 1;
 				var tl:TextLine = textBlock.getTextLineAtCharIndex(relativePosition);
 				var currentAtomIndex:int = tl.getAtomIndexAtCharIndex(relativePosition);
-				if (currentAtomIndex == tl.atomCount - 1)
-				{
-					tl = tl.nextLine;
-					if (!tl)
-						return -1;
-					return tl.textBlockBeginIndex;
-				}
-				while (++relativePosition)
-				{
-					if (tl.getAtomIndexAtCharIndex(relativePosition) > currentAtomIndex)
-						break;
-				}
+                trace("relpos", relativePosition, "atomIndex", currentAtomIndex);
+                if (isRTL)
+                {
+                    var foo:int = getTextBlock().findNextAtomBoundary(relativePosition);
+                    if (currentAtomIndex == 0)
+                    {
+                        while (++relativePosition)
+                        {
+                            if (tl.getAtomIndexAtCharIndex(relativePosition) != currentAtomIndex)
+                                break;
+                        }
+                    }
+                    else
+                    {
+                        while (++relativePosition)
+                        {
+                            if (tl.getAtomIndexAtCharIndex(relativePosition) != currentAtomIndex)
+                                break;
+                        }
+                    }
+                    trace("next", relativePosition, foo);
+                }
+                else
+                {
+    				if (currentAtomIndex == tl.atomCount - 1)
+    				{
+    					tl = tl.nextLine;
+    					if (!tl)
+    						return -1;
+    					return tl.textBlockBeginIndex;
+    				}
+    				while (++relativePosition)
+    				{
+    					if (tl.getAtomIndexAtCharIndex(relativePosition) > currentAtomIndex)
+    						break;
+    				}
+                }
 				return relativePosition;
 			}
-			return getTextBlock().findNextAtomBoundary(relativePosition);
+			var pos:int = getTextBlock().findNextAtomBoundary(relativePosition);
+            trace("next", relativePosition, pos);
+            return pos;
 		}
 		
 		/** @private */