Jos van den Oever
d4607cf63c
Add documentation to PositionIterator.
2013-11-18 01:13:02 +01:00
Philip Peitsch
9ba2ac64cb
Ensure all args are specified for createNodeIterator
...
IE10 considers all of these arguments required and will throw if any are
undefined.
2013-10-25 20:39:05 +11:00
Friedrich W. H. Kossebau
c2a795e668
Update link to repo: now https://github.com/kogmbh/WebODF/
2013-10-23 18:20:30 +02:00
Friedrich W. H. Kossebau
508570dab8
Add copy of the AGPL3 to sources (+ add to created zip files)
2013-10-21 17:55:16 +02:00
Philip Peitsch
4ba4eaf312
Ensure PositionIterator.setUnfilteredPosition has round-trip stability
...
Calling setUnfilteredPosition with a result previously obtained from the
iterator should effectively resume iteration at exactly this position.
As added tests demonstrated, specifying a node with no children and an
offset of 0 was incorrectly causing currentPos to be restored to the value
of 0. This meant calls to iterator.container() would return the a different
value.
2013-10-08 01:30:32 +11:00
Philip Peitsch
0727acf238
Jump to next valid position when setUnfilteredPosition is passed a child of an invalid parent
...
PositionIterator.setUnfilteredPosition API doc report that when given
a forbidden position, the iterator jumps to the next visible position.
Add code to cover a missed corner case if the container was a child of
a forbidden parent (or grand parent) node.
2013-09-24 18:10:31 +10:00
Jos van den Oever
64d57c96cf
Fix issues exposed by latest JSLint.
2013-07-24 21:41:56 +02:00
Philip Peitsch
f7cd9fe437
Allow position iterator to complete even if root is never reached
2013-07-15 09:40:50 +02:00
Philip Peitsch
402ae2a023
Removed PositionIterator.setPosition
...
PositionIterator.setPosition has been superseded by the unfiltered
variant for all use cases.
2013-07-03 21:52:40 +10:00
Philip Peitsch
84e79a983a
Fix case where setUnfilteredPosition is passed an offset to a non-visible child
...
PositionIterator.setUnfilteredPosition must always set the current node to a
visible node.
2013-07-03 21:40:12 +10:00
Friedrich W. H. Kossebau
09b5d43f97
let's use NodeFilter.XXX constants instead of magic values
2013-07-02 22:31:02 +02:00
Philip Peitsch
4e0f4a0df4
Removed PositionIterator.offset and all references
...
PositionIterator exposes a myriad of confusing offsets. These are being
slowly retired where possible in an effort to reduce possible mis-use
and confusion.
2013-07-02 21:31:29 +02:00
Philip Peitsch
ea8c135546
PositionIterator.setUnfilteredPosition automatically advances to the next valid position
...
This makes the result of next & previous always a node that will pass
the filter. Previous implementations could return entirely unexpected
nodes
* Corrected module load order for tests
2013-06-19 16:58:13 +02:00
Philip Peitsch
4ab30523c0
Modified cursor movement to remove the need to adapt position iterators
2013-06-19 13:43:46 +02:00
Friedrich W. H. Kossebau
55fc7ab9c6
Switch code to use Node.${XXX}_NODE instead of magic values
2013-06-17 13:49:07 +02:00
Philip Peitsch
ff4033be4b
OdtDocument.getDistanceFromCursor expects filtered offsets
...
* Fixed api comments incorrectly claiming unfiltered offsets
2013-06-12 11:00:01 +02:00
Jos van den Oever
0b08f50e1b
Split text nodes completely.
2012-11-09 18:12:22 +01:00
Jos van den Oever
a26ceb6fb9
Add test that checks iterating over a DOM with neighboring text nodes.
2012-11-09 18:02:30 +01:00
Tobias Hintze
758333d210
update "@source:" references to gitorious.org/webodf
...
(as in master: de1a79c36f )
2012-10-21 12:18:15 +02:00
Jos van den Oever
3e3de5be29
Fix failing PositionIteratorTests.
2012-10-03 15:28:01 +02:00
Jos van den Oever
566749728e
Get avatar to move somewhat along with the caret.
2012-08-28 22:19:58 +02:00
Jos van den Oever
98bc24d7bc
Fix PositionIterator to handle empty text nodes.
2012-08-26 17:59:15 +02:00
Jos van den Oever
e6611afe38
Fix more tests.
2012-08-25 00:04:58 +02:00
Jos van den Oever
7c2540fa61
Add more tests.
2012-08-24 22:44:37 +02:00
Jos van den Oever
27a0c2a614
Adapt tests in PositionIteratorTests and fix PositionIterator so they pass.
2012-08-24 21:52:24 +02:00
Jos van den Oever
a75a4432a3
Change to use PositionIterator instead of PointWalker.
...
This class still needs to be implemented.
2012-08-24 18:05:20 +02:00