Allows to redraw the view size to wrap the content of the bigger child.

@param widthMeasureSpec  with measured
@param heightMeasureSpec height measured
177610
@Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        try {
            int mode = MeasureSpec.getMode(heightMeasureSpec);

            if (mode == MeasureSpec.UNSPECIFIED || mode == MeasureSpec.AT_MOST) {
                super.onMeasure(widthMeasureSpec, heightMeasureSpec);
                int height = 0;
                for (int i = 0; i < getChildCount(); i++) {
                    View child = getChildAt(i);
                    if (child != null) {
                        child.measure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
                        int h = child.getMeasuredHeight();
                        if (h > height) {
                            height = h;
                        }
                    }
                }
                heightMeasureSpec = MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY);
            }

            super.onMeasure(widthMeasureSpec, heightMeasureSpec);
        } catch (RuntimeException e) {
            Log.e(TAG, "Exception during WrapContentViewPager onMeasure " + e.toString());
        }
    }
1340113
public void setSize (int width, int height) {
    rootElement.getStyle().setWidth(width, Unit.PX);
    rootElement.getStyle().setHeight(height, Unit.PX);
    // the frame buffer may be larger (or smaller) than the logical size, depending on whether
    // we're on a HiDPI display, or how the game has configured things (maybe they're scaling down
    // from native resolution to improve performance)
    Scale fbScale = new Scale(frameBufferPixelRatio);
    canvas.setWidth(fbScale.scaledCeil(width));
    canvas.setHeight(fbScale.scaledCeil(height));
    // set the canvas's CSS size to the logical size; the browser works in logical pixels
    canvas.getStyle().setWidth(width, Style.Unit.PX);
    canvas.getStyle().setHeight(height, Style.Unit.PX);
    viewportChanged(canvas.getWidth(), canvas.getHeight());
  }
47315
public int[] processOnMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        if (mIsHide) {
            panelLayout.setVisibility(View.GONE);
            /*
             * The current frame will be visible nil.
             */
            widthMeasureSpec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.EXACTLY);
            heightMeasureSpec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.EXACTLY);
        }

        final int[] processedMeasureWHSpec = new int[2];
        processedMeasureWHSpec[0] = widthMeasureSpec;
        processedMeasureWHSpec[1] = heightMeasureSpec;

        return processedMeasureWHSpec;
    }
88348
@Override
    public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        int measuredWidth = MeasureSpec.getSize(widthMeasureSpec);
        int widthMode = MeasureSpec.getMode(widthMeasureSpec);
        int measuredHeight = MeasureSpec.getSize(heightMeasureSpec);
        int heightMode = MeasureSpec.getMode(heightMeasureSpec);
        int minDimension = Math.min(measuredWidth, measuredHeight);

        super.onMeasure(MeasureSpec.makeMeasureSpec(minDimension, widthMode),
                MeasureSpec.makeMeasureSpec(minDimension, heightMode));
    }
588869
public void setSize(int width, int height) {
    rootElement.getStyle().setWidth(width, Unit.PX);
    rootElement.getStyle().setHeight(height, Unit.PX);
  }
1323312
@Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
    super.onMeasure(widthMeasureSpec, heightMeasureSpec);

    int viewWidth = circleRadius + this.getPaddingLeft() + this.getPaddingRight();
    int viewHeight = circleRadius + this.getPaddingTop() + this.getPaddingBottom();

    int widthMode = MeasureSpec.getMode(widthMeasureSpec);
    int widthSize = MeasureSpec.getSize(widthMeasureSpec);
    int heightMode = MeasureSpec.getMode(heightMeasureSpec);
    int heightSize = MeasureSpec.getSize(heightMeasureSpec);

    int width;
    int height;

    //Measure Width
    if (widthMode == MeasureSpec.EXACTLY) {
      //Must be this size
      width = widthSize;
    } else if (widthMode == MeasureSpec.AT_MOST) {
      //Can't be bigger than...
      width = Math.min(viewWidth, widthSize);
    } else {
      //Be whatever you want
      width = viewWidth;
    }

    //Measure Height
    if (heightMode == MeasureSpec.EXACTLY || widthMode == MeasureSpec.EXACTLY) {
      //Must be this size
      height = heightSize;
    } else if (heightMode == MeasureSpec.AT_MOST) {
      //Can't be bigger than...
      height = Math.min(viewHeight, heightSize);
    } else {
      //Be whatever you want
      height = viewHeight;
    }

    setMeasuredDimension(width, height);
  }
1373749
public synchronized void setManualFramingRect(int width, int height) {
    if (initialized) {
      Point screenResolution = configManager.getScreenResolution();
      if (width > screenResolution.x) {
        width = screenResolution.x;
      }
      if (height > screenResolution.y) {
        height = screenResolution.y;
      }
      int leftOffset = (screenResolution.x - width) / 2;
      int topOffset = (screenResolution.y - height) / 2;
      framingRect = new Rect(leftOffset, topOffset, leftOffset + width, topOffset + height);
      Log.d(TAG, "Calculated manual framing rect: " + framingRect);
      framingRectInPreview = null;
    } else {
      requestedFramingRectWidth = width;
      requestedFramingRectHeight = height;
    }
  }
573919
public void resize(int width, int height) {
        String action = "Resizing browser to " + width + " x " + height;
        String expected = "Browser is resized to " + width + " x " + height;
        try {
            Dimension dimension = new Dimension(width, height);
            driver.manage().window().setSize(dimension);
        } catch (Exception e) {
            reporter.fail(action, expected, "Browser was unable to be resized. " + e.getMessage());
            log.warn(e);
            return;
        }
        reporter.pass(action, expected, expected);
    }
