(lineObj)
| 7836 | |
| 7837 | // Find the height above the given line. |
| 7838 | function heightAtLine(lineObj) { |
| 7839 | lineObj = visualLine(lineObj); |
| 7840 | |
| 7841 | var h = 0, chunk = lineObj.parent; |
| 7842 | for (var i = 0; i < chunk.lines.length; ++i) { |
| 7843 | var line = chunk.lines[i]; |
| 7844 | if (line == lineObj) break; |
| 7845 | else h += line.height; |
| 7846 | } |
| 7847 | for (var p = chunk.parent; p; chunk = p, p = chunk.parent) { |
| 7848 | for (var i = 0; i < p.children.length; ++i) { |
| 7849 | var cur = p.children[i]; |
| 7850 | if (cur == chunk) break; |
| 7851 | else h += cur.height; |
| 7852 | } |
| 7853 | } |
| 7854 | return h; |
| 7855 | } |
| 7856 | |
| 7857 | // Get the bidi ordering for the given line (and cache it). Returns |
| 7858 | // false for lines that are fully left-to-right, and an array of |
no test coverage detected