()
| 1846 | |
| 1847 | var cachedHeight, cachedHeightFor, measureText; |
| 1848 | function textHeight() { |
| 1849 | if (measureText == null) { |
| 1850 | measureText = "<pre>"; |
| 1851 | for (var i = 0; i < 49; ++i) measureText += "x<br/>"; |
| 1852 | measureText += "x</pre>"; |
| 1853 | } |
| 1854 | var offsetHeight = lineDiv.clientHeight; |
| 1855 | if (offsetHeight == cachedHeightFor) return cachedHeight; |
| 1856 | cachedHeightFor = offsetHeight; |
| 1857 | measure.innerHTML = measureText; |
| 1858 | cachedHeight = measure.firstChild.offsetHeight / 50 || 1; |
| 1859 | measure.innerHTML = ""; |
| 1860 | return cachedHeight; |
| 1861 | } |
| 1862 | var cachedWidth, cachedWidthFor = 0; |
| 1863 | function charWidth() { |
| 1864 | if (scroller.clientWidth == cachedWidthFor) return cachedWidth; |
no outgoing calls
no test coverage detected