(cm, lineView)
| 3330 | } |
| 3331 | |
| 3332 | function updateLineBackground(cm, lineView) { |
| 3333 | var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass |
| 3334 | if (cls) { |
| 3335 | cls += " CodeMirror-linebackground" |
| 3336 | } |
| 3337 | if (lineView.background) { |
| 3338 | if (cls) { |
| 3339 | lineView.background.className = cls |
| 3340 | } else { |
| 3341 | lineView.background.parentNode.removeChild(lineView.background) |
| 3342 | lineView.background = null |
| 3343 | } |
| 3344 | } else if (cls) { |
| 3345 | var wrap = ensureLineWrapped(lineView) |
| 3346 | lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild) |
| 3347 | cm.display.input.setUneditable(lineView.background) |
| 3348 | } |
| 3349 | } |
| 3350 | |
| 3351 | // Wrapper around buildLineContent which will reuse the structure |
| 3352 | // in display.externalMeasured when possible. |
no test coverage detected