(cm, lineView)
| 2183 | } |
| 2184 | |
| 2185 | function updateLineBackground(cm, lineView) { |
| 2186 | var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass; |
| 2187 | if (cls) { cls += " CodeMirror-linebackground"; } |
| 2188 | if (lineView.background) { |
| 2189 | if (cls) { lineView.background.className = cls; } |
| 2190 | else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; } |
| 2191 | } else if (cls) { |
| 2192 | var wrap = ensureLineWrapped(lineView); |
| 2193 | lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild); |
| 2194 | cm.display.input.setUneditable(lineView.background); |
| 2195 | } |
| 2196 | } |
| 2197 | |
| 2198 | // Wrapper around buildLineContent which will reuse the structure |
| 2199 | // in display.externalMeasured when possible. |
no test coverage detected