Return-Path: X-Original-To: apmail-corinthia-commits-archive@minotaur.apache.org Delivered-To: apmail-corinthia-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5421018B18 for ; Fri, 14 Aug 2015 16:10:59 +0000 (UTC) Received: (qmail 6540 invoked by uid 500); 14 Aug 2015 16:10:53 -0000 Delivered-To: apmail-corinthia-commits-archive@corinthia.apache.org Received: (qmail 6519 invoked by uid 500); 14 Aug 2015 16:10:53 -0000 Mailing-List: contact commits-help@corinthia.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@corinthia.incubator.apache.org Delivered-To: mailing list commits@corinthia.incubator.apache.org Received: (qmail 6510 invoked by uid 99); 14 Aug 2015 16:10:52 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Aug 2015 16:10:52 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 632AA19D212 for ; Fri, 14 Aug 2015 16:10:52 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.774 X-Spam-Level: * X-Spam-Status: No, score=1.774 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.006] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id XHW3Z2PLJgh2 for ; Fri, 14 Aug 2015 16:10:39 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with SMTP id 0779425444 for ; Fri, 14 Aug 2015 16:10:14 +0000 (UTC) Received: (qmail 3673 invoked by uid 99); 14 Aug 2015 16:10:10 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Aug 2015 16:10:10 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 44AA0DFBA7; Fri, 14 Aug 2015 16:10:10 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jani@apache.org To: commits@corinthia.incubator.apache.org Date: Fri, 14 Aug 2015 16:10:45 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [38/51] [abbrv] [partial] incubator-corinthia git commit: added js test files http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint02c-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint02c-input.html b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint02c-input.html new file mode 100644 index 0000000..342cf7a --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint02c-input.html @@ -0,0 +1,15 @@ + + + + + + +

Sam[ple text]

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint03a-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint03a-expected.html b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint03a-expected.html new file mode 100644 index 0000000..7c3ef20 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint03a-expected.html @@ -0,0 +1,8 @@ + + + +

Sam

+ [] +

xt

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint03a-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint03a-input.html b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint03a-input.html new file mode 100644 index 0000000..cf4a8d0 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint03a-input.html @@ -0,0 +1,20 @@ + + + + + + +

Sam[ple te]xt

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint03b-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint03b-expected.html b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint03b-expected.html new file mode 100644 index 0000000..5d9a930 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint03b-expected.html @@ -0,0 +1,10 @@ + + + + + + [] +

xt

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint03b-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint03b-input.html b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint03b-input.html new file mode 100644 index 0000000..a12724e --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint03b-input.html @@ -0,0 +1,20 @@ + + + + + + +

4 [Sample te]xt

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint03c-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint03c-expected.html b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint03c-expected.html new file mode 100644 index 0000000..b229ce8 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint03c-expected.html @@ -0,0 +1,10 @@ + + + + + +

Sam

+ [] + + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint03c-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint03c-input.html b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint03c-input.html new file mode 100644 index 0000000..cadf465 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint03c-input.html @@ -0,0 +1,20 @@ + + + + + + +

4 Sam[ple text]

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint04-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint04-expected.html b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint04-expected.html new file mode 100644 index 0000000..6805b40 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint04-expected.html @@ -0,0 +1,8 @@ + + + +

Sam

+ [] +

xt

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint04-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint04-input.html b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint04-input.html new file mode 100644 index 0000000..d2667d0 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint04-input.html @@ -0,0 +1,15 @@ + + + + + + +

Sam[ple te]xt

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint05a-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint05a-expected.html b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint05a-expected.html new file mode 100644 index 0000000..4dd1d56 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint05a-expected.html @@ -0,0 +1,8 @@ + + + +

Sam

+ [] +

xt

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint05a-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint05a-input.html b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint05a-input.html new file mode 100644 index 0000000..0baeeac --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint05a-input.html @@ -0,0 +1,15 @@ + + + + + + +

Sam[ple te]xt

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint05b-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint05b-expected.html b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint05b-expected.html new file mode 100644 index 0000000..0077c3b --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint05b-expected.html @@ -0,0 +1,7 @@ + + + + [] +

xt

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint05b-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint05b-input.html b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint05b-input.html new file mode 100644 index 0000000..b09312d --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint05b-input.html @@ -0,0 +1,15 @@ + + + + + + +

