(lineObj)
| 7605 | |
| 7606 | // Find the height above the given line. |
| 7607 | function heightAtLine(lineObj) { |
| 7608 | lineObj = visualLine(lineObj); |
| 7609 | |
| 7610 | var h = 0, chunk = lineObj.parent; |
| 7611 | for (var i = 0; i < chunk.lines.length; ++i) { |
| 7612 | var line = chunk.lines[i]; |
| 7613 | if (line == lineObj) break; |
| 7614 | else h += line.height; |
| 7615 | } |
| 7616 | for (var p = chunk.parent; p; chunk = p, p = chunk.parent) { |
| 7617 | for (var i = 0; i < p.children.length; ++i) { |
| 7618 | var cur = p.children[i]; |
| 7619 | if (cur == chunk) break; |
| 7620 | else h += cur.height; |
| 7621 | } |
| 7622 | } |
| 7623 | return h; |
| 7624 | } |
| 7625 | |
| 7626 | // Get the bidi ordering for the given line (and cache it). Returns |
| 7627 | // false for lines that are fully left-to-right, and an array of |
no test coverage detected