(widget)
| 6671 | }; |
| 6672 | |
| 6673 | function widgetHeight(widget) { |
| 6674 | if (widget.height != null) return widget.height; |
| 6675 | var cm = widget.doc.cm; |
| 6676 | if (!cm) return 0; |
| 6677 | if (!contains(document.body, widget.node)) { |
| 6678 | var parentStyle = "position: relative;"; |
| 6679 | if (widget.coverGutter) |
| 6680 | parentStyle += "margin-left: -" + cm.display.gutters.offsetWidth + "px;"; |
| 6681 | if (widget.noHScroll) |
| 6682 | parentStyle += "width: " + cm.display.wrapper.clientWidth + "px;"; |
| 6683 | removeChildrenAndAdd(cm.display.measure, elt("div", [widget.node], null, parentStyle)); |
| 6684 | } |
| 6685 | return widget.height = widget.node.parentNode.offsetHeight; |
| 6686 | } |
| 6687 | |
| 6688 | function addLineWidget(doc, handle, node, options) { |
| 6689 | var widget = new LineWidget(doc, node, options); |
no test coverage detected