[Sample te]xt

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint05c-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint05c-expected.html b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint05c-expected.html new file mode 100644 index 0000000..02e1240 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint05c-expected.html @@ -0,0 +1,7 @@ + + + +

Sam

+ [] + + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint05c-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint05c-input.html b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint05c-input.html new file mode 100644 index 0000000..84a9992 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint05c-input.html @@ -0,0 +1,15 @@ + + + + + + +

Sam[ple text]

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint06-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint06-expected.html b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint06-expected.html new file mode 100644 index 0000000..bc6dab9 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint06-expected.html @@ -0,0 +1,14 @@ + + + +
    +
  • Before
  • +
  • +

    Sam

    + [] +

    xt

    +
  • +
  • After
  • +
+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint06-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint06-input.html b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint06-input.html new file mode 100644 index 0000000..f90f593 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint06-input.html @@ -0,0 +1,19 @@ + + + + + + +
    +
  • Before
  • +
  • Sam[ple te]xt

  • +
  • After
  • +
+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint07-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint07-expected.html b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint07-expected.html new file mode 100644 index 0000000..e277c81 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint07-expected.html @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + +
One +

Sam

+ [] +

xt

+
ThreeFour
+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint07-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint07-input.html b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint07-input.html new file mode 100644 index 0000000..5c87b11 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/makeContainerInsertionPoint07-input.html @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + +
One

Sam[ple te]xt

ThreeFour
+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/nbsp01-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/nbsp01-expected.html b/experiments/editorFramework/test/Layer0/cursor/nbsp01-expected.html new file mode 100644 index 0000000..8098ad9 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/nbsp01-expected.html @@ -0,0 +1,6 @@ + + + +

Sample text []

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/nbsp01-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/nbsp01-input.html b/experiments/editorFramework/test/Layer0/cursor/nbsp01-input.html new file mode 100644 index 0000000..c855459 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/nbsp01-input.html @@ -0,0 +1,15 @@ + + + + + + +

Sample text[]

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/nbsp02-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/nbsp02-expected.html b/experiments/editorFramework/test/Layer0/cursor/nbsp02-expected.html new file mode 100644 index 0000000..ecc4490 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/nbsp02-expected.html @@ -0,0 +1,6 @@ + + + +

Sample text []

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/nbsp02-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/nbsp02-input.html b/experiments/editorFramework/test/Layer0/cursor/nbsp02-input.html new file mode 100644 index 0000000..4c70a52 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/nbsp02-input.html @@ -0,0 +1,16 @@ + + + + + + +

Sample text[]

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/nbsp03-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/nbsp03-expected.html b/experiments/editorFramework/test/Layer0/cursor/nbsp03-expected.html new file mode 100644 index 0000000..61c2a8a --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/nbsp03-expected.html @@ -0,0 +1,6 @@ + + + +

Sample text a[]

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/nbsp03-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/nbsp03-input.html b/experiments/editorFramework/test/Layer0/cursor/nbsp03-input.html new file mode 100644 index 0000000..b8a4a1d --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/nbsp03-input.html @@ -0,0 +1,16 @@ + + + + + + +

Sample text[]

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/nbsp04-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/nbsp04-expected.html b/experiments/editorFramework/test/Layer0/cursor/nbsp04-expected.html new file mode 100644 index 0000000..8098ad9 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/nbsp04-expected.html @@ -0,0 +1,6 @@ + + + +

Sample text []

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/nbsp04-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/nbsp04-input.html b/experiments/editorFramework/test/Layer0/cursor/nbsp04-input.html new file mode 100644 index 0000000..d0218b9 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/nbsp04-input.html @@ -0,0 +1,17 @@ + + + + + + +

Sample text[]

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/nbsp05-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/nbsp05-expected.html b/experiments/editorFramework/test/Layer0/cursor/nbsp05-expected.html new file mode 100644 index 0000000..ecc4490 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/nbsp05-expected.html @@ -0,0 +1,6 @@ + + + +

Sample text []

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/nbsp05-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/nbsp05-input.html b/experiments/editorFramework/test/Layer0/cursor/nbsp05-input.html new file mode 100644 index 0000000..00f9f41 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/nbsp05-input.html @@ -0,0 +1,18 @@ + + + + + + +

