(lineObj)
| 7868 | |
| 7869 | // Find the height above the given line. |
| 7870 | function heightAtLine(lineObj) { |
| 7871 | lineObj = visualLine(lineObj); |
| 7872 | |
| 7873 | var h = 0, chunk = lineObj.parent; |
| 7874 | for (var i = 0; i < chunk.lines.length; ++i) { |
| 7875 | var line = chunk.lines[i]; |
| 7876 | if (line == lineObj) break; |
| 7877 | else h += line.height; |
| 7878 | } |
| 7879 | for (var p = chunk.parent; p; chunk = p, p = chunk.parent) { |
| 7880 | for (var i = 0; i < p.children.length; ++i) { |
| 7881 | var cur = p.children[i]; |
| 7882 | if (cur == chunk) break; |
| 7883 | else h += cur.height; |
| 7884 | } |
| 7885 | } |
| 7886 | return h; |
| 7887 | } |
| 7888 | |
| 7889 | // Get the bidi ordering for the given line (and cache it). Returns |
| 7890 | // false for lines that are fully left-to-right, and an array of |
no test coverage detected