(lineObj)
| 6503 | |
| 6504 | // Find the height above the given line. |
| 6505 | function heightAtLine(lineObj) { |
| 6506 | lineObj = visualLine(lineObj); |
| 6507 | |
| 6508 | var h = 0, chunk = lineObj.parent; |
| 6509 | for (var i = 0; i < chunk.lines.length; ++i) { |
| 6510 | var line = chunk.lines[i]; |
| 6511 | if (line == lineObj) break; |
| 6512 | else h += line.height; |
| 6513 | } |
| 6514 | for (var p = chunk.parent; p; chunk = p, p = chunk.parent) { |
| 6515 | for (var i = 0; i < p.children.length; ++i) { |
| 6516 | var cur = p.children[i]; |
| 6517 | if (cur == chunk) break; |
| 6518 | else h += cur.height; |
| 6519 | } |
| 6520 | } |
| 6521 | return h; |
| 6522 | } |
| 6523 | |
| 6524 | // Get the bidi ordering for the given line (and cache it). Returns |
| 6525 | // false for lines that are fully left-to-right, and an array of |
no test coverage detected