(cm, lineView)
| 2114 | } |
| 2115 | |
| 2116 | function updateLineBackground(cm, lineView) { |
| 2117 | var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass; |
| 2118 | if (cls) { cls += " CodeMirror-linebackground"; } |
| 2119 | if (lineView.background) { |
| 2120 | if (cls) { lineView.background.className = cls; } |
| 2121 | else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; } |
| 2122 | } else if (cls) { |
| 2123 | var wrap = ensureLineWrapped(lineView); |
| 2124 | lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild); |
| 2125 | cm.display.input.setUneditable(lineView.background); |
| 2126 | } |
| 2127 | } |
| 2128 | |
| 2129 | // Wrapper around buildLineContent which will reuse the structure |
| 2130 | // in display.externalMeasured when possible. |
no test coverage detected