(lineView)
| 777 | } |
| 778 | |
| 779 | function updateLineBackground(lineView) { |
| 780 | var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass; |
| 781 | if (cls) cls += " CodeMirror-linebackground"; |
| 782 | if (lineView.background) { |
| 783 | if (cls) lineView.background.className = cls; |
| 784 | else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; } |
| 785 | } else if (cls) { |
| 786 | var wrap = ensureLineWrapped(lineView); |
| 787 | lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild); |
| 788 | } |
| 789 | } |
| 790 | |
| 791 | // Wrapper around buildLineContent which will reuse the structure |
| 792 | // in display.externalMeasured when possible. |
no test coverage detected