(cm)
| 4325 | // Do a bulk-read of the DOM positions and sizes needed to draw the |
| 4326 | // view, so that we don't interleave reading and writing to the DOM. |
| 4327 | function getDimensions(cm) { |
| 4328 | var d = cm.display, |
| 4329 | left = {}, |
| 4330 | width = {} |
| 4331 | var gutterLeft = d.gutters.clientLeft |
| 4332 | for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) { |
| 4333 | left[cm.options.gutters[i]] = n.offsetLeft + n.clientLeft + gutterLeft |
| 4334 | width[cm.options.gutters[i]] = n.clientWidth |
| 4335 | } |
| 4336 | return { fixedPos: compensateForHScroll(d), gutterTotalWidth: d.gutters.offsetWidth, gutterLeft: left, gutterWidth: width, wrapperWidth: d.wrapper.clientWidth } |
| 4337 | } |
| 4338 | |
| 4339 | // Computes display.scroller.scrollLeft + display.gutters.offsetWidth, |
| 4340 | // but using getBoundingClientRect to get a sub-pixel-accurate |
no test coverage detected