()
| 1646 | |
| 1647 | var cachedHeight, cachedHeightFor, measureText; |
| 1648 | function textHeight() { |
| 1649 | if (measureText == null) { |
| 1650 | measureText = "<pre>"; |
| 1651 | for (var i = 0; i < 49; ++i) measureText += "x<br/>"; |
| 1652 | measureText += "x</pre>"; |
| 1653 | } |
| 1654 | var offsetHeight = lineDiv.clientHeight; |
| 1655 | if (offsetHeight == cachedHeightFor) return cachedHeight; |
| 1656 | cachedHeightFor = offsetHeight; |
| 1657 | measure.innerHTML = measureText; |
| 1658 | cachedHeight = measure.firstChild.offsetHeight / 50 || 1; |
| 1659 | measure.innerHTML = ""; |
| 1660 | return cachedHeight; |
| 1661 | } |
| 1662 | var cachedWidth, cachedWidthFor = 0; |
| 1663 | function charWidth() { |
| 1664 | if (scroller.clientWidth == cachedWidthFor) return cachedWidth; |
no outgoing calls
no test coverage detected