Sample text[]

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/position-br01-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/position-br01-expected.html b/experiments/editorFramework/test/Layer0/cursor/position-br01-expected.html new file mode 100644 index 0000000..83e1635 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/position-br01-expected.html @@ -0,0 +1,23 @@ + + + + .L.i.n.e. .1. +
+ .L.i.n.e. .2. +
+ .L.i.n.e. .3. +
+ . +
+ . +
+ . +
+ .L.i.n.e. .7. +
+ .L.i.n.e. .8. +
+ .L.i.n.e. .9.[] +
+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/position-br01-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/position-br01-input.html b/experiments/editorFramework/test/Layer0/cursor/position-br01-input.html new file mode 100644 index 0000000..a4a7145 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/position-br01-input.html @@ -0,0 +1,26 @@ + + + + + + +[]Line 1
+Line 2
+Line 3
+
+
+
+Line 7
+Line 8
+Line 9
+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/position-br02-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/position-br02-expected.html b/experiments/editorFramework/test/Layer0/cursor/position-br02-expected.html new file mode 100644 index 0000000..dacf76d --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/position-br02-expected.html @@ -0,0 +1,10 @@ + + + +

.

+

.

+

.

+

.

+

.[]

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/position-br02-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/position-br02-input.html b/experiments/editorFramework/test/Layer0/cursor/position-br02-input.html new file mode 100644 index 0000000..3e50268 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/position-br02-input.html @@ -0,0 +1,22 @@ + + + + + + +

[]

+


+


+


+


+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/position-br03-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/position-br03-expected.html b/experiments/editorFramework/test/Layer0/cursor/position-br03-expected.html new file mode 100644 index 0000000..a3cd77f --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/position-br03-expected.html @@ -0,0 +1,20 @@ + + + +

.L.i.n.e. .1.

+ . +
+

.L.i.n.e. .2.

+ . +
+

.L.i.n.e. .3.

+ . +
+

.L.i.n.e. .4.

+ . +
+

.L.i.n.e. .5.

+ .[] +
+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/position-br03-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/position-br03-input.html b/experiments/editorFramework/test/Layer0/cursor/position-br03-input.html new file mode 100644 index 0000000..847e17c --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/position-br03-input.html @@ -0,0 +1,22 @@ + + + + + + +

[]Line 1


+

Line 2


+

Line 3


+

Line 4


+

Line 5


+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/position-br04-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/position-br04-expected.html b/experiments/editorFramework/test/Layer0/cursor/position-br04-expected.html new file mode 100644 index 0000000..ccf0795 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/position-br04-expected.html @@ -0,0 +1,28 @@ + + + +

.L.i.n.e. .1.

+ . +
+

.L.i.n.e. .2.

+ . +
+ . +
+

.L.i.n.e. .3.

+ . +
+ . +
+

.L.i.n.e. .4.

+ . +
+ . +
+

.L.i.n.e. .5.

+ . +
+ .[] +
+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/position-br04-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/position-br04-input.html b/experiments/editorFramework/test/Layer0/cursor/position-br04-input.html new file mode 100644 index 0000000..ad5b1ad --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/position-br04-input.html @@ -0,0 +1,22 @@ + + + + + + +

[]Line 1


+

Line 2



+

Line 3



+

Line 4



+

Line 5



+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/textAfterFigure01-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/textAfterFigure01-expected.html b/experiments/editorFramework/test/Layer0/cursor/textAfterFigure01-expected.html new file mode 100644 index 0000000..5498785 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/textAfterFigure01-expected.html @@ -0,0 +1,10 @@ + + + +
+ +
+

X[]

+

one two three

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/textAfterFigure01-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/textAfterFigure01-input.html b/experiments/editorFramework/test/Layer0/cursor/textAfterFigure01-input.html new file mode 100644 index 0000000..94f51cd --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/textAfterFigure01-input.html @@ -0,0 +1,18 @@ + + + + + + +
+ +
[] +

one two three

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/textAfterFigure02-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/textAfterFigure02-expected.html b/experiments/editorFramework/test/Layer0/cursor/textAfterFigure02-expected.html new file mode 100644 index 0000000..5163f29 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/textAfterFigure02-expected.html @@ -0,0 +1,10 @@ + + + +
+ +
+

aX[]

+

one two three

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/textAfterFigure02-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/textAfterFigure02-input.html b/experiments/editorFramework/test/Layer0/cursor/textAfterFigure02-input.html new file mode 100644 index 0000000..2dd1105 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/textAfterFigure02-input.html @@ -0,0 +1,18 @@ + + + + + + +
+ +
a[] +

