Return-Path: X-Original-To: apmail-flex-commits-archive@www.apache.org Delivered-To: apmail-flex-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3D29810B35 for ; Mon, 29 Dec 2014 09:57:51 +0000 (UTC) Received: (qmail 73507 invoked by uid 500); 29 Dec 2014 09:57:51 -0000 Delivered-To: apmail-flex-commits-archive@flex.apache.org Received: (qmail 73480 invoked by uid 500); 29 Dec 2014 09:57:51 -0000 Mailing-List: contact commits-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list commits@flex.apache.org Received: (qmail 73472 invoked by uid 99); 29 Dec 2014 09:57:51 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Dec 2014 09:57:51 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 1C9AB92076C; Mon, 29 Dec 2014 09:57:51 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: harbs@apache.org To: commits@flex.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: [flex-tlf] [refs/heads/develop] - Fixed issues that were causing tests to fail/error Date: Mon, 29 Dec 2014 09:57:51 +0000 (UTC) Repository: flex-tlf Updated Branches: refs/heads/develop 57643c227 -> 12bcabb18 Fixed issues that were causing tests to fail/error Project: http://git-wip-us.apache.org/repos/asf/flex-tlf/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-tlf/commit/12bcabb1 Tree: http://git-wip-us.apache.org/repos/asf/flex-tlf/tree/12bcabb1 Diff: http://git-wip-us.apache.org/repos/asf/flex-tlf/diff/12bcabb1 Branch: refs/heads/develop Commit: 12bcabb188217dcd0e485c60c71e6ee885cf7633 Parents: 57643c2 Author: Harbs Authored: Mon Dec 29 11:57:39 2014 +0200 Committer: Harbs Committed: Mon Dec 29 11:57:39 2014 +0200 ---------------------------------------------------------------------- textLayout/src/flashx/textLayout/elements/ParagraphElement.as | 6 +++++- textLayout/src/flashx/textLayout/elements/SpanElement.as | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/12bcabb1/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 b6121bd..e7e3e7c 100644 --- a/textLayout/src/flashx/textLayout/elements/ParagraphElement.as +++ b/textLayout/src/flashx/textLayout/elements/ParagraphElement.as @@ -535,6 +535,10 @@ package flashx.textLayout.elements CONFIG::debug { Debugging.traceFTECall(gc,null,"new Vector.") } gc.push(block); CONFIG::debug { Debugging.traceFTECall(null,gc,"push",block); } + // If elements in the middle (i.e. ones in the process of being added) were missed, the idx can be too high. + // The missed ones will be inserted later. + if(idx > group.elementCount) + idx = group.elementCount; group.replaceElements(idx,idx,gc); CONFIG::debug { Debugging.traceFTECall(null,group,"replaceElements",idx,idx,gc); } } @@ -581,7 +585,7 @@ package flashx.textLayout.elements if(_terminatorSpan) { var termIdx:int = getChildIndex(_terminatorSpan); - if(termIdx !=0 && _terminatorSpan.textLength == 1) + if(termIdx > 0 && _terminatorSpan.textLength == 1) { super.replaceChildren(termIdx, termIdx+1); _terminatorSpan = null; http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/12bcabb1/textLayout/src/flashx/textLayout/elements/SpanElement.as ---------------------------------------------------------------------- diff --git a/textLayout/src/flashx/textLayout/elements/SpanElement.as b/textLayout/src/flashx/textLayout/elements/SpanElement.as index 9e37058..3bae423 100644 --- a/textLayout/src/flashx/textLayout/elements/SpanElement.as +++ b/textLayout/src/flashx/textLayout/elements/SpanElement.as @@ -76,7 +76,7 @@ package flashx.textLayout.elements /** @private */ override tlf_internal function createContentElement():void { - if (_blockElement) + if (_blockElement && _blockElement.textBlock) return; computedFormat; // BEFORE creating the element