(widget)
| 6696 | }; |
| 6697 | |
| 6698 | function widgetHeight(widget) { |
| 6699 | if (widget.height != null) return widget.height; |
| 6700 | var cm = widget.doc.cm; |
| 6701 | if (!cm) return 0; |
| 6702 | if (!contains(document.body, widget.node)) { |
| 6703 | var parentStyle = "position: relative;"; |
| 6704 | if (widget.coverGutter) |
| 6705 | parentStyle += "margin-left: -" + cm.display.gutters.offsetWidth + "px;"; |
| 6706 | if (widget.noHScroll) |
| 6707 | parentStyle += "width: " + cm.display.wrapper.clientWidth + "px;"; |
| 6708 | removeChildrenAndAdd(cm.display.measure, elt("div", [widget.node], null, parentStyle)); |
| 6709 | } |
| 6710 | return widget.height = widget.node.parentNode.offsetHeight; |
| 6711 | } |
| 6712 | |
| 6713 | function addLineWidget(doc, handle, node, options) { |
| 6714 | var widget = new LineWidget(doc, node, options); |
no test coverage detected