one two three

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/textAfterFigure03-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/textAfterFigure03-expected.html b/experiments/editorFramework/test/Layer0/cursor/textAfterFigure03-expected.html new file mode 100644 index 0000000..6035b43 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/textAfterFigure03-expected.html @@ -0,0 +1,10 @@ + + + +
+ +
+

X[]a

+

one two three

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/textAfterFigure03-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/textAfterFigure03-input.html b/experiments/editorFramework/test/Layer0/cursor/textAfterFigure03-input.html new file mode 100644 index 0000000..cec8ad3 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/textAfterFigure03-input.html @@ -0,0 +1,18 @@ + + + + + + +
+ +
[]a +

one two three

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/textAfterTable01-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/textAfterTable01-expected.html b/experiments/editorFramework/test/Layer0/cursor/textAfterTable01-expected.html new file mode 100644 index 0000000..85d005a --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/textAfterTable01-expected.html @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + +
CellCell
CellCell
+

X[]

+

one two three

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/textAfterTable01-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/textAfterTable01-input.html b/experiments/editorFramework/test/Layer0/cursor/textAfterTable01-input.html new file mode 100644 index 0000000..680af18 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/textAfterTable01-input.html @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + +
CellCell
CellCell
[] +

one two three

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/textAfterTable02-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/textAfterTable02-expected.html b/experiments/editorFramework/test/Layer0/cursor/textAfterTable02-expected.html new file mode 100644 index 0000000..0fb0003 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/textAfterTable02-expected.html @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + +
CellCell
CellCell
+

aX[]

+

one two three

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/textAfterTable02-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/textAfterTable02-input.html b/experiments/editorFramework/test/Layer0/cursor/textAfterTable02-input.html new file mode 100644 index 0000000..acddf8c --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/textAfterTable02-input.html @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + +
CellCell
CellCell
a[] +

one two three

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/textAfterTable03-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/textAfterTable03-expected.html b/experiments/editorFramework/test/Layer0/cursor/textAfterTable03-expected.html new file mode 100644 index 0000000..cf2c37c --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/textAfterTable03-expected.html @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + +
CellCell
CellCell
+

X[]a

+

one two three

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/textAfterTable03-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/textAfterTable03-input.html b/experiments/editorFramework/test/Layer0/cursor/textAfterTable03-input.html new file mode 100644 index 0000000..45aacd6 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/textAfterTable03-input.html @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + +
CellCell
CellCell
[]a +

one two three

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/textBeforeFigure01-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/textBeforeFigure01-expected.html b/experiments/editorFramework/test/Layer0/cursor/textBeforeFigure01-expected.html new file mode 100644 index 0000000..99ccaa9 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/textBeforeFigure01-expected.html @@ -0,0 +1,10 @@ + + + +

one two three

+

X[]

+
+ +
+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/textBeforeFigure01-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/textBeforeFigure01-input.html b/experiments/editorFramework/test/Layer0/cursor/textBeforeFigure01-input.html new file mode 100644 index 0000000..497d51d --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/textBeforeFigure01-input.html @@ -0,0 +1,18 @@ + + + + + + +

one two three

+[]
+ +
+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/textBeforeFigure02-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/textBeforeFigure02-expected.html b/experiments/editorFramework/test/Layer0/cursor/textBeforeFigure02-expected.html new file mode 100644 index 0000000..92b6ebe --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/textBeforeFigure02-expected.html @@ -0,0 +1,10 @@ + + + +

one two three

+

aX[]

+
+ +
+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/textBeforeFigure02-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/textBeforeFigure02-input.html b/experiments/editorFramework/test/Layer0/cursor/textBeforeFigure02-input.html new file mode 100644 index 0000000..481b99f --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/textBeforeFigure02-input.html @@ -0,0 +1,18 @@ + + + + + + +

one two three

+a[]
+ +
+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/textBeforeFigure03-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/textBeforeFigure03-expected.html b/experiments/editorFramework/test/Layer0/cursor/textBeforeFigure03-expected.html new file mode 100644 index 0000000..37ef96c --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/textBeforeFigure03-expected.html @@ -0,0 +1,10 @@ + + + +

one two three

+

X[]a

+
+ +
+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/textBeforeFigure03-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/textBeforeFigure03-input.html b/experiments/editorFramework/test/Layer0/cursor/textBeforeFigure03-input.html new file mode 100644 index 0000000..9489405 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/textBeforeFigure03-input.html @@ -0,0 +1,18 @@ + + + + + + +

