Calculate proper maxWidth/maxHeight depending if in maximized mode or not, and call the Div in which the
current Dialog is embedded to update its size accordingly.
@param {aria.utils.DomBeans:Size} containerSize
@protected
6732
function (containerSize) {
            var cfg = this._cfg;
            var math = ariaUtilsMath;

            var maxHeight, maxWidth;
            if (this._cfg.maximized) {
                maxHeight = containerSize.height + this._shadows.top + this._shadows.bottom;
                maxWidth = containerSize.width + this._shadows.left + this._shadows.right;
            } else {
                maxHeight = math.min(this._cfg.maxHeight, containerSize.height);
                maxWidth = math.min(this._cfg.maxWidth, containerSize.width);
            }

            var titleBarDomElt = this._titleBarDomElt;
            var titleDomElt = this._titleDomElt;

            var isIE7 = ariaCoreBrowser.isIE7;
            if (isIE7) {
                // without this, IE 7 gives wrong inner sizes
                titleDomElt.style.overflow = "visible";
            }

            titleDomElt.style.width = "";
            var titleWidth = titleDomElt.offsetWidth;
            var titleBarPaddings = ariaUtilsDom.getStylePx(titleBarDomElt, "paddingLeft", 0) + ariaUtilsDom.getStylePx(titleBarDomElt, "paddingRight",0);
            var childNodes = titleBarDomElt.childNodes;
            var iconsWidth = 0;
            for (var i = 0, ii = childNodes.length; i < ii; i++) {
                var node = childNodes[i];
                iconsWidth += node !== titleDomElt ? node.offsetWidth : 0;
            }

            // First manage the width of the modal depending on the title bar and the max width
            var shadows = this._shadows;
            var minWidth = ariaUtilsMath.max(cfg.width, cfg.minWidth);
            if (cfg.width == -1) {
                minWidth = ariaUtilsMath.max(titleBarPaddings + titleWidth + iconsWidth + shadows.left + shadows.right, minWidth);
            }

            // if maximized == true, then height|widthMaximized will be used; otherwise normal width and height
            this._div.updateSize({
                maxHeight : maxHeight,
                maxWidth : maxWidth,
                minWidth : minWidth,
                height : cfg.height,
                width : cfg.width,
                heightMaximized : cfg.heightMaximized,
                widthMaximized : cfg.widthMaximized,
                maximized : cfg.maximized
            });

            // The manage the title length to manage the text-overflow
            var titleBarInnerWidth = titleBarDomElt.clientWidth - titleBarPaddings;
            var titlePaddings = ariaUtilsDom.getStylePx(titleDomElt, "paddingLeft", 0) + ariaUtilsDom.getStylePx(titleDomElt, "paddingRight", 0);
            titleDomElt.style.width = ariaUtilsMath.max(titleBarInnerWidth - titlePaddings - iconsWidth - shadows.left - shadows.right - 1, 0) + "px";

            if (isIE7) {
                // Back to overflow hidden mode
                titleDomElt.style.overflow = "hidden";
            }

        }
826633
function () {
        // get the window dimensions
        var windowWidth = $window.innerWidth;
        var windowHeight = $window.innerHeight;

        // calculate the max/min dimensions for the image
        var imageDimensionLimits = Lightbox.calculateImageDimensionLimits({
          'windowWidth': windowWidth,
          'windowHeight': windowHeight,
          'imageWidth': imageWidth,
          'imageHeight': imageHeight
        });

        // calculate the dimensions to display the image
        var imageDisplayDimensions = calculateImageDisplayDimensions(
          angular.extend({
            'width': imageWidth,
            'height': imageHeight,
            'minWidth': 1,
            'minHeight': 1,
            'maxWidth': 3000,
            'maxHeight': 3000,
          }, imageDimensionLimits),
          Lightbox.fullScreenMode
        );

        // calculate the dimensions of the modal container
        var modalDimensions = Lightbox.calculateModalDimensions({
          'windowWidth': windowWidth,
          'windowHeight': windowHeight,
          'imageDisplayWidth': imageDisplayDimensions.width,
          'imageDisplayHeight': imageDisplayDimensions.height
        });

        // resize the image
        element.css({
          'width': imageDisplayDimensions.width + 'px',
          'height': imageDisplayDimensions.height + 'px'
        });

        // setting the height on .modal-dialog does not expand the div with the
        // background, which is .modal-content
        angular.element(
          document.querySelector('.lightbox-modal .modal-dialog')
        ).css({
          'width': formatDimension(modalDimensions.width)
        });

        // .modal-content has no width specified; if we set the width on
        // .modal-content and not on .modal-dialog, .modal-dialog retains its
        // default width of 600px and that places .modal-content off center
        angular.element(
          document.querySelector('.lightbox-modal .modal-content')
        ).css({
          'height': formatDimension(modalDimensions.height)
        });
      }
