Takes all parent height. Only works when scrollY is set to some value, for example: 1px
<br> And scrollY value will be used as min-height for scrolling area.
172786
public void setUseParentHeight(boolean useParentHeight) {
        this.useParentHeight = useParentHeight;
        if (this.useParentHeight) {
            if (useParentHeightDrawHandler == null) {
                useParentHeightDrawHandler = new DrawHandler() {

                    @Override
                    public void afterDraw(Element tableElt, JavaScriptObject settings) {
                        if (JQMDataTable.this.useParentHeight) adjustToParentHeight();
                    }

                    @Override
                    public boolean beforeDraw(Element tableElt, JavaScriptObject settings) {
                        return true;
                    }};
                JsDataTable.addDrawHandler(getElement(), useParentHeightDrawHandler);
            }
            if (loaded) {
                initWindowResize();
                initOrientationChange();
            }
        }
    }
920060
function contentHeight( scrollable )
	{
		var overflowY = scrollable.getStyle( 'overflow-y' );

		var doc = scrollable.getDocument();
		// Create a temporary marker element.
		var marker = CKEDITOR.dom.element.createFromHtml( '<span style="margin:0;padding:0;border:0;clear:both;width:1px;height:1px;display:block;">' + ( CKEDITOR.env.webkit ? '&nbsp;' : '' ) + '</span>', doc );
		doc[ CKEDITOR.env.ie? 'getBody' : 'getDocumentElement']().append( marker );

		var height = marker.getDocumentPosition( doc ).y + marker.$.offsetHeight;
		marker.remove();
		scrollable.setStyle( 'overflow-y', overflowY );
		return height;
	}
1239870
function() {
        var dimensionModel = this.dimensionModel;
        var scrollX = dimensionModel.get('scrollX');
        var scrollY = dimensionModel.get('scrollY');
        var spaceHeights = this._getSpaceHeights(scrollX, scrollY);

        this._setScrollbar(scrollX, scrollY, spaceHeights);

        if (dimensionModel.get('frozenBorderWidth')) {
            this._setFrozenBorder(scrollX);
        }

        this._resetScrollBorderHeight();
    }
579880
public void show(Component parent) {
    Dimension parentSize = parent.getSize();
    Insets insets = getInsets();

    // reduce the width of the scrollpane by the insets so that the popup
    // is the same width as the combo box.
    parentSize.setSize(parentSize.width - (insets.right + insets.left), 10 * parentSize.height);
    Dimension scrollSize = computePopupBounds(parent, 0, getBounds().height, parentSize.width, parentSize.height).getSize();

    scroller.setMaximumSize(scrollSize);
    scroller.setPreferredSize(scrollSize);
    scroller.setMinimumSize(scrollSize);

    super.show(parent, 0, parent.getHeight());
    tree.requestFocusInWindow();
  }
992459
def scrollTo(self, index, ScrollHint):
        """"""
        # copied verbatim from chart example
        area = self.viewport().rect()
        rect = self.visualRect(index)

        if rect.left() < area.left():
            self.horizontalScrollBar().setValue(
                self.horizontalScrollBar().value() + rect.left() - area.left())
        elif rect.right() > area.right():
            self.horizontalScrollBar().setValue(
                self.horizontalScrollBar().value() + min(
                    rect.right() - area.right(), rect.left() - area.left()))

        if rect.top() < area.top():
            self.verticalScrollBar().setValue(
                self.verticalScrollBar().value() + rect.top() - area.top())
        elif rect.bottom() > area.bottom():
            self.verticalScrollBar().setValue(
                self.verticalScrollBar().value() + min(
                    rect.bottom() - area.bottom(), rect.top() - area.top()))

        self.viewport().update()
836355
function getOffsetParent(node) {
		var offsetParent = node.parentNode, documentElement = document.documentElement;
		while (offsetParent && offsetParent !== documentElement) {
			var style = window.getComputedStyle(offsetParent, null);
			if (!style) { break; }
			var overflow = style.getPropertyValue("overflow-y"); //$NON-NLS-0$
			if (overflow === "auto" || overflow === "scroll") { break; } //$NON-NLS-1$ //$NON-NLS-0$
			offsetParent = offsetParent.parentNode;
		}
		return offsetParent;
	}
