Convert a CSS unit width to pixels (e.g. 2em)
@param {string} width width to be converted
@param {node} parent parent to get the with for (required for relative widths) - optional
@returns {int} width in pixels
@memberof DataTable#oApi
509828
function _fnConvertToWidth ( width, parent )
	{
		if ( ! width ) {
			return 0;
		}
	
		var n = $('<div/>')
			.css( 'width', _fnStringToCss( width ) )
			.appendTo( parent || document.body );
	
		var val = n[0].offsetWidth;
		n.remove();
	
		return val;
	}
1279819
function dimensions(el, width, height) {
        var el_width = Embedo.utils.compute(el, 'width');
        width = width ?
          width :
          el_width > 0 ?
          el_width :
          Embedo.utils.compute(el.parentNode, 'width');
        height = height ?
          height :
          el_width > 0 ?
          el_width / 1.5 :
          Embedo.utils.compute(el.parentNode, 'height');
        return {
          width: width,
          height: height
        };
      }
78142
function _fnConvertToWidth ( sWidth, nParent )
		{
			if ( !sWidth || sWidth === null || sWidth === '' )
			{
				return 0;
			}
			
			if ( !nParent )
			{
				nParent = document.getElementsByTagName('body')[0];
			}
			
			var iWidth;
			var nTmp = document.createElement( "div" );
			nTmp.style.width = _fnStringToCss( sWidth );
			
			nParent.appendChild( nTmp );
			iWidth = nTmp.offsetWidth;
			nParent.removeChild( nTmp );
			
			return ( iWidth );
		}
346989
function(width) {
            Kinetic.Node.prototype.setWidth.call(this, width);
            this.setRadius({
                x: width / 2
            });
        }
1283425
int calculateWidth() {

        int result;
        if (m_inline && CmsDomUtil.getCurrentStyle(getElement(), Style.display).equals("inline")) {
            com.google.gwt.dom.client.Element parentBlock = getElement().getParentElement();
            while (CmsDomUtil.getCurrentStyle(parentBlock, Style.display).equals("inline")) {
                parentBlock = parentBlock.getParentElement();
            }
            result = parentBlock.getOffsetWidth();
        } else {
            result = getElement().getOffsetWidth();
        }
        return result - 2;
    }
1204088
def opt_width(self, width):
        
        if width != "auto":
            width = int(width)
        self.conf["width"] = width
806441
function w(d, outer) {
		var width = self.options.cellSize*self._domainType[self.options.subDomain].column(d) + self.options.cellPadding*self._domainType[self.options.subDomain].column(d);
		if (arguments.length === 2 && outer === true) {
			return width += self.domainHorizontalLabelWidth + self.options.domainGutter + self.options.domainMargin[1] + self.options.domainMargin[3];
		}
		return width;
	}
9634
function (elm) {
        var self = this, w, h;

        elm = self.get(elm);
        w = self.getStyle(elm, 'width');
        h = self.getStyle(elm, 'height');

        // Non pixel value, then force offset/clientWidth
        if (w.indexOf('px') === -1) {
          w = 0;
        }

        // Non pixel value, then force offset/clientWidth
        if (h.indexOf('px') === -1) {
          h = 0;
        }

        return {
          w: parseInt(w, 10) || elm.offsetWidth || elm.clientWidth,
          h: parseInt(h, 10) || elm.offsetHeight || elm.clientHeight
        };
      }
302893
function (d, chart, series) {
            var returnWidth = 0;
            if (series.x.measure !== null && series.x.measure !== undefined) {
                returnWidth = Math.abs(series.x._scale((d.x < 0 ? d.x - d.width : d.x + d.width)) - series.x._scale(d.x));
            } else if (series.x._hasTimeField()) {
                returnWidth = series.x.floatingBarWidth;
            } else {
                returnWidth = d.width * ((chart._widthPixels() / series.x._max) - (dimple._helpers.xGap(chart, series) * 2)) - (dimple._helpers.xClusterGap(d, chart, series) * 2);
            }
            return returnWidth;
        }
1170813
function checkParentsProperty(elem, property, value) {
    while (elem = elem.offsetParent) {
        if (getCss(elem, property) === value) {
            return true;
        }
    }
    return false;
}
1144727
private static int typeFromWidthNative(final int width) {
        switch (width) {
            case 16:
                return ICNS.is32;
            case 32:
                return ICNS.il32;
            case 48:
                return ICNS.ih32;
            case 128:
                return ICNS.it32;
            default:
                throw new IllegalArgumentException(String.format("Unsupported dimensions for ICNS, only 16, 32, 48 and 128 supported: %dx%d", width, width));
        }
    }
642454
function (width, height, canvas) {
            // XXX This should probably be a configurable option
            var match;
            match = this._pxregex.exec(height);
            if (match) {
                this.pixelHeight = match[1];
            } else {
                this.pixelHeight = $(canvas).height();
            }
            match = this._pxregex.exec(width);
            if (match) {
                this.pixelWidth = match[1];
            } else {
                this.pixelWidth = $(canvas).width();
            }
        }
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();
  }
736538
public static int getRealLeft(boolean isRtl, int parentLeft, int parentWidth, int left, int width) {
        if (isRtl) {
            // 1, trim the parent's left.
            left -= parentLeft;
            // 2, calculate the RTL left.
            left = parentWidth - width - left;
            // 3, add the parent's left.
            left += parentLeft;
        }
        return left;
    }
590759
public static double convertFontSize(double parent, CSSProperty.FontSize value)
    {
        double em = parent;
        double ret = em;
        if (value == CSSProperty.FontSize.MEDIUM)
            ret = medium_font;
        else if (value == CSSProperty.FontSize.SMALL)
            ret = medium_font / font_step;
        else if (value == CSSProperty.FontSize.X_SMALL)
            ret = medium_font / font_step / font_step;
        else if (value == CSSProperty.FontSize.XX_SMALL)
            ret = medium_font / font_step / font_step / font_step;
        else if (value == CSSProperty.FontSize.LARGE)
            ret = medium_font * font_step;
        else if (value == CSSProperty.FontSize.X_LARGE)
            ret = medium_font * font_step * font_step;
        else if (value == CSSProperty.FontSize.XX_LARGE)
            ret = medium_font * font_step * font_step * font_step;
        else if (value == CSSProperty.FontSize.SMALLER)
            ret = em / font_step;
        else if (value == CSSProperty.FontSize.LARGER)
            ret = em * font_step;
        return ret;
    }
772595
function calcPreferredSize(pw) {
            if (arguments.length > 0) {
                var bl = [];
                if (this.$lastWidth < 0 || this.$lastWidth !== pw) {
                    bl = this.$breakToLines(pw);
                } else {
                    bl = this.$brokenLines;
                }

                return {
                    width  : pw,
                    height : bl.length * this.getLineHeight() +
                            (bl.length - 1) * this.lineIndent
                };
            } else {
                return this.$super();
            }
        }
898087
function getStartEndRowsFromBoardSize(boardSize) {
    const endRow = boardSize.y - 1;
    return {
        white: getStartEndRow(endRow, false),
        black: getStartEndRow(endRow, true)
    };
}