578625
private void obtainDialogMaxWidth(@NonNull final TypedArray typedArray) {
        try {
            int maxWidth = typedArray
                    .getDimensionPixelSize(R.styleable.DialogPreference_dialogMaxWidth, -1);

            if (maxWidth != -1) {
                setDialogMaxWidth(maxWidth);
            }
        } catch (Resources.NotFoundException | UnsupportedOperationException e) {
            // No need to handle
        }
    }
1147826
function(w, h) {
			if (w && h) {
				/* Reset apparent image size first so container grows */
				this.$content.css('width', '').css('height', '');
				/* Calculate the worst ratio so that dimensions fit */
				 /* Note: -1 to avoid rounding errors */
				var ratio = Math.max(
					w  / (this.$content.parent().width()-1),
					h / (this.$content.parent().height()-1));
				/* Resize content */
				if (ratio > 1) {
					ratio = h / Math.floor(h / ratio); /* Round ratio down so height calc works */
					this.$content.css('width', '' + w / ratio + 'px').css('height', '' + h / ratio + 'px');
				}
			}
		}
1038019
function sizeiframe(size,animate) {
    var theSize;

    if(size>maxViewportWidth) { //If the entered size is larger than the max allowed viewport size, cap value at max vp size
      theSize = maxViewportWidth;
    } else if(size<minViewportWidth) { //If the entered size is less than the minimum allowed viewport size, cap value at min vp size
      theSize = minViewportWidth;
    } else {
      theSize = size;
    }

    //Conditionally remove CSS animation class from viewport
    if(animate===false) {
      $('#sg-gen-container,#sg-viewport').removeClass("vp-animate"); //If aninate is set to false, remove animate class from viewport
    } else {
      $('#sg-gen-container,#sg-viewport').addClass("vp-animate");
    }

    $('#sg-gen-container').width(theSize+viewportResizeHandleWidth); //Resize viewport wrapper to desired size + size of drag resize handler
    $sgViewport.width(theSize); //Resize viewport to desired size

    var targetOrigin = (window.location.protocol === "file:") ? "*" : window.location.protocol+"//"+window.location.host;
    var obj = JSON.stringify({ "event": "patternLab.resize", "resize": "true" });
    document.getElementById('sg-viewport').contentWindow.postMessage(obj,targetOrigin);

    updateSizeReading(theSize); //Update values in toolbar
    saveSize(theSize); //Save current viewport to cookie
  }
140463
function maxWrapperPosition() {
        var a = (wrapperSize - containerSize);
        if (params.freeMode) {
            a = wrapperSize - containerSize;
        }
        // if (params.loop) a -= containerSize;
        if (params.slidesPerView > _this.slides.length && !params.centeredSlides) {
            a = 0;
        }
        if (a < 0) a = 0;
        return a;
    }
