Commit Graph

  • ec2b4fd5a5 Remove unused python script. Jos van den Oever 2013-05-16 15:43:43 +02:00
  • 95369193dd Smarter logic for paragraph merging when one of them is an empty paragraph. Don't let empty paragraphs win. Also - moar tests. Aditya Bhatt 2013-05-16 16:51:53 +00:00
  • ab73fca767 Fix compilation. Jos van den Oever 2013-05-16 14:21:20 +02:00
  • fff969d8b7 Enable listening to click events when the canvas is made editable. Jos van den Oever 2013-05-16 14:15:21 +02:00
  • 0d5a04e92b Squashed commit of the following: Aditya Bhatt 2013-05-16 13:35:53 +00:00
  • d662480721 Add mapping for paragraph property fo:text-indent. Jos van den Oever 2013-05-16 12:03:48 +02:00
  • 043b8ca360 Add missing Base64.js. Jos van den Oever 2013-05-15 16:54:37 +02:00
  • 9dc557e229 Fix deletion. To be precise; extended neighborhood computation from a position at the right extremity of a paragraph/span node was broken because the 'container' there is not a text node, and the previous approach ignored these positions completely and only handled the neighborhood if the container was a text node. This led to wrong splicing of 'unneeded text nodes in the first neighborhood, because then the first neighborhood was not the *actual* first neighborhood (which would be empty). Aditya Bhatt 2013-05-14 17:14:21 +00:00
  • 6f4988f619 Add a really simple test that fails. Jos van den Oever 2013-05-14 10:03:50 +02:00
  • 16f0140135 Add two more failing tests. And simplified an existing one a bit. Jos van den Oever 2013-05-14 09:54:53 +02:00
  • 1c574d4cc9 Fix JSLint issues. Jos van den Oever 2013-05-14 09:41:06 +02:00
  • a6bcf7e534 Add a " " text node to space elements, and expand space elements with a count attribute, to 'count' times as my elements without a count attribute. Aditya Bhatt 2013-05-13 18:05:29 +00:00
  • fa8c03b391 Merge commit 'refs/merge-requests/10' of git://gitorious.org/webodf/webodf into mr10 Jos van den Oever 2013-05-13 15:07:52 +02:00
  • 62584f6f96 Merge commit 'refs/merge-requests/11' of git://gitorious.org/webodf/webodf Jos van den Oever 2013-05-13 15:05:42 +02:00
  • a1498dd481 Fix removal of spaces. Jos van den Oever 2013-05-13 14:56:08 +02:00
  • 7c16ef8bac code restructuring. Aditya Bhatt 2013-05-07 15:38:42 +00:00
  • 59da7fb421 split previousnode before insertion with an offset Aditya Bhatt 2013-05-07 15:37:54 +00:00
  • db760b568e Check for length of texts[i], not texts. Aditya Bhatt 2013-05-07 14:10:05 +00:00
  • cd2acd5f26 Set textNodeIncrease to prev.length in removeCursor even when next is null/not a text node. Aditya Bhatt 2013-05-07 14:00:41 +00:00
  • 60fe6497aa Less textNode creation and faster text insertion. Aditya Bhatt 2013-05-07 14:11:01 +00:00
  • f6af4ee88a Handle insertion offsets more gracefully Aditya Bhatt 2013-05-06 12:01:16 +00:00
  • b1f1c261c5 Create text nodes only when necessary during string insertion Aditya Bhatt 2013-05-06 11:54:50 +00:00
  • 6c79731995 Remove paragraph splitting fix now that the cursorTextNode optimization is gone Aditya Bhatt 2013-05-03 14:00:01 +00:00
  • b92389c98d * Stop using cursorTextNode, and use the simplest way to delete and split textNodes for a cursor. * Delete any empty text nodes that are created and unused during insertion. Aditya Bhatt 2013-05-03 13:49:18 +00:00
  • 8d57a04c8e Insert text:s elements instead of spaces in OpInsertText. Also make the cursor behave properly around such elements. Aditya Bhatt 2013-05-03 10:27:06 +00:00
  • b1ab50d7da Do not avoid empty text nodes in Cursor::getPositionInContainer Aditya Bhatt 2013-05-13 10:13:35 +00:00
  • 8768d62c5c Make moveInSimpleDoc cursor implementation independent Aditya Bhatt 2013-05-13 10:14:01 +00:00
  • b130330870 Remove t.selection because it is, at the moment, too implementation-dependent and therefore not good for usage in testing. Instead, just check the values of text nodes to the left and right of the cursor. Aditya Bhatt 2013-05-10 16:24:32 +00:00
  • 36b11454ff SelectionMoverTests: Stop tracking the text node in t.text, and instead check if the actual text surrounding the cursor matches the expected value. Aditya Bhatt 2013-05-10 12:00:01 +00:00
  • a6755934a6 Add more tests and fix them. Jos van den Oever 2013-05-10 16:57:53 +02:00
  • 8bb1cc55c1 Fix failing test. Jos van den Oever 2013-05-10 15:45:07 +02:00
  • 33617d813c fix Bug#43 Images in flat ODT files are not rendered Lu Li 2013-05-10 15:08:06 +10:00
  • dcad01704d Fix builds on the win32 environment Lu Li 2013-05-09 16:22:42 +10:00
  • a3b311060a Add failing test and make leftNode and rightNode return only filtered nodes. Jos van den Oever 2013-05-08 18:38:01 +02:00
  • 0d2e8937ce Compile fix. Jos van den Oever 2013-05-08 17:09:06 +02:00
  • 5c5b92ec48 Add tests and make sure they pass. Jos van den Oever 2013-05-08 17:06:17 +02:00
  • 879a691cf1 Fix build. Jos van den Oever 2013-05-08 15:37:41 +02:00
  • 1d7e4c0a02 A few simple assertions. Jos van den Oever 2013-05-08 12:38:27 +02:00
  • f6e559ed3f Make it possible to run individual tests by supplying arguments. Jos van den Oever 2013-05-08 12:14:26 +02:00
  • 32020c68f5 Reimplement acceptPosition() for ODT according to README_cursorpositions.txt New tests were added too. Jos van den Oever 2013-05-07 11:27:38 +02:00
  • f8379c5799 prevent selections appearing on first cursor movement after positioning the cursor with the mouse (with older WebKit) Friedrich W. H. Kossebau 2013-05-08 14:52:54 +02:00
  • 818e4f3a5a ensure consistency between all code which gets the paragraph element in which a given cursor is inside Friedrich W. H. Kossebau 2013-05-08 14:48:31 +02:00
  • 7dbd8bf48c Do not create a cursor move for both "click" and "mouseup" event, only the latter Friedrich W. H. Kossebau 2013-05-07 19:32:55 +02:00
  • d4395ba6ee don't store operationFactory and playbackFunction as public properties of TrivialOperationRouter/NowjsOperationRouter Friedrich W. H. Kossebau 2013-05-07 13:46:15 +02:00
  • 16c0a92192 Don't fail on class names with more than one namespace section Friedrich W. H. Kossebau 2013-05-07 12:00:33 +02:00
  • b022a00569 Execute operations directly in ops.OperationTests, not via Session/OperationRouter Friedrich W. H. Kossebau 2013-05-07 11:46:27 +02:00
  • c0a9a1e99f Remove unused session argument from ops.OperationFactory constructor Friedrich W. H. Kossebau 2013-05-06 14:47:24 +02:00
  • 6cf4da633d Change from collapse() to collapseToStart(). The meaning of the parameters in collapse() seems to differ between browsers. collapseToStart seems more consistent. Jos van den Oever 2013-05-06 16:58:12 +02:00
  • 2eba28bd7f fix OdtDocument::getText(): use join("") instead of join() to not get "," as separator Tobias Hintze 2013-05-06 14:56:20 +02:00
  • 99a32ceed1 add a failing test Tobias Hintze 2013-05-06 14:04:52 +02:00
  • 1f4f0462de add getText function to OdtDocument Tobias Hintze 2013-05-06 14:09:50 +02:00
  • 6cf5bbef1e Insert a new text node at the correct position. A new PositionIterator function is needed for this: rightNode. For completeness sake, leftNode() is also introduced. Jos van den Oever 2013-05-05 12:12:40 +02:00
  • afc4dbda5e Add ability to run single tests in the browser environment. Each suite and test now has a link. Pressing the link will add a query to the tests page that will filter out only a particular suite or even a particular test. Jos van den Oever 2013-05-04 22:36:00 +02:00
  • c79c28033b Fix loading of xml document in qtruntimetests. Also add more tests. Jos van den Oever 2013-05-04 01:00:59 +02:00
  • fc363560b8 Fix construction of QNames. The QName construction is now handled in a separate class. Jos van den Oever 2013-05-03 18:29:47 +02:00
  • 13b549e92e Add xml based operation tests. Jos van den Oever 2013-05-03 14:34:51 +02:00
  • bd07b2c8a9 Support END key, by going to end of paragraph for now Friedrich W. H. Kossebau 2013-05-03 16:25:03 +02:00
  • 84c4ba7813 Fix broken calculation in SelectionMover's countStepsToPosition() (ignored that comparePoints() used unfiltered offsets) Friedrich W. H. Kossebau 2013-05-03 16:21:55 +02:00
  • 8492ef7848 Fix compilation: Closure Compiler wants two arguments for collapse(). Jos van den Oever 2013-05-02 19:29:50 +02:00
  • 6eaceefa6f Fix selection problem that occurs in cursor movement by clicking. Sometimes a selection would appear when the cursor was moved by clicking. This is fixed by explicitly collapsing the selection which effectively makes it invisible. In addition the onmouseup event is also registered to move the cursor. The onclick event does not suffice to catch all user actions intended to move the cursor. Jos van den Oever 2013-05-02 18:33:22 +02:00
  • 9ae5bb99ed Fix dimensions of A4. Jos van den Oever 2013-05-02 16:23:36 +02:00
  • 9cdd64ee73 Load scripts explicitly so it's easier to debug. Jos van den Oever 2013-05-02 11:08:12 +02:00
  • 3b37fd5b3d Do not set css background when the image cannot be loaded. Jos van den Oever 2013-05-02 10:54:08 +02:00
  • 1967291a69 unsubscribe SessionView for updates of the member's userdata on cursor removal, unless needed for editinfo updates Friedrich W. H. Kossebau 2013-04-26 22:50:25 +02:00
  • 8190e45401 Enable userdata updates from the nowjs backend, incl. avatar images Friedrich W. H. Kossebau 2013-04-26 22:48:35 +02:00
  • bb11a46635 fetch userdata only once from server in NowjsUserModel Friedrich W. H. Kossebau 2013-04-26 16:57:16 +02:00
  • 00ffe587af Improve documentation of the rule for allowed cursor positions in ODF. Jos van den Oever 2013-04-26 22:41:30 +02:00
  • 7f582fa16f Improve documentation of the rule for allowed cursor positions in ODF. Jos van den Oever 2013-04-26 13:53:59 +02:00
  • c2d21d9173 Improve rule for allowed cursor positions in ODF. Jos van den Oever 2013-04-26 13:00:54 +02:00
  • e243502bfa In core.Cursor.getPositionInContainer() deal with empty text nodes to the left of the cursor Friedrich W. H. Kossebau 2013-04-26 12:37:39 +02:00
  • 1c92ccf873 Cleaned up style saving documentation to reflect the current implementation state Philip Peitsch 2013-04-17 12:15:20 +10:00
  • e14102aef1 Changed the concept of a style's origin to use the term scope instead. Philip Peitsch 2013-04-17 12:45:19 +10:00
  • 711e5c2264 Using an automatic style also automatically marks all other required styles as used Philip Peitsch 2013-04-17 12:43:37 +10:00
  • 5ab34250b6 Fix closure compiler compilation error Philip Peitsch 2013-04-17 12:39:52 +10:00
  • 799a621f52 Removing unused variables and functions Philip Peitsch 2013-04-16 10:41:24 +10:00
  • 2869ffa4bf Make positions in the beginning of a container but right before a span unwalkable. Additionally, make the offset=0 in spans that have no allowable siblings to the left walkable. Aditya Bhatt 2013-04-25 01:27:25 +05:30
  • ab60ca51c7 add and fixup some asserts Tobias Hintze 2013-04-25 09:10:50 +02:00
  • ce6280eb72 Fixes and another example. Jos van den Oever 2013-04-24 19:33:36 +02:00
  • 967c641389 Fixes and another example. Jos van den Oever 2013-04-24 19:28:07 +02:00
  • be6b911440 fix closure error Aditya Bhatt 2013-04-24 22:48:05 +05:30
  • c7062027f9 Add explanation on where the cursor is allowed to be. Jos van den Oever 2013-04-24 19:14:38 +02:00
  • 32fa7ab768 comments and jsdoc Aditya Bhatt 2013-04-24 20:33:25 +05:30
  • 7a41e83b10 Call removeCursor only when the cursor isn't already removed, in Cursor:updateToSelection Aditya Bhatt 2013-04-24 20:28:25 +05:30
  • ef492dcefb Make closure stop complaining Aditya Bhatt 2013-04-24 13:22:09 +05:30
  • a264d41f6c Merge two nested ifs and elses Aditya Bhatt 2013-04-23 22:53:25 +05:30
  • cc75b04dff lint Aditya Bhatt 2013-04-23 22:23:01 +05:30
  • a1e7644aad jsdoc Aditya Bhatt 2013-04-23 22:21:56 +05:30
  • c9f9a5d2c2 When calculating the offset in Cursor::getPositionInContainer, if it is not in a text node, then use the nodefilter to make unwanted nodes not count towards the offset Aditya Bhatt 2013-04-23 19:06:50 +05:30
  • fcaaeedf18 eject the text nodes that will never be traversed in getTextNeighborhood, and in OpRemoveText: instead of searching for the current textNode in the neighborhood, start deleting from position zero. Aditya Bhatt 2013-04-23 01:21:02 +05:30
  • 2312de84a3 Add a check for currentNeighborhood.length being > 0 before proceeding with neighborhood extension Aditya Bhatt 2013-04-22 18:40:58 +05:30
  • b5f485b669 Remove the if(filter.acceptPosition()). We are not filtering here Aditya Bhatt 2013-04-22 18:28:59 +05:30
  • 327c130e3e Check for text content of the parent node instead of hasChildren Aditya Bhatt 2013-04-22 18:07:47 +05:30
  • 7f205d2cdf Add asserts and rename firstNode to firstIndex Aditya Bhatt 2013-04-22 18:07:07 +05:30
  • dc3325fbf3 Skip spans that have no text content Aditya Bhatt 2013-04-20 05:38:58 +05:30
  • 2eace53a1a A fixCursorPositions function in OpRemoveText, used to fix cursors that end up in unwalkable places after text deletion Aditya Bhatt 2013-04-20 05:37:55 +05:30
  • 67f1a30f19 Let's not insert a '' lastNode as a placeholder Aditya Bhatt 2013-04-20 03:15:22 +05:30
  • 7de4ba24e1 An isPositionWalkable method to SelectionMover, used to check the walkability of the resulting cursor positions in OpRemoveText. If unwalkable, move the cursor 1 filtered step backward. Aditya Bhatt 2013-04-19 23:25:40 +05:30
  • 39dc0f6ef3 Make jslint happy Aditya Bhatt 2013-04-15 17:10:22 +05:30
  • c769bedcbe Make Cursor::removeCursor also work when there is no next sibling. Aditya Bhatt 2013-04-15 17:04:15 +05:30
  • 624f555c5a If the cursorNode is at a right extremity between a splitted textNode, then we need to make sure not to delete cursorTextNode during removeCursor! Otherwise the entire text content to the left of the cursor will be deleted. Instead, clone the cursorTextNode and insert it before the cursor position to preserve the DOM structure. Aditya Bhatt 2013-04-15 16:05:17 +05:30