757748
function (width, height, interpolation) {
		this.widthOriginal = parseInt(this.width);
		this.heightOriginal = parseInt(this.height);
		this.targetWidth = Math.abs(parseInt(width) || 0);
		this.targetHeight = Math.abs(parseInt(height) || 0);
		this.colorChannels = 4;
		this.interpolationPass = !!interpolation;

		this.targetWidthMultipliedByChannels = this.targetWidth * this.colorChannels;
		this.originalWidthMultipliedByChannels = this.widthOriginal * this.colorChannels;
		this.originalHeightMultipliedByChannels = this.heightOriginal * this.colorChannels;
		this.widthPassResultSize = this.targetWidthMultipliedByChannels * this.heightOriginal;
		this.finalResultSize = this.targetWidthMultipliedByChannels * this.targetHeight;
		
		
		if (this.widthOriginal == this.targetWidth) { //Bypass the width resizer pass:
			this.resizeWidth = this._bypassResizer;
		}
		else { //Setup the width resizer pass:
			this.ratioWeightWidthPass = this.widthOriginal / this.targetWidth;
			if (this.ratioWeightWidthPass < 1 && this.interpolationPass) {
				this._initializeFirstPassBuffers(true);
				this.resizeWidth = this._resizeWidthInterpolatedRGBA;
			}
			else {
				this._initializeFirstPassBuffers(false);
				this.resizeWidth = this._resizeWidthRGBA;
			}
		}
		if (this.heightOriginal == this.targetHeight) { //Bypass the height resizer pass:
			this.resizeHeight = this._bypassResizer;
		}
		else {	
			//Setup the height resizer pass:
			this.ratioWeightHeightPass = this.heightOriginal / this.targetHeight;
			if (this.ratioWeightHeightPass < 1 && this.interpolationPass) {
				this._initializeSecondPassBuffers(true);
				this.resizeHeight = this._resizeHeightInterpolated;
			}
			else {
				this._initializeSecondPassBuffers(false);
				this.resizeHeight = this._resizeHeightRGBA;
			}
		}
		
		this.data = this.resizeHeight(this.resizeWidth(this.data));
		
		this.width = width;
		this.height = height;
	}
637220
@Override
    protected void layoutChildren() {
        Insets ins = getInsets();
        visibleParagraphs.suspendWhile(() -> {
            virtualFlow.resizeRelocate(
                    ins.getLeft(), ins.getTop(),
                    getWidth() - ins.getLeft() - ins.getRight(),
                    getHeight() - ins.getTop() - ins.getBottom());

            if(followCaretRequested) {
                followCaretRequested = false;
                try (Guard g = viewportDirty.suspend()) {
                    followCaret();
                }
            }
        });
    }
1292722
function (width, height) {
            this._updateFrameWidth(width);
            this._frame.resize(this._frameWidth, height);
            this.innerWidth = this._frame.innerWidth;
            this.innerHeight = this._frame.innerHeight;
        }
565429
@UiThread
    protected void parentExpandedFromViewHolder(int flatParentPosition) {
        ExpandableWrapper<P, C> parentWrapper = mFlatItemList.get(flatParentPosition);
        updateExpandedParent(parentWrapper, flatParentPosition, true);
    }
369114
public void setTextureSize(int width, int height) {
		setPreferredSize(new Dimension(width, height));
		setSize(new Dimension(width, height));
		this.width = width;
		this.height = height;
	}
866415
@Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        if (mOrientation == HORIZONTAL) {
            setMeasuredDimension(measureLong(widthMeasureSpec), measureShort(heightMeasureSpec));
        } else {
            setMeasuredDimension(measureShort(widthMeasureSpec), measureLong(heightMeasureSpec));
        }
    }
888444
public void setSize(double width, double height) {
        this.setMinSize(StackPane.USE_PREF_SIZE, StackPane.USE_PREF_SIZE);
        this.setPrefSize(width, height);
        this.setMaxSize(StackPane.USE_PREF_SIZE, StackPane.USE_PREF_SIZE);
    }
1243855
private void _setPreparedSize (@Nonnull final SizeSpec aPreparedSize)
  {
    ValueEnforcer.notNull (aPreparedSize, "PreparedSize");

    m_bPrepared = true;
    m_aPreparedSize = aPreparedSize;
    m_aRenderSize = getRenderSize (aPreparedSize);

    if (PLDebugLog.isDebugPrepare ())
    {
      String sSuffix = "";
      if (this instanceof IPLHasMarginBorderPadding <?>)
      {
        sSuffix = " with " +
                  PLDebugLog.getXMBP ((IPLHasMarginBorderPadding <?>) this) +
                  " and " +
                  PLDebugLog.getYMBP ((IPLHasMarginBorderPadding <?>) this);
      }
      PLDebugLog.debugPrepare (this,
                               "Prepared object: " +
                                     PLDebugLog.getWH (aPreparedSize) +
                                     sSuffix +
                                     "; Render size: " +
                                     PLDebugLog.getWH (m_aRenderSize));
    }
  }
467806
private int setViewSize(int mode, int size, int drawableWidth) {
        int viewSize;
        switch (mode) {
            case MeasureSpec.EXACTLY:
                viewSize = size;
                break;

            case MeasureSpec.AT_MOST:
                viewSize = Math.min(drawableWidth, size);
                break;

            case MeasureSpec.UNSPECIFIED:
                viewSize = drawableWidth;
                break;

            default:
                viewSize = size;
                break;
        }
        return viewSize;
    }