(cm)
| 831 | // Do a bulk-read of the DOM positions and sizes needed to draw the |
| 832 | // view, so that we don't interleave reading and writing to the DOM. |
| 833 | function getDimensions(cm) { |
| 834 | var d = cm.display, left = {}, width = {}; |
| 835 | var gutterLeft = d.gutters.clientLeft; |
| 836 | for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) { |
| 837 | left[cm.options.gutters[i]] = n.offsetLeft + n.clientLeft + gutterLeft; |
| 838 | width[cm.options.gutters[i]] = n.clientWidth; |
| 839 | } |
| 840 | return {fixedPos: compensateForHScroll(d), |
| 841 | gutterTotalWidth: d.gutters.offsetWidth, |
| 842 | gutterLeft: left, |
| 843 | gutterWidth: width, |
| 844 | wrapperWidth: d.wrapper.clientWidth}; |
| 845 | } |
| 846 | |
| 847 | // Sync the actual display DOM structure with display.view, removing |
| 848 | // nodes for lines that are no longer in view, and creating the ones |
no test coverage detected