one two three

+[]a
+ +
+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/textBeforeTable01-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/textBeforeTable01-expected.html b/experiments/editorFramework/test/Layer0/cursor/textBeforeTable01-expected.html new file mode 100644 index 0000000..240c213 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/textBeforeTable01-expected.html @@ -0,0 +1,19 @@ + + + +

one two three

+

X[]

+ + + + + + + + + + + +
CellCell
CellCell
+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/textBeforeTable01-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/textBeforeTable01-input.html b/experiments/editorFramework/test/Layer0/cursor/textBeforeTable01-input.html new file mode 100644 index 0000000..6123d87 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/textBeforeTable01-input.html @@ -0,0 +1,25 @@ + + + + + + +

one two three

+[] + + + + + + + + +
CellCell
CellCell
+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/textBeforeTable02-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/textBeforeTable02-expected.html b/experiments/editorFramework/test/Layer0/cursor/textBeforeTable02-expected.html new file mode 100644 index 0000000..0ba5dd0 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/textBeforeTable02-expected.html @@ -0,0 +1,19 @@ + + + +

one two three

+

aX[]

+ + + + + + + + + + + +
CellCell
CellCell
+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/textBeforeTable02-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/textBeforeTable02-input.html b/experiments/editorFramework/test/Layer0/cursor/textBeforeTable02-input.html new file mode 100644 index 0000000..f8fcf12 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/textBeforeTable02-input.html @@ -0,0 +1,25 @@ + + + + + + +

one two three

+a[] + + + + + + + + +
CellCell
CellCell
+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/textBeforeTable03-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/textBeforeTable03-expected.html b/experiments/editorFramework/test/Layer0/cursor/textBeforeTable03-expected.html new file mode 100644 index 0000000..36a0f77 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/textBeforeTable03-expected.html @@ -0,0 +1,19 @@ + + + +

one two three

+

X[]a

+ + + + + + + + + + + +
CellCell
CellCell
+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/cursor/textBeforeTable03-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/cursor/textBeforeTable03-input.html b/experiments/editorFramework/test/Layer0/cursor/textBeforeTable03-input.html new file mode 100644 index 0000000..f1193b1 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/cursor/textBeforeTable03-input.html @@ -0,0 +1,25 @@ + + + + + + +

one two three