957232
function onResize() {
    const width = window.innerWidth;
    if (width >= 1024) {
      if (!lastSize || lastSize === 'narrow') {
        lastSize = 'wide';

        const expandedState = menu.getAttribute('aria-expanded');
        if (expandedState) {
          menu.setAttribute('data-prev-expanded', expandedState);
        }

        menu.removeAttribute('aria-expanded');
        if (scrim) {
          Classlist(scrim)
            .remove('dqpl-scrim-show')
            .remove('dqpl-scrim-fade-in');
        }

        if (trigger.tabIndex === 0) {
          // since `$trigger` gets hidden (via css hook)
          // "activate" something else in the menubar
          const topBarMenuItems = getTopLevels(topBar.querySelector('[role="menubar"]'), true);
          update(topBarMenuItems);
          topBarMenuItems.forEach((item, i) => item.tabIndex = i === 0 ? 0 : -1);
        }
        menu.setAttribute('data-locked', 'true');
      }
    } else {
      if (!lastSize || lastSize === 'wide') {
        lastSize = 'narrow';
        const wasExpanded = menu.getAttribute('data-prev-expanded') === 'true';
        menu.setAttribute('aria-expanded', wasExpanded ? 'true' : 'false');
        update(getTopLevels(topBar.querySelector('ul'), true));
        menu.setAttribute('data-locked', 'false');

        if (wasExpanded === 'true' && scrim) {
          Classlist(scrim)
            .add('dqpl-scrim-show')
            .add('dqpl-scrim-fade-in');
        }
      }
    }
  }
188023
function(contentSize) { 
        OpenLayers.Popup.prototype.setSize.apply(this, arguments);

        if ((this.lonlat) && (this.map)) {
            var px = this.map.getLayerPxFromLonLat(this.lonlat);
            this.moveTo(px);
        }
    }
1366397
function updateResizeLimits() {
        var editorAreaHeight = $editorHolder.height();

        $editorHolder.siblings().each(function (i, elem) {
            var $elem = $(elem);
            if ($elem.css("display") === "none") {
                $elem.data("maxsize", editorAreaHeight);
            } else {
                $elem.data("maxsize", editorAreaHeight + $elem.outerHeight());
            }
        });
    }
1217979
function () {
            if (!this._cfg.maximized) { // in maximized mode, positioning is handled by the Popup itself
                var position = this._popupContainer.calculatePosition(this._domElt);
                this.setProperty("xpos", position.left);
                this.setProperty("ypos", position.top);
            }
        }
133413
public void setSize(int newWidth, int newHeight) {
		this.width = newWidth;
		this.height = newHeight;

		if (helper.getRootElement() != null) {
			applyElementSize(helper.getRootElement(), newWidth, newHeight, false);
			Dom.setStyleAttribute(helper.getRootElement(), "clip", "rect(0 " + newWidth + "px " + newHeight + "px 0)");
		} else {
			SC.logWarn("problems");
		}
	}
315117
private Dimension layoutSize(Container target, boolean preferred)
	{
	synchronized (target.getTreeLock())
	{
		//  Each row must fit with the width allocated to the containter.
		//  When the container width = 0, the preferred width of the container
		//  has not yet been calculated so lets ask for the maximum.

		int targetWidth = target.getSize().width;
		Container container = target;

		while (container.getSize().width == 0 && container.getParent() != null)
		{
			container = container.getParent();
		}

		targetWidth = container.getSize().width;

		if (targetWidth == 0)
			targetWidth = Integer.MAX_VALUE;

		int hgap = getHgap();
		int vgap = getVgap();
		Insets insets = target.getInsets();
		int horizontalInsetsAndGap = insets.left + insets.right + (hgap * 2);
		int maxWidth = targetWidth - horizontalInsetsAndGap;

		//  Fit components into the allowed width

		Dimension dim = new Dimension(0, 0);
		int rowWidth = 0;
		int rowHeight = 0;

		int nmembers = target.getComponentCount();

		for (int i = 0; i < nmembers; i++)
		{
			Component m = target.getComponent(i);

			if (m.isVisible())
			{
				Dimension d = preferred ? m.getPreferredSize() : m.getMinimumSize();

				//  Can't add the component to current row. Start a new row.

				if (rowWidth + d.width > maxWidth)
				{
					addRow(dim, rowWidth, rowHeight);
					rowWidth = 0;
					rowHeight = 0;
				}

				//  Add a horizontal gap for all components after the first

				if (rowWidth != 0)
				{
					rowWidth += hgap;
				}

				rowWidth += d.width;
				rowHeight = Math.max(rowHeight, d.height);
			}
		}

		addRow(dim, rowWidth, rowHeight);

		dim.width += horizontalInsetsAndGap;
		dim.height += insets.top + insets.bottom + vgap * 2;

		//	When using a scroll pane or the DecoratedLookAndFeel we need to
		//  make sure the preferred size is less than the size of the
		//  target containter so shrinking the container size works
		//  correctly. Removing the horizontal gap is an easy way to do this.

		Container scrollPane = SwingUtilities.getAncestorOfClass(JScrollPane.class, target);

		if (scrollPane != null && target.isValid())
		{
			dim.width -= (hgap + 1);
		}

		return dim;
	}
	}