1028623
function( treeWidth, treeHeight ) {
            var viewWidth = (treeWidth < this.drawArea.clientWidth) ? this.drawArea.clientWidth : treeWidth + this.CONFIG.padding*2,
                viewHeight = (treeHeight < this.drawArea.clientHeight) ? this.drawArea.clientHeight : treeHeight + this.CONFIG.padding*2;

            this._R.setSize( viewWidth, viewHeight );

            if ( this.CONFIG.scrollbar === 'resize') {
                UTIL.setDimensions( this.drawArea, viewWidth, viewHeight );
            }
            else if ( !UTIL.isjQueryAvailable() || this.CONFIG.scrollbar === 'native' ) {

                if ( this.drawArea.clientWidth < treeWidth ) { // is overflow-x necessary
                    this.drawArea.style.overflowX = "auto";
                }

                if ( this.drawArea.clientHeight < treeHeight ) { // is overflow-y necessary
                    this.drawArea.style.overflowY = "auto";
                }
            }
            // Fancy scrollbar relies heavily on jQuery, so guarding with if ( $ )
            else if ( this.CONFIG.scrollbar === 'fancy') {
                var jq_drawArea = $( this.drawArea );
                if (jq_drawArea.hasClass('ps-container')) { // znaci da je 'fancy' vec inicijaliziran, treba updateat
                    jq_drawArea.find('.Treant').css({
                        width: viewWidth,
                        height: viewHeight
                    });

                    jq_drawArea.perfectScrollbar('update');
                }
                else {
                    var mainContainer = jq_drawArea.wrapInner('<div class="Treant"/>'),
                        child = mainContainer.find('.Treant');

                    child.css({
                        width: viewWidth,
                        height: viewHeight
                    });

                    mainContainer.perfectScrollbar();
                }
            } // else this.CONFIG.scrollbar == 'None'

            return this;
        }
169695
function setScrollRoot(scrolling_element) {
  scroll_root = scrolling_element;
  scroll.goto = setScrollTopRoot;
  scroll.top = getScrollTopRoot;
}
263224
function scrollBy( x, y ) {
				// Webkit doesn't support "scrollTop/scrollLeft"
				// on documentElement/body element.
				if ( /body|html/.test( parent.getName() ) )
					parent.getWindow().$.scrollBy( x, y );
				else {
					parent.$.scrollLeft += x;
					parent.$.scrollTop += y;
				}
			}
1133792
public void adjustToParentHeight() {
        Element tableElt = getElement();
        Element wrapper = null;
        Element scrollBody = null;
        Element elt = tableElt.getParentElement();
        while (elt != null) {
            if (scrollBody == null) {
                if (JQMCommon.hasStyle(elt, SCROLL_BODY)) {
                    scrollBody = elt;
                }
            } else if (wrapper == null) {
                if (JQMCommon.hasStyle(elt, WRAPPER)) {
                    wrapper = elt;
                    break;
                }
            }
            elt = elt.getParentElement();
        }
        if (wrapper != null && scrollBody != null) {
            Element wrapParent = wrapper.getParentElement();
            if (wrapParent != null) {
                int h = wrapParent.getClientHeight();
                int wrapH = wrapper.getOffsetHeight();
                String s = scrollBody.getStyle().getHeight();
                s = StrUtils.getDigitsOnly(s);
                if (!Empty.is(s)) {
                    int scrollBodyH = Integer.parseInt(s);
                    int newH = (h - wrapH) + scrollBodyH - 1;
                    if (newH < 0) newH = 0;
                    if (scrollYnum > 0 && newH < scrollYnum) newH = scrollYnum;
                    scrollBody.getStyle().setHeight(newH, Unit.PX);
                }
            }
        }
    }
