(cm)
| 691 | // Do a bulk-read of the DOM positions and sizes needed to draw the |
| 692 | // view, so that we don't interleave reading and writing to the DOM. |
| 693 | function getDimensions(cm) { |
| 694 | var d = cm.display, left = {}, width = {}; |
| 695 | for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) { |
| 696 | left[cm.options.gutters[i]] = n.offsetLeft; |
| 697 | width[cm.options.gutters[i]] = n.offsetWidth; |
| 698 | } |
| 699 | return {fixedPos: compensateForHScroll(d), |
| 700 | gutterTotalWidth: d.gutters.offsetWidth, |
| 701 | gutterLeft: left, |
| 702 | gutterWidth: width, |
| 703 | wrapperWidth: d.wrapper.clientWidth}; |
| 704 | } |
| 705 | |
| 706 | // Sync the actual display DOM structure with display.view, removing |
| 707 | // nodes for lines that are no longer in view, and creating the ones |
no test coverage detected