(cm)
| 2899 | // Do a bulk-read of the DOM positions and sizes needed to draw the |
| 2900 | // view, so that we don't interleave reading and writing to the DOM. |
| 2901 | function getDimensions(cm) { |
| 2902 | var d = cm.display, left = {}, width = {}; |
| 2903 | var gutterLeft = d.gutters.clientLeft; |
| 2904 | for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) { |
| 2905 | var id = cm.display.gutterSpecs[i].className; |
| 2906 | left[id] = n.offsetLeft + n.clientLeft + gutterLeft; |
| 2907 | width[id] = n.clientWidth; |
| 2908 | } |
| 2909 | return {fixedPos: compensateForHScroll(d), |
| 2910 | gutterTotalWidth: d.gutters.offsetWidth, |
| 2911 | gutterLeft: left, |
| 2912 | gutterWidth: width, |
| 2913 | wrapperWidth: d.wrapper.clientWidth} |
| 2914 | } |
| 2915 | |
| 2916 | // Computes display.scroller.scrollLeft + display.gutters.offsetWidth, |
| 2917 | // but using getBoundingClientRect to get a sub-pixel-accurate |
no test coverage detected