Changeset 1293
- Timestamp:
- 11/22/10 13:01:04 (1 year ago)
- Files:
-
- 1 modified
-
branches/Ticket1226/paraHandlerBest.js (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/Ticket1226/paraHandlerBest.js
r1292 r1293 860 860 EnterParagraphs.RunTests = function(xinha, debug) 861 861 { 862 function test(message, before, cursorBefore, after, cursorAfter, cursorAfter2) {862 var test = function(message, before, cursorBefore, after, cursorAfter, cursorAfter2) { 863 863 console.group('Test: ', message); 864 864 if (before !== null) { … … 1134 1134 // Helper function that copies a DOM element and its attributes (except the 1135 1135 // id) without any of the contents. 1136 function safeShallowCopy(node, doc)1136 var safeShallowCopy = function(node, doc) 1137 1137 { 1138 1138 var copy = doc.createElement(node.nodeName); … … 1153 1153 // node in the text is at a lower depth in the DOM tree, than we will return 1154 1154 // it's first parent that is at our depth our higher in the tree. 1155 function nextRootNode(node)1155 var nextRootNode = function(node) 1156 1156 { 1157 1157 if (node.nextSibling) … … 1172 1172 // splitOffset is an offset into the text contents. If not, it is an index 1173 1173 // into the childNodes array. 1174 function splitTree(root, splitNode, splitOffset, doc)1174 var splitTree = function(root, splitNode, splitOffset, doc) 1175 1175 { 1176 1176 // Split root into two. … … 1243 1243 // An empty node is an text node of zero length or an element node with no 1244 1244 // children, or whose only children are zero-length text nodes. 1245 function emptyNode(node)1245 var emptyNode = function(node) 1246 1246 { 1247 1247 if ((TEXT_NODE == node.nodeType) && (0 == node.nodeValue.length)) … … 1271 1271 } 1272 1272 1273 function stuffEmptyNode(node, doc)1273 var stuffEmptyNode = function(node, doc) 1274 1274 { 1275 1275 if (!emptyNode(node)) … … 1313 1313 return newCursorNode; 1314 1314 } 1315 function insertLineBreak(cursorParent, cursorOffset, useNewline, doc)1315 var insertLineBreak = function(cursorParent, cursorOffset, useNewline, doc) 1316 1316 { 1317 1317 if (TEXT_NODE == cursorParent.nodeType)