907962
function () {
            // vertical stuff
            var state = this.state,
                zoom = state.zoomState.zoom,
                zoomedWidth,
                docWidth;

            zoomedWidth = Math.floor(state.widestPage.totalActualWidth * zoom);

            // use clientWidth for the doc (prevent scrollbar)
            // use width:auto when possible
            if (zoomedWidth <= state.viewportDimensions.clientWidth) {
                docWidth = 'auto';
            } else {
                docWidth = zoomedWidth;
            }

            this.$doc.css({
                width: docWidth
            });
        }
271248
function(){
            var parentNode = React.findDOMNode(this),
                parentNodeRect = parentNode && parentNode.getBoundingClientRect();

            if (this.renderLogContainer && parentNodeRect) {
                this.renderLogContainer.style.top = (window.pageYOffset + parentNodeRect.top) + 'px';
                this.renderLogContainer.style.left = (parentNodeRect.left) + 'px';
            }
        }
1099942
function (height) {

            if (height !== undefined && height !== null && typeof(height) !== "string") {
                // TODO: check browser
                height = Math.min(17895697, height); // max height in firefox
                height += "px";
            }

            this._renderPolicyValue('height', height);
        }
458783
function(e) {
			var thumbOffset = this.thumb.region().height/2;
			this.setPositionIfValid(e._e.pageY - (this.node.region().top + this.scrollbarOffset) - thumbOffset);
		}
243304
def get_scrollbar_position_height(self):
        """"""
        vsb = self.editor.verticalScrollBar()
        style = vsb.style()
        opt = QStyleOptionSlider()
        vsb.initStyleOption(opt)

        # Get the area in which the slider handle may move.
        groove_rect = style.subControlRect(
                QStyle.CC_ScrollBar, opt, QStyle.SC_ScrollBarGroove, self)

        return float(groove_rect.height())
1221985
function () {
            if (!this.props.visible) {
                return;
            }

            var node = Preact.findDOMNode(this),
                selectedNode = $(node.parentNode).find(this.props.selectedClassName).closest("li"),
                selectionViewInfo = this.props.selectionViewInfo;

            if (selectedNode.length === 0) {
                return;
            }

            var top = selectedNode.offset().top,
                baselineHeight = node.dataset.initialHeight,
                height = baselineHeight,
                scrollerTop = selectionViewInfo.get("offsetTop");

            if (!baselineHeight) {
                baselineHeight = $(node).outerHeight();
                node.dataset.initialHeight = baselineHeight;
                height = baselineHeight;
            }

            // Check to see if the selection is completely scrolled out of view
            // to prevent the extension from appearing in the working set area.
            if (top < scrollerTop - baselineHeight) {
                node.style.display = "none";
                return;
            }

            node.style.display = "block";

            // The selectionExtension sits on top of the other nodes
            // so we need to shrink it if only part of the selection node is visible
            if (top < scrollerTop) {
                var difference = scrollerTop - top;
                top += difference;
                height = parseInt(height, 10);
                height -= difference;
            }

            node.style.top = top + "px";
            node.style.height = height + "px";
            node.style.left = selectionViewInfo.get("width") - $(node).outerWidth() + "px";
        }
386536
function checkHeightCriteria() {

  var scrollY = scrollElement.hasOwnProperty('pageYOffset') ? scrollElement.pageYOffset : scrollElement.scrollTop;
  scrollY = scrollY + window.innerHeight * 0.9;

  boxes.forEach(function(box) {
      if( ! box.mayAutoShow() || box.triggerHeight <= 0 ) {
          return;
      }

      if( scrollY > box.triggerHeight ) {
          // don't bother if another box is currently open
          if( isAnyBoxVisible() ) {
              return;
          }

          // trigger box
          box.trigger();
      } 
    
      // if box may auto-hide and scrollY is less than triggerHeight (with small margin of error), hide box
      if( box.mayRehide() && scrollY < ( box.triggerHeight - 5 ) ) {
          box.hide();
      }
  });
}