1180994
function( width, height ){

            if ( width === undefined && height === undefined ){
                width = this.container.offsetWidth;
                height = this.container.offsetHeight;
            }

            this.width = width || 0;
            this.height = height || 0;
            // should be implemented in renderers
        }
1133313
function() {
        // the div might have moved on the page, also
        var newSize = this.getCurrentSize();
        if (newSize && !isNaN(newSize.h) && !isNaN(newSize.w)) {
            this.events.clearMouseCache();
            var oldSize = this.getSize();
            if (oldSize == null) {
                this.size = oldSize = newSize;
            }
            if (!newSize.equals(oldSize)) {
                
                // store the new size
                this.size = newSize;
    
                //notify layers of mapresize
                for(var i=0, len=this.layers.length; i<len; i++) {
                    this.layers[i].onMapResize();                
                }
    
                var center = this.getCachedCenter();
    
                if (this.baseLayer != null && center != null) {
                    var zoom = this.getZoom();
                    this.zoom = null;
                    this.setCenter(center, zoom);
                }
    
            }
        }
        this.events.triggerEvent("updatesize");
    }
704313
function() {

		// If there is no min width set, or not content items, do nothing.
		if( !this._useResponsiveLayout() || this._updatingColumnsResponsive || !this.config.dimensions || !this.config.dimensions.minItemWidth || this.root.contentItems.length === 0 || !this.root.contentItems[ 0 ].isRow ) {
			this._firstLoad = false;
			return;
		}

		this._firstLoad = false;

		// If there is only one column, do nothing.
		var columnCount = this.root.contentItems[ 0 ].contentItems.length;
		if( columnCount <= 1 ) {
			return;
		}

		// If they all still fit, do nothing.
		var minItemWidth = this.config.dimensions.minItemWidth;
		var totalMinWidth = columnCount * minItemWidth;
		if( totalMinWidth <= this.width ) {
			return;
		}

		// Prevent updates while it is already happening.
		this._updatingColumnsResponsive = true;

		// Figure out how many columns to stack, and put them all in the first stack container.
		var finalColumnCount = Math.max( Math.floor( this.width / minItemWidth ), 1 );
		var stackColumnCount = columnCount - finalColumnCount;

		var rootContentItem = this.root.contentItems[ 0 ];
		var firstStackContainer = this._findAllStackContainers()[ 0 ];
		for( var i = 0; i < stackColumnCount; i++ ) {
			// Stack from right.
			var column = rootContentItem.contentItems[ rootContentItem.contentItems.length - 1 ];
			this._addChildContentItemsToContainer( firstStackContainer, column );
		}

		this._updatingColumnsResponsive = false;
	}
365720
function(zoomLevel) {
    var self = this;

    if (zoomLevel == null) {
      zoomLevel = self.__zoomLevel;
    }

    self.__maxScrollLeft = Math.max((self.__contentWidth * zoomLevel) - self.__clientWidth, 0);
    self.__maxScrollTop = Math.max((self.__contentHeight * zoomLevel) - self.__clientHeight, 0);

    if (!self.__didWaitForSize && !self.__maxScrollLeft && !self.__maxScrollTop) {
      self.__didWaitForSize = true;
      self.__waitForSize();
    }
  }
1313751
function (element) {
            var size = ariaUtilsSize.getSize(element), domUtil = ariaUtilsDom;
            domUtil.scrollIntoView(element);
            var position = this.popupContainer.calculatePosition(element);

            this.reference = element;
            this.referencePosition = position;
            this.referenceSize = size;
        }