Home | History | Annotate | Download | only in rendering

Lines Matching full:width

252     return width() - borderLeft() - borderRight() - verticalScrollbarWidth();
302 rects.append(IntRect(tx, ty, width(), height()));
307 quads.append(localToAbsoluteQuad(FloatRect(0, 0, width(), height())));
341 if (width() && height())
342 rects.append(IntRect(tx, ty, width(), height()));
360 result.move(-box.width() - reflectionOffset(), 0);
363 result.move(box.width() + reflectionOffset(), 0);
374 return style()->boxReflect()->offset().calcValue(borderBoxRect().width());
393 result.setX(box.x() - reflectionOffset() - box.width() + (box.right() - r.right()));
492 return hasOverrideSize() ? overrideSize() : width();
500 int RenderBox::calcBorderBoxWidth(int width) const
504 return width + bordersPlusPadding;
505 return max(width, bordersPlusPadding);
516 int RenderBox::calcContentBoxWidth(int width) const
519 width -= (borderLeft() + borderRight() + paddingLeft() + paddingRight());
520 return max(0, width);
546 if (visibleToHitTesting() && action == HitTestForeground && IntRect(tx, ty, width(), height()).contains(xPos, yPos)) {
586 int w = width();
595 rw = view()->width();
623 int w = width();
658 int w = width();
741 calculateBackgroundImageGeometry(maskLayer, bbox.x(), bbox.y(), bbox.width(), bbox.height(), maskRect, phase, tileSize);
748 void RenderBox::paintFillLayers(const PaintInfo& paintInfo, const Color& c, const FillLayer* fillLayer, int tx, int ty, int width, int height, CompositeOperator op, RenderObject* backgroundObject)
753 paintFillLayers(paintInfo, c, fillLayer->next(), tx, ty, width, height, op, backgroundObject);
754 paintFillLayer(paintInfo, c, fillLayer, tx, ty, width, height, op, backgroundObject);
757 void RenderBox::paintFillLayer(const PaintInfo& paintInfo, const Color& c, const FillLayer* fillLayer, int tx, int ty, int width, int height, CompositeOperator op, RenderObject* backgroundObject)
759 paintFillLayerExtended(paintInfo, c, fillLayer, tx, ty, width, height, 0, op, backgroundObject);
799 rw = layerRenderer->width();
804 max(layerRenderer->width() + layerRenderer->marginLeft() + layerRenderer->marginRight() + layerRenderer->borderLeft() + layerRenderer->borderRight(), rw),
815 layerRenderer->calculateBackgroundImageGeometry(curLayer, rendererRect.x(), rendererRect.y(), rendererRect.width(), rendererRect.height(), repaintRect, phase, tileSize);
838 FloatRect rootRect(tx + r->x(), ty + r->selectionTop(), r->width(), r->selectionHeight());
839 FloatRect imageRect(tx + x(), rootRect.y(), width(), rootRect.height());
842 FloatRect imageRect(tx + x(), ty + y(), width(), height());
871 IntRect borderRect = IntRect(tx, ty, width(), height());
904 int clipWidth = width() - bLeft - borderRight();
920 int clipWidth = width();
924 int c = style()->clipLeft().calcValue(width());
930 width() - style()->clipRight().calcValue(width());
991 transformState.move(containerOffset.width(), containerOffset.height(), preserve3D ? TransformState::AccumulateTransform : TransformState::FlattenTransform);
997 transformState.move(-containerOffset.width(), -containerOffset.height(), preserve3D ? TransformState::AccumulateTransform : TransformState::FlattenTransform);
1032 transformState.move(-containerOffset.width(), -containerOffset.height(), preserve3D ? TransformState::AccumulateTransform : TransformState::FlattenTransform);
1227 IntRect boxRect(0, 0, containerBox->layer()->width(), containerBox->layer()->height());
1248 int newWidth = width();
1279 // If layout is limited to a subtree, the subtree root's width does not change.
1284 // width. Use the width from the style context.
1295 Length w = (treatAsReplaced) ? Length(calcReplacedWidth(), Fixed) : style()->width();
1315 // in SSR mode with replaced box, if the box width is wider than the container width,
1317 if (containerWidth && (width() + m_marginLeft + m_marginRight) > containerWidth &&
1328 // Width calculations
1332 // Calculate Width
1333 setWidth(calcWidthUsing(Width, containerWidth));
1338 if (width() > maxW) {
1346 if (width() < minW) {
1353 setWidth(max(width(), minPrefWidth()));
1354 w = Length(width(), Fixed);
1368 // If the box width is wider than the container width, it will be shrinked to fit to the container.
1371 setWidth(width() + m_marginLeft + m_marginRight);
1374 if (width() > containerWidth) {
1378 setWidth(width() -(m_marginLeft + m_marginRight));
1382 if (containerWidth && containerWidth != (width() + m_marginLeft + m_marginRight)
1385 m_marginRight = containerWidth - width() - m_marginLeft;
1387 m_marginLeft = containerWidth - width() - m_marginRight;
1393 int widthResult = width();
1395 if (widthType == Width)
1396 w = style()->width();
1425 // This code may look a bit strange. Basically width:intrinsic should clamp the size when testing both
1426 // min-width and width. max-width is only clamped if it is also intrinsic.
1427 Length width = (widthType == MaxWidth) ? style()->maxWidth() : style()->width();
1428 if (width.type() == Intrinsic)
1457 if ((marginLeft.isAuto() && marginRight.isAuto() && width() < containerWidth)
1459 m_marginLeft = max(0, (containerWidth - width()) / 2);
1460 m_marginRight = containerWidth - width() - m_marginLeft;
1461 } else if ((marginRight.isAuto() && width() < containerWidth)
1464 m_marginRight = containerWidth - width() - m_marginLeft;
1465 } else if ((marginLeft.isAuto() && width() < containerWidth)
1468 m_marginLeft = containerWidth - width() - m_marginRight;
1470 // This makes auto margins 0 if we failed a width() < containerWidth test above (css2.1, 10.3.3).
1662 int width = calcReplacedWidthUsing(style()->width());
1664 int maxW = !includeMaxWidth || style()->maxWidth().isUndefined() ? width : calcReplacedWidthUsing(style()->maxWidth());
1666 return max(minW, min(width, maxW));
1669 int RenderBox::calcReplacedWidthUsing(Length width) const
1671 switch (width.type()) {
1673 return calcContentBoxWidth(width.value());
1677 return calcContentBoxWidth(width.calcMinValue(cw));
1681 return intrinsicSize().width();
1791 return containingBlockBox->width() - containingBlockBox->borderLeft() - containingBlockBox->borderRight() - containingBlockBox->verticalScrollbarWidth();
1800 // If the containing block is empty, return a width of 0.
1808 fromRight = last->x() + last->width() - last->borderRight();
1810 fromRight = first->x() + first->width() - first->borderRight();
1850 // FIXME 3: Can perhaps optimize out cases when max-width/min-width are greater
1851 // than or less than the computed width(). Be careful of box-sizing and
1856 // <http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width>
1917 staticPosition -= toRenderBox(po)->width();
1926 // Calculate constraint equation values for 'width' case.
1929 calcAbsoluteHorizontalValues(style()->width(), containerBlock, containerDirection,
1936 // Calculate constraint equation values for 'max-width' case.
1948 if (width() > maxWidth) {
1956 // Calculate constraint equation values for 'min-width' case.
1968 if (width() < minWidth) {
1976 if (stretchesToMinIntrinsicWidth() && width() < minPrefWidth() - bordersPlusPadding) {
1985 // Put width() into correct form.
1986 setWidth(width() + bordersPlusPadding);
1989 void RenderBox::calcAbsoluteHorizontalValues(Length width, const RenderBoxModelObject* containerBlock, TextDirection containerDirection,
2000 bool widthIsAuto = width.isIntrinsicOrAuto();
2021 widthValue = calcContentBoxWidth(width.calcValue(containerWidth));
2063 * 1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the
2064 * width is shrink-to-fit. Then solve for 'left'
2068 * 2. 'left' and 'right' are 'auto' and 'width' is not 'auto', then if
2075 * 3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the
2076 * width is shrink-to-fit . Then solve for 'right'
2077 * 4. 'left' is 'auto', 'width' and 'right' are not 'auto', then solve
2079 * 5. 'width' is 'auto', 'left' and 'right' are not 'auto', then solve
2080 * for 'width'
2081 * 6. 'right' is 'auto', 'left' and 'width' are not 'auto', then solve
2084 * Calculation of the shrink-to-fit width is similar to calculating the
2085 * width of a table cell using the automatic table layout algorithm.
2086 * Roughly: calculate the preferred width by formatting the content
2088 * and also calculate the preferred minimum width, e.g., by trying all
2090 * Thirdly, calculate the available width: this is found by solving
2091 * for 'width' after setting 'left' (in case 1) or 'right' (in case 3)
2094 * Then the shrink-to-fit width is:
2095 * min(max(preferred minimum width, available width), preferred width).
2109 // RULE 1: (use shrink-to-fit for width, and solve of left)
2119 // RULE 3: (use shrink-to-fit for width, and no need solve of right)
2127 } else if (leftIsAuto && !width.isAuto() && !rightIsAuto) {
2129 widthValue = calcContentBoxWidth(width.calcValue(containerWidth));
2132 // RULE 5: (solve for width)
2138 widthValue = calcContentBoxWidth(width.calcValue(containerWidth));
2393 // <http://www.w3.org/TR/2005/WD-CSS21-20050613/visudet.html#abs-replaced-width>
2415 * 1. The used value of 'width' is determined as for inline replaced
2418 // NOTE: This value of width is FINAL in that the min/max width calculations
2422 const int availableSpace = containerWidth - width();
2544 int totalWidth = width() + leftValue + rightValue + m_marginLeft + m_marginRight;
2711 rect.move(IntSize(width() - caretWidth, 0));
2733 *extraWidthToEndOfLine = x() + width() - rect.right();
2742 if (!includeSelf || !width())
2754 int right = width();
2763 return width();
2864 // current remaining width on a line.
2868 // All auto-width objects that avoid floats should always use lineWidth.
2869 return style()->width().isAuto();