(lineObj)
| 6553 | |
| 6554 | // Find the height above the given line. |
| 6555 | function heightAtLine(lineObj) { |
| 6556 | lineObj = visualLine(lineObj); |
| 6557 | |
| 6558 | var h = 0, chunk = lineObj.parent; |
| 6559 | for (var i = 0; i < chunk.lines.length; ++i) { |
| 6560 | var line = chunk.lines[i]; |
| 6561 | if (line == lineObj) break; |
| 6562 | else h += line.height; |
| 6563 | } |
| 6564 | for (var p = chunk.parent; p; chunk = p, p = chunk.parent) { |
| 6565 | for (var i = 0; i < p.children.length; ++i) { |
| 6566 | var cur = p.children[i]; |
| 6567 | if (cur == chunk) break; |
| 6568 | else h += cur.height; |
| 6569 | } |
| 6570 | } |
| 6571 | return h; |
| 6572 | } |
| 6573 | |
| 6574 | // Get the bidi ordering for the given line (and cache it). Returns |
| 6575 | // false for lines that are fully left-to-right, and an array of |
no test coverage detected
searching dependent graphs…