+[]a + + + + + + + + +
CellCell
CellCell
+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/Position_next-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/Position_next-expected.html b/experiments/editorFramework/test/Layer0/dom/Position_next-expected.html new file mode 100644 index 0000000..e960157 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/Position_next-expected.html @@ -0,0 +1,9 @@ + + + + + allPositions.length = 84 +
+ Test results: total 84, pass 84, fail 0 + + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/Position_next-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/Position_next-input.html b/experiments/editorFramework/test/Layer0/dom/Position_next-input.html new file mode 100644 index 0000000..7884c75 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/Position_next-input.html @@ -0,0 +1,106 @@ + + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
One
+
Two
+
+
+
+
+
ONE
+
TWO
+
THREE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/Position_prev-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/Position_prev-expected.html b/experiments/editorFramework/test/Layer0/dom/Position_prev-expected.html new file mode 100644 index 0000000..e960157 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/Position_prev-expected.html @@ -0,0 +1,9 @@ + + + + + allPositions.length = 84 +
+ Test results: total 84, pass 84, fail 0 + + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/Position_prev-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/Position_prev-input.html b/experiments/editorFramework/test/Layer0/dom/Position_prev-input.html new file mode 100644 index 0000000..010737a --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/Position_prev-input.html @@ -0,0 +1,104 @@ + + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
One
+
Two
+
+
+
+
+
ONE
+
TWO
+
THREE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/RangeTest.js ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/RangeTest.js b/experiments/editorFramework/test/Layer0/dom/RangeTest.js new file mode 100644 index 0000000..2d69cc3 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/RangeTest.js @@ -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. + +var allPositions; +var allPositionsIndexMap; + +function positionKey(pos) +{ + return pos.node._nodeId+","+pos.offset; +} + +function removeWhitespaceTextNodes(parent) +{ + var next; + for (var child = parent.firstChild; child != null; child = next) { + next = child.nextSibling; + if (isWhitespaceTextNode(child) || (child.nodeType == Node.COMMENT_NODE)) + DOM_deleteNode(child); + else + removeWhitespaceTextNodes(child); + } +} + +function setup(root) +{ + allPositions = getAllPositions(root); + + allPositionsIndexMap = new Object(); + for (var i = 0; i < allPositions.length; i++) { + var pos = allPositions[i]; + allPositionsIndexMap[positionKey(pos)] = i; + } +} + +function comparePositionsBeforeAndAfter(fun) +{ + var messages = new Array(); + var positions = getAllPositions(document.body); + var positionStrings = new Array(); + for (var i = 0; i < positions.length; i++) { + messages.push("Before: positions["+i+"] = "+positions[i]); + positionStrings[i] = positions[i].toString(); + } + + Position_trackWhileExecuting(positions,function() { + fun(); + + }); + + messages.push(""); + for (var i = 0; i < positions.length; i++) { + if (positionStrings[i] != positions[i].toString()) + messages.push("After: positions["+i+"] = "+positions[i]+" - changed from "+ + positionStrings[i]); + else + messages.push("After: positions["+i+"] = "+positions[i]); + } + + return messages.join("\n"); +} + +function getAllPositions(root) +{ + var includeEmptyElements = true; + + var positions = new Array(); + var rootOffset = DOM_nodeOffset(root); +// positions.push(new Position(root.parentNode,rootOffset)); + recurse(root); +// positions.push(new Position(root.parentNode,rootOffset+1)); + return positions; + + function recurse(node) + { + if (node.nodeType == Node.TEXT_NODE) { + for (var offset = 0; offset <= node.nodeValue.length; offset++) + positions.push(new Position(node,offset)); + } + else if ((node.nodeType == Node.ELEMENT_NODE) && + (node.firstChild != null) || includeEmptyElements) { + var offset = 0; + for (var child = node.firstChild; child != null; child = child.nextSibling) { + positions.push(new Position(node,offset)); + recurse(child); + offset++; + } + positions.push(new Position(node,offset)); + } + } +} + +function getPositionIndex(pos) +{ + var result = allPositionsIndexMap[pos.node._nodeId+","+pos.offset]; + if (result == null) + throw new Error(pos+": no index for position"); + return result; +} + +function isForwardsSimple(range) +{ + var startIndex = getPositionIndex(range.start); + var endIndex = getPositionIndex(range.end); +// debug("startIndex = "+indices.startIndex+", endIndex = "+indices.endIndex); + return (endIndex >= startIndex); +} + +function getOutermostNodesSimple(range) +{ + if (!isForwardsSimple(range)) { + var reverse = new Range(range.end.node,range.end.offset, + range.start.node,range.start.offset); + if (!Range_isForwards(reverse)) { + var startIndex = getPositionIndex(range.start); + var endIndex = getPositionIndex(range.end); + debug("startIndex = "+startIndex+", endIndex = "+endIndex); + throw new Error("Both range "+range+" and its reverse are not forwards"); + } + return getOutermostNodesSimple(reverse); + } + + var startIndex = getPositionIndex(range.start); + var endIndex = getPositionIndex(range.end); + var havePositions = new Object(); + + var allArray = new Array(); + var allSet = new NodeSet(); + + for (var i = startIndex; i <= endIndex; i++) { + var pos = allPositions[i]; + + if ((pos.node.nodeType == Node.TEXT_NODE) && (i < endIndex)) { + allArray.push(pos.node); + allSet.add(pos.node); + } + else if (pos.node.nodeType == Node.ELEMENT_NODE) { + var prev = new Position(pos.node,pos.offset-1); + if (havePositions[positionKey(prev)]) { + var target = pos.node.childNodes[pos.offset-1]; + allArray.push(target); + allSet.add(target); + } + havePositions[positionKey(pos)] = true; + } + + } + + var outermostArray = new Array(); + var outermostSet = new NodeSet(); + + allArray.forEach(function (node) { + if (!outermostSet.contains(node) && !setContainsAncestor(allSet,node)) { + outermostArray.push(node); + outermostSet.add(node); + } + }); + + return outermostArray; + + function setContainsAncestor(set,node) + { + for (var ancestor = node.parentNode; ancestor != null; ancestor = ancestor.parentNode) { + if (set.contains(ancestor)) + return true; + } + return false; + } +} http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/Range_getOutermostNodes-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/Range_getOutermostNodes-expected.html b/experiments/editorFramework/test/Layer0/dom/Range_getOutermostNodes-expected.html new file mode 100644 index 0000000..a4a0331 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/Range_getOutermostNodes-expected.html @@ -0,0 +1,9 @@ + + + + + allPositions.length = 82 +
+ Test results: total 6724, pass 6724, fail 0 + + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/Range_getOutermostNodes-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/Range_getOutermostNodes-input.html b/experiments/editorFramework/test/Layer0/dom/Range_getOutermostNodes-input.html new file mode 100644 index 0000000..6518538 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/Range_getOutermostNodes-input.html @@ -0,0 +1,97 @@ + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/Range_isForward-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/Range_isForward-expected.html b/experiments/editorFramework/test/Layer0/dom/Range_isForward-expected.html new file mode 100644 index 0000000..a4a0331 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/Range_isForward-expected.html @@ -0,0 +1,9 @@ + + + + + allPositions.length = 82 +
+ Test results: total 6724, pass 6724, fail 0 + + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/Range_isForward-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/Range_isForward-input.html b/experiments/editorFramework/test/Layer0/dom/Range_isForward-input.html new file mode 100644 index 0000000..d301a25 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/Range_isForward-input.html @@ -0,0 +1,97 @@ + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/avoidInline01-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/avoidInline01-expected.html b/experiments/editorFramework/test/Layer0/dom/avoidInline01-expected.html new file mode 100644 index 0000000..9616757 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/avoidInline01-expected.html @@ -0,0 +1,6 @@ + + + +

One

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/avoidInline01-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/avoidInline01-input.html b/experiments/editorFramework/test/Layer0/dom/avoidInline01-input.html new file mode 100644 index 0000000..2918fa6 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/avoidInline01-input.html @@ -0,0 +1,14 @@ + + + + + + +One + + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/avoidInline02-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/avoidInline02-expected.html b/experiments/editorFramework/test/Layer0/dom/avoidInline02-expected.html new file mode 100644 index 0000000..f2b0ceb --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/avoidInline02-expected.html @@ -0,0 +1,7 @@ + + + +

One

+

Two

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/avoidInline02-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/avoidInline02-input.html b/experiments/editorFramework/test/Layer0/dom/avoidInline02-input.html new file mode 100644 index 0000000..d73d41b --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/avoidInline02-input.html @@ -0,0 +1,15 @@ + + + + + + +One +

Two

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/avoidInline03-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/avoidInline03-expected.html b/experiments/editorFramework/test/Layer0/dom/avoidInline03-expected.html new file mode 100644 index 0000000..f2b0ceb --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/avoidInline03-expected.html @@ -0,0 +1,7 @@ + + + +

One

+

Two

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/avoidInline03-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/avoidInline03-input.html b/experiments/editorFramework/test/Layer0/dom/avoidInline03-input.html new file mode 100644 index 0000000..3ed1274 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/avoidInline03-input.html @@ -0,0 +1,15 @@ + + + + + + +

One

+Two + + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/avoidInline04-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/avoidInline04-expected.html b/experiments/editorFramework/test/Layer0/dom/avoidInline04-expected.html new file mode 100644 index 0000000..0efffd4 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/avoidInline04-expected.html @@ -0,0 +1,8 @@ + + + +

One

+

Two

+

Three

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/avoidInline04-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/avoidInline04-input.html b/experiments/editorFramework/test/Layer0/dom/avoidInline04-input.html new file mode 100644 index 0000000..2610418 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/avoidInline04-input.html @@ -0,0 +1,16 @@ + + + + + + +One +

Two

+Three + + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/avoidInline05-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/avoidInline05-expected.html b/experiments/editorFramework/test/Layer0/dom/avoidInline05-expected.html new file mode 100644 index 0000000..0efffd4 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/avoidInline05-expected.html @@ -0,0 +1,8 @@ + + + +

One

+

Two

+

Three

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/avoidInline05-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/avoidInline05-input.html b/experiments/editorFramework/test/Layer0/dom/avoidInline05-input.html new file mode 100644 index 0000000..cd8f440 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/avoidInline05-input.html @@ -0,0 +1,16 @@ + + + + + + +

One

+Two +

Three

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/avoidInline06-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/avoidInline06-expected.html b/experiments/editorFramework/test/Layer0/dom/avoidInline06-expected.html new file mode 100644 index 0000000..5963095 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/avoidInline06-expected.html @@ -0,0 +1,10 @@ + + + +

+ One + Two + Three +

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/avoidInline06-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/avoidInline06-input.html b/experiments/editorFramework/test/Layer0/dom/avoidInline06-input.html new file mode 100644 index 0000000..fff9662 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/avoidInline06-input.html @@ -0,0 +1,14 @@ + + + + + + +One Two Three + + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/avoidInline07-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/avoidInline07-expected.html b/experiments/editorFramework/test/Layer0/dom/avoidInline07-expected.html new file mode 100644 index 0000000..c81cb00 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/avoidInline07-expected.html @@ -0,0 +1,16 @@ + + + +

+ One + Two + Three +

+

Test

+

+ Four + Five + Six +

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/avoidInline07-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/avoidInline07-input.html b/experiments/editorFramework/test/Layer0/dom/avoidInline07-input.html new file mode 100644 index 0000000..2b0ffb6 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/avoidInline07-input.html @@ -0,0 +1,16 @@ + + + + + + +One Two Three +

Test

+Four Five Six + + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/avoidInline08-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/avoidInline08-expected.html b/experiments/editorFramework/test/Layer0/dom/avoidInline08-expected.html new file mode 100644 index 0000000..6d06b64 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/avoidInline08-expected.html @@ -0,0 +1,18 @@ + + + +

Test 1

+

+ One + Two + Three +

+

Test 2

+

+ Four + Five + Six +

+

Test 3

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/avoidInline08-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/avoidInline08-input.html b/experiments/editorFramework/test/Layer0/dom/avoidInline08-input.html new file mode 100644 index 0000000..ab28de1 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/avoidInline08-input.html @@ -0,0 +1,18 @@ + + + + + + +

Test 1

+One Two Three +

Test 2

+Four Five Six +

Test 3

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph01-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph01-expected.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph01-expected.html new file mode 100644 index 0000000..7bd9ea5 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph01-expected.html @@ -0,0 +1,6 @@ + + + +

Test

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph01-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph01-input.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph01-input.html new file mode 100644 index 0000000..9660b9d --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph01-input.html @@ -0,0 +1,16 @@ + + + + + + + +Test + + + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph02-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph02-expected.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph02-expected.html new file mode 100644 index 0000000..836c9a5 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph02-expected.html @@ -0,0 +1,12 @@ + + + +

+
+ One +
+ Two +
+

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph02-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph02-input.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph02-input.html new file mode 100644 index 0000000..b46f632 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph02-input.html @@ -0,0 +1,21 @@ + + + + + + + +
+One +
+Two +
+ + + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph03-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph03-expected.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph03-expected.html new file mode 100644 index 0000000..836c9a5 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph03-expected.html @@ -0,0 +1,12 @@ + + + +

+
+ One +
+ Two +
+

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph03-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph03-input.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph03-input.html new file mode 100644 index 0000000..aaeacf0 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph03-input.html @@ -0,0 +1,21 @@ + + + + + + + +
+One +
+Two +
+ + + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph04-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph04-expected.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph04-expected.html new file mode 100644 index 0000000..836c9a5 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph04-expected.html @@ -0,0 +1,12 @@ + + + +

+
+ One +
+ Two +
+

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph04-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph04-input.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph04-input.html new file mode 100644 index 0000000..584b550 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph04-input.html @@ -0,0 +1,21 @@ + + + + + + + +
+One +
+Two +
+ + + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph05-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph05-expected.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph05-expected.html new file mode 100644 index 0000000..a88c020 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph05-expected.html @@ -0,0 +1,20 @@ + + + +

+
+ One +
+ Two +
+

+

Explicit paragraph

+

+
+ Three +
+ Four +
+

+ + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph05-input.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph05-input.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph05-input.html new file mode 100644 index 0000000..920df14 --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph05-input.html @@ -0,0 +1,31 @@ + + + + + + + +
+One +
+Two +
+ +

Explicit paragraph

+ +
+Three +
+Four +
+ + + http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph06-expected.html ---------------------------------------------------------------------- diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph06-expected.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph06-expected.html new file mode 100644 index 0000000..b59738c --- /dev/null +++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph06-expected.html @@ -0,0 +1,20 @@ + + + +

+
+ One +
+ Two +
+

+

Explicit paragraph

+

+
+ Three +
+ Four +
+

+ +