Changeset 184055 in webkit
- Timestamp:
- May 10, 2015, 2:43:26 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 33 edited
-
ChangeLog (modified) (1 diff)
-
css/CSSComputedStyleDeclaration.cpp (modified) (5 diffs)
-
html/HTMLPlugInImageElement.cpp (modified) (1 diff)
-
page/animation/AnimationBase.cpp (modified) (1 diff)
-
platform/Length.h (modified) (6 diffs)
-
platform/graphics/transforms/TranslateTransformOperation.h (modified) (1 diff)
-
rendering/AutoTableLayout.cpp (modified) (16 diffs)
-
rendering/FixedTableLayout.cpp (modified) (4 diffs)
-
rendering/RenderBlock.cpp (modified) (3 diffs)
-
rendering/RenderBox.cpp (modified) (13 diffs)
-
rendering/RenderBoxModelObject.cpp (modified) (6 diffs)
-
rendering/RenderDeprecatedFlexibleBox.cpp (modified) (2 diffs)
-
rendering/RenderElement.cpp (modified) (1 diff)
-
rendering/RenderFileUploadControl.cpp (modified) (1 diff)
-
rendering/RenderFrameSet.cpp (modified) (4 diffs)
-
rendering/RenderImage.cpp (modified) (1 diff)
-
rendering/RenderInline.cpp (modified) (1 diff)
-
rendering/RenderListBox.cpp (modified) (1 diff)
-
rendering/RenderMenuList.cpp (modified) (1 diff)
-
rendering/RenderObject.cpp (modified) (1 diff)
-
rendering/RenderReplaced.cpp (modified) (2 diffs)
-
rendering/RenderSlider.cpp (modified) (1 diff)
-
rendering/RenderTable.cpp (modified) (1 diff)
-
rendering/RenderTableSection.cpp (modified) (4 diffs)
-
rendering/RenderTextControl.cpp (modified) (1 diff)
-
rendering/RenderView.cpp (modified) (1 diff)
-
rendering/RootInlineBox.cpp (modified) (1 diff)
-
rendering/style/GridLength.h (modified) (1 diff)
-
rendering/style/GridTrackSize.h (modified) (1 diff)
-
rendering/style/RenderStyle.cpp (modified) (2 diffs)
-
rendering/svg/RenderSVGRoot.cpp (modified) (1 diff)
-
svg/SVGLengthContext.cpp (modified) (1 diff)
-
svg/graphics/SVGImage.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r184054 r184055 1 2015-05-10 Sungmann Cho <sungmann.cho@navercorp.com> 2 3 Rename Length::isPercent() and Length::isPercentNotCalculated(). 4 https://bugs.webkit.org/show_bug.cgi?id=144791 5 6 Reviewed by Darin Adler. 7 8 1. Rename these methods as below for consistency and clarity. 9 10 Length::isPercentNotCalculated() => Length::isPercent() 11 Length::isPercent() => Length::isPercentOrCalculated() 12 13 2. Simplify the condition check of length type in SVGLengthContext::valueForLength(). 14 15 "length.isPercent() && !length.isCalculated()" => "length.isPercent()" 16 17 No new tests, no behavior change. 18 19 * css/CSSComputedStyleDeclaration.cpp: 20 (WebCore::valueForImageSliceSide): 21 (WebCore::valueForReflection): 22 (WebCore::percentageOrZoomAdjustedValue): 23 (WebCore::lineHeightFromStyle): 24 (WebCore::ComputedStyleExtractor::propertyValue): 25 * html/HTMLPlugInImageElement.cpp: 26 (WebCore::is100Percent): 27 * page/animation/AnimationBase.cpp: 28 (WebCore::AnimationBase::computeTransformedExtentViaTransformList): 29 * platform/Length.h: 30 (WebCore::Length::percent): 31 (WebCore::Length::isPercent): 32 (WebCore::Length::isPercentOrCalculated): 33 (WebCore::Length::isSpecified): 34 (WebCore::Length::isPercentNotCalculated): Deleted. 35 * platform/graphics/transforms/TranslateTransformOperation.h: 36 * rendering/AutoTableLayout.cpp: 37 (WebCore::AutoTableLayout::recalcColumn): 38 (WebCore::AutoTableLayout::fullRecalc): 39 (WebCore::shouldScaleColumns): 40 (WebCore::AutoTableLayout::computeIntrinsicLogicalWidths): 41 (WebCore::AutoTableLayout::calcEffectiveLogicalWidth): 42 (WebCore::AutoTableLayout::layout): 43 * rendering/FixedTableLayout.cpp: 44 (WebCore::FixedTableLayout::calcWidthArray): 45 (WebCore::FixedTableLayout::applyPreferredLogicalWidthQuirks): 46 (WebCore::FixedTableLayout::layout): 47 * rendering/RenderBlock.cpp: 48 (WebCore::RenderBlock::isSelfCollapsingBlock): 49 (WebCore::RenderBlock::textIndentOffset): 50 * rendering/RenderBox.cpp: 51 (WebCore::RenderBox::needsPreferredWidthsRecalculation): 52 (WebCore::RenderBox::computeLogicalHeight): 53 (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing): 54 (WebCore::RenderBox::computePercentageLogicalHeight): 55 (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth): 56 (WebCore::RenderBox::computeReplacedLogicalWidthUsing): 57 (WebCore::RenderBox::computeReplacedLogicalHeightUsing): 58 (WebCore::RenderBox::availableLogicalHeightUsing): 59 (WebCore::logicalWidthIsResolvable): 60 (WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock): 61 (WebCore::RenderBox::hasUnsplittableScrollingOverflow): 62 (WebCore::RenderBox::layoutOverflowRectForPropagation): 63 * rendering/RenderBoxModelObject.cpp: 64 (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight): 65 (WebCore::RenderBoxModelObject::relativePositionOffset): 66 (WebCore::RenderBoxModelObject::computedCSSPadding): 67 (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions): 68 (WebCore::RenderBoxModelObject::calculateFillTileSize): 69 * rendering/RenderDeprecatedFlexibleBox.cpp: 70 (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp): 71 (WebCore::RenderDeprecatedFlexibleBox::clearLineClamp): 72 * rendering/RenderElement.cpp: 73 (WebCore::mustRepaintFillLayers): 74 * rendering/RenderFileUploadControl.cpp: 75 (WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths): 76 * rendering/RenderFrameSet.cpp: 77 (WebCore::RenderFrameSet::layOutAxis): 78 * rendering/RenderImage.cpp: 79 (WebCore::RenderImage::repaintOrMarkForLayout): 80 * rendering/RenderInline.cpp: 81 (WebCore::computeMargin): 82 * rendering/RenderListBox.cpp: 83 (WebCore::RenderListBox::computeIntrinsicLogicalWidths): 84 * rendering/RenderMenuList.cpp: 85 (RenderMenuList::computeIntrinsicLogicalWidths): 86 * rendering/RenderObject.cpp: 87 (WebCore::objectIsRelayoutBoundary): 88 * rendering/RenderReplaced.cpp: 89 (WebCore::RenderReplaced::computePreferredLogicalWidths): 90 * rendering/RenderSlider.cpp: 91 (WebCore::RenderSlider::computeIntrinsicLogicalWidths): 92 * rendering/RenderTable.cpp: 93 (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight): 94 * rendering/RenderTableSection.cpp: 95 (WebCore::RenderTableSection::layoutRows): 96 * rendering/RenderTextControl.cpp: 97 (WebCore::RenderTextControl::computeIntrinsicLogicalWidths): 98 * rendering/RenderView.cpp: 99 (WebCore::RenderView::layout): 100 * rendering/RootInlineBox.cpp: 101 (WebCore::RootInlineBox::verticalPositionForBox): 102 * rendering/style/GridLength.h: 103 (WebCore::GridLength::isPercentage): 104 * rendering/style/GridTrackSize.h: 105 (WebCore::GridTrackSize::isPercentage): 106 * rendering/style/RenderStyle.cpp: 107 (WebCore::RenderStyle::computedLineHeight): 108 * rendering/svg/RenderSVGRoot.cpp: 109 (WebCore::RenderSVGRoot::hasRelativeDimensions): 110 * svg/SVGLengthContext.cpp: 111 (WebCore::SVGLengthContext::valueForLength): 112 * svg/graphics/SVGImage.cpp: 113 (WebCore::SVGImage::hasRelativeWidth): 114 (WebCore::SVGImage::hasRelativeHeight): 115 1 116 2015-05-10 Sungmann Cho <sungmann.cho@navercorp.com> 2 117 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r183913 r184055 484 484 // These values can be percentages, numbers, or while an animation of mixed types is in progress, 485 485 // a calculation that combines a percentage and a number. 486 if (length.isPercent NotCalculated())486 if (length.isPercent()) 487 487 return cssValuePool().createValue(length.percent(), CSSPrimitiveValue::CSS_PERCENTAGE); 488 488 if (length.isFixed()) … … 647 647 648 648 RefPtr<CSSPrimitiveValue> offset; 649 if (reflection->offset().isPercent ())649 if (reflection->offset().isPercentOrCalculated()) 650 650 offset = cssValuePool().createValue(reflection->offset().percent(), CSSPrimitiveValue::CSS_PERCENTAGE); 651 651 else … … 737 737 static Ref<CSSPrimitiveValue> percentageOrZoomAdjustedValue(Length length, const RenderStyle* style) 738 738 { 739 if (length.isPercent NotCalculated())739 if (length.isPercent()) 740 740 return cssValuePool().createValue(length.percent(), CSSPrimitiveValue::CSS_PERCENTAGE); 741 741 … … 1560 1560 if (length.isNegative()) // If true, line-height not set; use the font's line spacing. 1561 1561 return zoomAdjustedPixelValue(style->fontMetrics().floatLineSpacing(), style); 1562 if (length.isPercent NotCalculated()) {1562 if (length.isPercent()) { 1563 1563 // This is imperfect, because it doesn't include the zoom factor and the real computation 1564 1564 // for how high to be in pixels does include things like minimum font size and the zoom factor. … … 2430 2430 return zoomAdjustedPixelValueForLength(marginRight, style.get()); 2431 2431 float value; 2432 if (marginRight.isPercent ()) {2432 if (marginRight.isPercentOrCalculated()) { 2433 2433 // RenderBox gives a marginRight() that is the distance between the right-edge of the child box 2434 2434 // and the right-edge of the containing box, when display == BLOCK. Let's calculate the absolute -
trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp
r183160 r184055 572 572 static inline bool is100Percent(Length length) 573 573 { 574 return length.isPercent NotCalculated() && length.percent() == 100;574 return length.isPercent() && length.percent() == 100; 575 575 } 576 576 -
trunk/Source/WebCore/page/animation/AnimationBase.cpp
r183364 r184055 779 779 bool applyTransformOrigin = containsRotation(style.transform().operations()) || style.transform().affectedByTransformOrigin(); 780 780 if (applyTransformOrigin) { 781 float offsetX = style.transformOriginX().isPercent NotCalculated() ? rendererBox.x() : 0;782 float offsetY = style.transformOriginY().isPercent NotCalculated() ? rendererBox.y() : 0;781 float offsetX = style.transformOriginX().isPercent() ? rendererBox.x() : 0; 782 float offsetY = style.transformOriginY().isPercent() ? rendererBox.y() : 0; 783 783 784 784 transformOrigin.setX(floatValueForLength(style.transformOriginX(), rendererBox.width()) + offsetX); -
trunk/Source/WebCore/platform/Length.h
r179860 r184055 85 85 bool isMaxContent() const; 86 86 bool isMinContent() const; 87 bool isPercent NotCalculated() const; // FIXME: Rename to isPercent.87 bool isPercent() const; 88 88 bool isRelative() const; 89 89 bool isUndefined() const; … … 99 99 bool isNegative() const; 100 100 101 bool isPercent () const; // Returns true for both Percent and Calculated. FIXME: Find a better name for this.101 bool isPercentOrCalculated() const; // Returns true for both Percent and Calculated. 102 102 103 103 bool isIntrinsic() const; … … 261 261 inline float Length::percent() const 262 262 { 263 ASSERT(isPercent NotCalculated());263 ASSERT(isPercent()); 264 264 return value(); 265 265 } … … 334 334 } 335 335 336 inline bool Length::isPercent NotCalculated() const336 inline bool Length::isPercent() const 337 337 { 338 338 return type() == Percent; … … 349 349 } 350 350 351 inline bool Length::isPercent () const352 { 353 return isPercent NotCalculated() || isCalculated();351 inline bool Length::isPercentOrCalculated() const 352 { 353 return isPercent() || isCalculated(); 354 354 } 355 355 … … 393 393 inline bool Length::isSpecified() const 394 394 { 395 return isFixed() || isPercent ();395 return isFixed() || isPercentOrCalculated(); 396 396 } 397 397 -
trunk/Source/WebCore/platform/graphics/transforms/TranslateTransformOperation.h
r182159 r184055 68 68 { 69 69 transform.translate3d(x(borderBoxSize), y(borderBoxSize), z(borderBoxSize)); 70 return m_x.isPercent NotCalculated() || m_y.isPercentNotCalculated();70 return m_x.isPercent() || m_y.isPercent(); 71 71 } 72 72 -
trunk/Source/WebCore/rendering/AutoTableLayout.cpp
r174653 r184055 93 93 case Fixed: 94 94 // ignore width=0 95 if (cellLogicalWidth.isPositive() && !columnLayout.logicalWidth.isPercent ()) {95 if (cellLogicalWidth.isPositive() && !columnLayout.logicalWidth.isPercentOrCalculated()) { 96 96 int logicalWidth = cell->adjustBorderBoxLogicalWidthForBoxSizing(cellLogicalWidth.value()); 97 97 if (columnLayout.logicalWidth.isFixed()) { … … 110 110 case Percent: 111 111 m_hasPercent = true; 112 if (cellLogicalWidth.isPositive() && (!columnLayout.logicalWidth.isPercent NotCalculated() || cellLogicalWidth.percent() > columnLayout.logicalWidth.percent()))112 if (cellLogicalWidth.isPositive() && (!columnLayout.logicalWidth.isPercent() || cellLogicalWidth.percent() > columnLayout.logicalWidth.percent())) 113 113 columnLayout.logicalWidth = cellLogicalWidth; 114 114 break; … … 160 160 if (colLogicalWidth.isAuto()) 161 161 colLogicalWidth = groupLogicalWidth; 162 if ((colLogicalWidth.isFixed() || colLogicalWidth.isPercent ()) && colLogicalWidth.isZero())162 if ((colLogicalWidth.isFixed() || colLogicalWidth.isPercentOrCalculated()) && colLogicalWidth.isZero()) 163 163 colLogicalWidth = Length(); 164 164 unsigned effCol = m_table->colToEffCol(currentColumn); … … 189 189 while (table) { 190 190 Length tableWidth = table->style().width(); 191 if ((tableWidth.isAuto() || tableWidth.isPercent ()) && !table->isOutOfFlowPositioned()) {191 if ((tableWidth.isAuto() || tableWidth.isPercentOrCalculated()) && !table->isOutOfFlowPositioned()) { 192 192 RenderBlock* containingBlock = table->containingBlock(); 193 193 while (containingBlock && !is<RenderView>(*containingBlock) && !is<RenderTableCell>(*containingBlock) … … 197 197 table = nullptr; 198 198 if (is<RenderTableCell>(containingBlock) 199 && (containingBlock->style().width().isAuto() || containingBlock->style().width().isPercent ())) {199 && (containingBlock->style().width().isAuto() || containingBlock->style().width().isPercentOrCalculated())) { 200 200 RenderTableCell& cell = downcast<RenderTableCell>(*containingBlock); 201 201 if (cell.colSpan() > 1 || cell.table()->style().width().isAuto()) … … 231 231 maxWidth += m_layoutStruct[i].effectiveMaxLogicalWidth; 232 232 if (scaleColumns) { 233 if (m_layoutStruct[i].effectiveLogicalWidth.isPercent NotCalculated()) {233 if (m_layoutStruct[i].effectiveLogicalWidth.isPercent()) { 234 234 float percent = std::min(m_layoutStruct[i].effectiveLogicalWidth.percent(), remainingPercent); 235 235 float logicalWidth = static_cast<float>(m_layoutStruct[i].effectiveMaxLogicalWidth) * 100 / std::max(percent, epsilon); … … 324 324 // <tr><td>1</td><td colspan=2 width=100%>2-3</td></tr> 325 325 // </table> 326 if (!columnLayout.effectiveLogicalWidth.isPercent NotCalculated()) {326 if (!columnLayout.effectiveLogicalWidth.isPercent()) { 327 327 columnLayout.effectiveLogicalWidth = Length(); 328 328 allColsArePercent = false; … … 342 342 343 343 // adjust table max width if needed 344 if (cellLogicalWidth.isPercent NotCalculated()) {344 if (cellLogicalWidth.isPercent()) { 345 345 if (totalPercent > cellLogicalWidth.percent() || allColsArePercent) { 346 346 // can't satify this condition, treat as variable … … 353 353 int totalWidth = 0; 354 354 for (unsigned pos = effCol; pos < lastCol; ++pos) { 355 if (!m_layoutStruct[pos].effectiveLogicalWidth.isPercent ())355 if (!m_layoutStruct[pos].effectiveLogicalWidth.isPercentOrCalculated()) 356 356 totalWidth += m_layoutStruct[pos].effectiveMaxLogicalWidth; 357 357 } 358 358 359 359 for (unsigned pos = effCol; pos < lastCol && totalWidth > 0; ++pos) { 360 if (!m_layoutStruct[pos].effectiveLogicalWidth.isPercent ()) {360 if (!m_layoutStruct[pos].effectiveLogicalWidth.isPercentOrCalculated()) { 361 361 float percent = percentMissing * static_cast<float>(m_layoutStruct[pos].effectiveMaxLogicalWidth) / totalWidth; 362 362 totalWidth -= m_layoutStruct[pos].effectiveMaxLogicalWidth; … … 385 385 int allocatedMaxLogicalWidth = 0; 386 386 for (unsigned pos = effCol; pos < lastCol; ++pos) { 387 ASSERT(m_layoutStruct[pos].logicalWidth.isPercent NotCalculated() || m_layoutStruct[pos].effectiveLogicalWidth.isPercentNotCalculated());387 ASSERT(m_layoutStruct[pos].logicalWidth.isPercent() || m_layoutStruct[pos].effectiveLogicalWidth.isPercent()); 388 388 // |allColsArePercent| means that either the logicalWidth *or* the effectiveLogicalWidth are percents, handle both of them here. 389 float percent = m_layoutStruct[pos].logicalWidth.isPercent NotCalculated() ? m_layoutStruct[pos].logicalWidth.percent() : m_layoutStruct[pos].effectiveLogicalWidth.percent();389 float percent = m_layoutStruct[pos].logicalWidth.isPercent() ? m_layoutStruct[pos].logicalWidth.percent() : m_layoutStruct[pos].effectiveLogicalWidth.percent(); 390 390 int columnMinLogicalWidth = static_cast<int>(percent * cellMinLogicalWidth / totalPercent); 391 391 int columnMaxLogicalWidth = static_cast<int>(percent * cellMaxLogicalWidth / totalPercent); … … 427 427 } 428 428 } 429 if (!cellLogicalWidth.isPercent ()) {429 if (!cellLogicalWidth.isPercentOrCalculated()) { 430 430 if (cellMaxLogicalWidth > spanMaxLogicalWidth) { 431 431 for (unsigned pos = effCol; spanMaxLogicalWidth >= 0 && pos < lastCol; ++pos) { … … 542 542 for (size_t i = 0; i < nEffCols; ++i) { 543 543 Length& logicalWidth = m_layoutStruct[i].effectiveLogicalWidth; 544 if (logicalWidth.isPercent ()) {544 if (logicalWidth.isPercentOrCalculated()) { 545 545 int cellLogicalWidth = std::max<int>(m_layoutStruct[i].effectiveMinLogicalWidth, minimumValueForLength(logicalWidth, tableLogicalWidth)); 546 546 available += m_layoutStruct[i].computedLogicalWidth - cellLogicalWidth; … … 553 553 for (unsigned i = nEffCols; i; ) { 554 554 --i; 555 if (m_layoutStruct[i].effectiveLogicalWidth.isPercent ()) {555 if (m_layoutStruct[i].effectiveLogicalWidth.isPercentOrCalculated()) { 556 556 int cellLogicalWidth = m_layoutStruct[i].computedLogicalWidth; 557 557 int reduction = std::min(cellLogicalWidth, excess); … … 621 621 for (size_t i = 0; i < nEffCols; ++i) { 622 622 Length& logicalWidth = m_layoutStruct[i].effectiveLogicalWidth; 623 if (logicalWidth.isPercent NotCalculated()) {623 if (logicalWidth.isPercent()) { 624 624 int cellLogicalWidth = available * logicalWidth.percent() / totalPercent; 625 625 available -= cellLogicalWidth; … … 734 734 --i; 735 735 Length& logicalWidth = m_layoutStruct[i].effectiveLogicalWidth; 736 if (logicalWidth.isPercent ())736 if (logicalWidth.isPercentOrCalculated()) 737 737 logicalWidthBeyondMin += m_layoutStruct[i].computedLogicalWidth - m_layoutStruct[i].effectiveMinLogicalWidth; 738 738 } … … 741 741 --i; 742 742 Length& logicalWidth = m_layoutStruct[i].effectiveLogicalWidth; 743 if (logicalWidth.isPercent ()) {743 if (logicalWidth.isPercentOrCalculated()) { 744 744 int minMaxDiff = m_layoutStruct[i].computedLogicalWidth - m_layoutStruct[i].effectiveMinLogicalWidth; 745 745 int reduce = available * minMaxDiff / logicalWidthBeyondMin; -
trunk/Source/WebCore/rendering/FixedTableLayout.cpp
r166920 r184055 118 118 spanInCurrentEffectiveColumn = m_table->spanOfEffCol(currentEffectiveColumn); 119 119 } 120 if ((colStyleLogicalWidth.isFixed() || colStyleLogicalWidth.isPercent ()) && colStyleLogicalWidth.isPositive()) {120 if ((colStyleLogicalWidth.isFixed() || colStyleLogicalWidth.isPercentOrCalculated()) && colStyleLogicalWidth.isPositive()) { 121 121 m_width[currentEffectiveColumn] = colStyleLogicalWidth; 122 122 m_width[currentEffectiveColumn] *= spanInCurrentEffectiveColumn; … … 193 193 // We can achieve this effect by making the maxwidth of fixed tables with percentage 194 194 // widths be infinite. 195 if (m_table->style().logicalWidth().isPercent () && maxWidth < tableMaxWidth)195 if (m_table->style().logicalWidth().isPercentOrCalculated() && maxWidth < tableMaxWidth) 196 196 maxWidth = tableMaxWidth; 197 197 } … … 226 226 calcWidth[i] = m_width[i].value(); 227 227 totalFixedWidth += calcWidth[i]; 228 } else if (m_width[i].isPercent NotCalculated()) {228 } else if (m_width[i].isPercent()) { 229 229 calcWidth[i] = valueForLength(m_width[i], tableLogicalWidth); 230 230 totalPercentWidth += calcWidth[i]; … … 255 255 totalPercentWidth = 0; 256 256 for (unsigned i = 0; i < nEffCols; i++) { 257 if (m_width[i].isPercent NotCalculated()) {257 if (m_width[i].isPercent()) { 258 258 calcWidth[i] = m_width[i].percent() * (tableLogicalWidth - totalFixedWidth) / totalPercent; 259 259 totalPercentWidth += calcWidth[i]; -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r183904 r184055 812 812 Length logicalHeightLength = style().logicalHeight(); 813 813 bool hasAutoHeight = logicalHeightLength.isAuto(); 814 if (logicalHeightLength.isPercent () && !document().inQuirksMode()) {814 if (logicalHeightLength.isPercentOrCalculated() && !document().inQuirksMode()) { 815 815 hasAutoHeight = true; 816 816 for (RenderBlock* cb = containingBlock(); !cb->isRenderView(); cb = cb->containingBlock()) { … … 822 822 // If the height is 0 or auto, then whether or not we are a self-collapsing block depends 823 823 // on whether we have content that is all self-collapsing or not. 824 if (hasAutoHeight || ((logicalHeightLength.isFixed() || logicalHeightLength.isPercent ()) && logicalHeightLength.isZero())) {824 if (hasAutoHeight || ((logicalHeightLength.isFixed() || logicalHeightLength.isPercentOrCalculated()) && logicalHeightLength.isZero())) { 825 825 // If the block has inline children, see if we generated any line boxes. If we have any 826 826 // line boxes, then we can't be self-collapsing, since we have content. … … 2257 2257 { 2258 2258 LayoutUnit cw = 0; 2259 if (style().textIndent().isPercent ())2259 if (style().textIndent().isPercentOrCalculated()) 2260 2260 cw = containingBlock()->availableLogicalWidth(); 2261 2261 return minimumValueForLength(style().textIndent(), cw); -
trunk/Source/WebCore/rendering/RenderBox.cpp
r183885 r184055 979 979 bool RenderBox::needsPreferredWidthsRecalculation() const 980 980 { 981 return style().paddingStart().isPercent () || style().paddingEnd().isPercent();981 return style().paddingStart().isPercentOrCalculated() || style().paddingEnd().isPercentOrCalculated(); 982 982 } 983 983 … … 2783 2783 // height since we don't set a height in RenderView when we're printing. So without this quirk, the 2784 2784 // height has nothing to be a percentage of, and it ends up being 0. That is bad. 2785 bool paginatedContentNeedsBaseHeight = document().printing() && h.isPercent ()2786 && (isRoot() || (isBody() && document().documentElement()->renderer()->style().logicalHeight().isPercent ())) && !isInline();2785 bool paginatedContentNeedsBaseHeight = document().printing() && h.isPercentOrCalculated() 2786 && (isRoot() || (isBody() && document().documentElement()->renderer()->style().logicalHeight().isPercentOrCalculated())) && !isInline(); 2787 2787 if (stretchesToViewport() || paginatedContentNeedsBaseHeight) { 2788 2788 LayoutUnit margins = collapsedMarginBefore() + collapsedMarginAfter(); … … 2817 2817 if (height.isFixed()) 2818 2818 return height.value(); 2819 if (height.isPercent ())2819 if (height.isPercentOrCalculated()) 2820 2820 return computePercentageLogicalHeight(height); 2821 2821 return -1; … … 2892 2892 LayoutUnit contentBoxHeight = cb->adjustContentBoxLogicalHeightForBoxSizing(cbstyle.logicalHeight().value()); 2893 2893 availableHeight = std::max<LayoutUnit>(0, cb->constrainContentBoxLogicalHeightByMinMax(contentBoxHeight - cb->scrollbarLogicalHeight())); 2894 } else if (cbstyle.logicalHeight().isPercent () && !isOutOfFlowPositionedWithSpecifiedHeight) {2894 } else if (cbstyle.logicalHeight().isPercentOrCalculated() && !isOutOfFlowPositionedWithSpecifiedHeight) { 2895 2895 // We need to recur and compute the percentage height for our containing block. 2896 2896 LayoutUnit heightWithScrollbar = cb->computePercentageLogicalHeight(cbstyle.logicalHeight()); … … 2937 2937 LayoutUnit RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUnit logicalWidth, ShouldComputePreferred shouldComputePreferred) const 2938 2938 { 2939 LayoutUnit minLogicalWidth = (shouldComputePreferred == ComputePreferred && style().logicalMinWidth().isPercent ()) || style().logicalMinWidth().isUndefined() ? logicalWidth : computeReplacedLogicalWidthUsing(style().logicalMinWidth());2940 LayoutUnit maxLogicalWidth = (shouldComputePreferred == ComputePreferred && style().logicalMaxWidth().isPercent ()) || style().logicalMaxWidth().isUndefined() ? logicalWidth : computeReplacedLogicalWidthUsing(style().logicalMaxWidth());2939 LayoutUnit minLogicalWidth = (shouldComputePreferred == ComputePreferred && style().logicalMinWidth().isPercentOrCalculated()) || style().logicalMinWidth().isUndefined() ? logicalWidth : computeReplacedLogicalWidthUsing(style().logicalMinWidth()); 2940 LayoutUnit maxLogicalWidth = (shouldComputePreferred == ComputePreferred && style().logicalMaxWidth().isPercentOrCalculated()) || style().logicalMaxWidth().isUndefined() ? logicalWidth : computeReplacedLogicalWidthUsing(style().logicalMaxWidth()); 2941 2941 return std::max(minLogicalWidth, std::min(logicalWidth, maxLogicalWidth)); 2942 2942 } … … 2966 2966 if (logicalWidth.isIntrinsic()) 2967 2967 return computeIntrinsicLogicalWidthUsing(logicalWidth, cw, borderAndPaddingLogicalWidth()) - borderAndPaddingLogicalWidth(); 2968 if (cw > 0 || (!cw && (containerLogicalWidth.isFixed() || containerLogicalWidth.isPercent ())))2968 if (cw > 0 || (!cw && (containerLogicalWidth.isFixed() || containerLogicalWidth.isPercentOrCalculated()))) 2969 2969 return adjustContentBoxLogicalWidthForBoxSizing(minimumValueForLength(logicalWidth, cw)); 2970 2970 } … … 3033 3033 // FIXME: This needs to be made block-flow-aware. If the cell and image are perpendicular block-flows, this isn't right. 3034 3034 // https://bugs.webkit.org/show_bug.cgi?id=46997 3035 while (cb && !cb->isRenderView() && (cb->style().logicalHeight().isAuto() || cb->style().logicalHeight().isPercent ())) {3035 while (cb && !cb->isRenderView() && (cb->style().logicalHeight().isAuto() || cb->style().logicalHeight().isPercentOrCalculated())) { 3036 3036 if (cb->isTableCell()) { 3037 3037 // Don't let table cells squeeze percent-height replaced elements … … 3061 3061 // artificially. We're going to rely on this cell getting expanded to some new 3062 3062 // height, and then when we lay out again we'll use the calculation below. 3063 if (isTableCell() && (h.isAuto() || h.isPercent ())) {3063 if (isTableCell() && (h.isAuto() || h.isPercentOrCalculated())) { 3064 3064 if (hasOverrideLogicalContentHeight()) 3065 3065 return overrideLogicalContentHeight(); … … 3067 3067 } 3068 3068 3069 if (h.isPercent () && isOutOfFlowPositioned() && !isRenderFlowThread()) {3069 if (h.isPercentOrCalculated() && isOutOfFlowPositioned() && !isRenderFlowThread()) { 3070 3070 // FIXME: This is wrong if the containingBlock has a perpendicular writing mode. 3071 3071 LayoutUnit availableHeight = containingBlockLogicalHeightForPositioned(containingBlock()); … … 4499 4499 return box->overrideContainingBlockContentLogicalWidth() != -1; 4500 4500 #endif 4501 if (box->style().logicalWidth().isPercent ())4501 if (box->style().logicalWidth().isPercentOrCalculated()) 4502 4502 return logicalWidthIsResolvable(*box->containingBlock()); 4503 4503 … … 4551 4551 if (cb->style().logicalHeight().isFixed()) 4552 4552 return true; 4553 if (cb->style().logicalHeight().isPercent () && !isOutOfFlowPositionedWithSpecifiedHeight)4553 if (cb->style().logicalHeight().isPercentOrCalculated() && !isOutOfFlowPositionedWithSpecifiedHeight) 4554 4554 return percentageLogicalHeightIsResolvableFromBlock(cb->containingBlock(), cb->isOutOfFlowPositioned()); 4555 4555 if (cb->isRenderView() || inQuirksMode || isOutOfFlowPositionedWithSpecifiedHeight) … … 4596 4596 // with scrollbars present is not the end of the world and is what we used to do in the old model anyway. 4597 4597 return !style().logicalHeight().isIntrinsicOrAuto() 4598 || (!style().logicalMaxHeight().isIntrinsicOrAuto() && !style().logicalMaxHeight().isUndefined() && (!style().logicalMaxHeight().isPercent () || percentageLogicalHeightIsResolvable(this)))4599 || (!style().logicalMinHeight().isIntrinsicOrAuto() && style().logicalMinHeight().isPositive() && (!style().logicalMinHeight().isPercent () || percentageLogicalHeightIsResolvable(this)));4598 || (!style().logicalMaxHeight().isIntrinsicOrAuto() && !style().logicalMaxHeight().isUndefined() && (!style().logicalMaxHeight().isPercentOrCalculated() || percentageLogicalHeightIsResolvable(this))) 4599 || (!style().logicalMinHeight().isIntrinsicOrAuto() && style().logicalMinHeight().isPositive() && (!style().logicalMinHeight().isPercentOrCalculated() || percentageLogicalHeightIsResolvable(this))); 4600 4600 } 4601 4601 … … 4870 4870 bool RenderBox::hasRelativeDimensions() const 4871 4871 { 4872 return style().height().isPercent () || style().width().isPercent()4873 || style().maxHeight().isPercent() || style().maxWidth().isPercent()4874 || style().minHeight().isPercent() || style().minWidth().isPercent();4872 return style().height().isPercentOrCalculated() || style().width().isPercentOrCalculated() 4873 || style().maxHeight().isPercentOrCalculated() || style().maxWidth().isPercentOrCalculated() 4874 || style().minHeight().isPercentOrCalculated() || style().minWidth().isPercentOrCalculated(); 4875 4875 } 4876 4876 4877 4877 bool RenderBox::hasRelativeLogicalHeight() const 4878 4878 { 4879 return style().logicalHeight().isPercent ()4880 || style().logicalMinHeight().isPercent()4881 || style().logicalMaxHeight().isPercent();4879 return style().logicalHeight().isPercentOrCalculated() 4880 || style().logicalMinHeight().isPercentOrCalculated() 4881 || style().logicalMaxHeight().isPercentOrCalculated(); 4882 4882 } 4883 4883 4884 4884 bool RenderBox::hasRelativeLogicalWidth() const 4885 4885 { 4886 return style().logicalWidth().isPercent ()4887 || style().logicalMinWidth().isPercent ()4888 || style().logicalMaxWidth().isPercent ();4886 return style().logicalWidth().isPercentOrCalculated() 4887 || style().logicalMinWidth().isPercentOrCalculated() 4888 || style().logicalMaxWidth().isPercentOrCalculated(); 4889 4889 } 4890 4890 -
trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp
r183885 r184055 245 245 // containing block. If the height of the containing block is not specified explicitly (i.e., it depends 246 246 // on content height), and this element is not absolutely positioned, the value computes to 'auto'. 247 if (!logicalHeightLength.isPercent () || isOutOfFlowPositioned() || document().inQuirksMode())247 if (!logicalHeightLength.isPercentOrCalculated() || isOutOfFlowPositioned() || document().inQuirksMode()) 248 248 return false; 249 249 … … 300 300 // See <https://bugs.webkit.org/show_bug.cgi?id=26396>. 301 301 if (!style().top().isAuto() 302 && (!style().top().isPercent ()302 && (!style().top().isPercentOrCalculated() 303 303 || !containingBlock()->hasAutoHeightOrContainingBlockWithAutoHeight() 304 304 || containingBlock()->stretchesToViewport())) … … 306 306 307 307 else if (!style().bottom().isAuto() 308 && (!style().bottom().isPercent ()308 && (!style().bottom().isPercentOrCalculated() 309 309 || !containingBlock()->hasAutoHeightOrContainingBlockWithAutoHeight() 310 310 || containingBlock()->stretchesToViewport())) … … 520 520 { 521 521 LayoutUnit w = 0; 522 if (padding.isPercent ())522 if (padding.isPercentOrCalculated()) 523 523 w = containingBlockLogicalWidthForContent(); 524 524 return minimumValueForLength(padding, w); … … 933 933 image->computeIntrinsicDimensions(this, intrinsicWidth, intrinsicHeight, intrinsicRatio); 934 934 935 ASSERT(!intrinsicWidth.isPercent ());936 ASSERT(!intrinsicHeight.isPercent ());935 ASSERT(!intrinsicWidth.isPercentOrCalculated()); 936 ASSERT(!intrinsicHeight.isPercentOrCalculated()); 937 937 938 938 LayoutSize resolvedSize(intrinsicWidth.value(), intrinsicHeight.value()); … … 984 984 if (layerWidth.isFixed()) 985 985 tileSize.setWidth(layerWidth.value()); 986 else if (layerWidth.isPercent ())986 else if (layerWidth.isPercentOrCalculated()) 987 987 tileSize.setWidth(valueForLength(layerWidth, positioningAreaSize.width())); 988 988 989 989 if (layerHeight.isFixed()) 990 990 tileSize.setHeight(layerHeight.value()); 991 else if (layerHeight.isPercent ())991 else if (layerHeight.isPercentOrCalculated()) 992 992 tileSize.setHeight(valueForLength(layerHeight, positioningAreaSize.height())); 993 993 -
trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
r183100 r184055 935 935 936 936 child->clearOverrideSize(); 937 if (relayoutChildren || (child->isReplaced() && (child->style().width().isPercent () || child->style().height().isPercent()))937 if (relayoutChildren || (child->isReplaced() && (child->style().width().isPercentOrCalculated() || child->style().height().isPercentOrCalculated())) 938 938 || (child->style().height().isAuto() && is<RenderBlockFlow>(*child))) { 939 939 child->setChildNeedsLayout(MarkOnlyThis); … … 1035 1035 1036 1036 child->clearOverrideSize(); 1037 if ((child->isReplaced() && (child->style().width().isPercent () || child->style().height().isPercent()))1037 if ((child->isReplaced() && (child->style().width().isPercentOrCalculated() || child->style().height().isPercentOrCalculated())) 1038 1038 || (child->style().height().isAuto() && is<RenderBlockFlow>(*child))) { 1039 1039 child->setChildNeedsLayout(); -
trunk/Source/WebCore/rendering/RenderElement.cpp
r183461 r184055 1217 1217 if (sizeType == SizeLength) { 1218 1218 LengthSize size = layer->sizeLength(); 1219 if (size.width().isPercent () || size.height().isPercent())1219 if (size.width().isPercentOrCalculated() || size.height().isPercentOrCalculated()) 1220 1220 return true; 1221 1221 // If the image has neither an intrinsic width nor an intrinsic height, its size is determined as for 'contain'. -
trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp
r182207 r184055 214 214 maxLogicalWidth = static_cast<int>(ceilf(std::max(minDefaultLabelWidth, defaultLabelWidth))); 215 215 216 if (!style().width().isPercent ())216 if (!style().width().isPercentOrCalculated()) 217 217 minLogicalWidth = maxLogicalWidth; 218 218 } -
trunk/Source/WebCore/rendering/RenderFrameSet.cpp
r177259 r184055 207 207 // Count the total percentage of all of the percentage columns/rows -> totalPercent 208 208 // Count the number of columns/rows which are percentages -> countPercent 209 if (grid[i].isPercent ()) {209 if (grid[i].isPercentOrCalculated()) { 210 210 gridLayout[i] = std::max(intValueForLength(grid[i], availableLen), 0); 211 211 totalPercent += gridLayout[i]; … … 245 245 246 246 for (int i = 0; i < gridLen; ++i) { 247 if (grid[i].isPercent ()) {247 if (grid[i].isPercentOrCalculated()) { 248 248 gridLayout[i] = (gridLayout[i] * remainingPercent) / totalPercent; 249 249 remainingLen -= gridLayout[i]; … … 289 289 290 290 for (int i = 0; i < gridLen; ++i) { 291 if (grid[i].isPercent ()) {291 if (grid[i].isPercentOrCalculated()) { 292 292 changePercent = (remainingPercent * gridLayout[i]) / totalPercent; 293 293 gridLayout[i] += changePercent; … … 321 321 322 322 for (int i = 0; i < gridLen; ++i) { 323 if (grid[i].isPercent ()) {323 if (grid[i].isPercentOrCalculated()) { 324 324 changePercent = remainingPercent / countPercent; 325 325 gridLayout[i] += changePercent; -
trunk/Source/WebCore/rendering/RenderImage.cpp
r181729 r184055 316 316 // There's no easy way to detect that shrink-to-fit is needed, always force a layout. 317 317 bool containingBlockNeedsToRecomputePreferredSize = 318 style().logicalWidth().isPercent ()319 || style().logicalMaxWidth().isPercent ()320 || style().logicalMinWidth().isPercent ();318 style().logicalWidth().isPercentOrCalculated() 319 || style().logicalMaxWidth().isPercentOrCalculated() 320 || style().logicalMinWidth().isPercentOrCalculated(); 321 321 322 322 bool layoutSizeDependsOnIntrinsicSize = style().aspectRatioType() == AspectRatioFromIntrinsic; -
trunk/Source/WebCore/rendering/RenderInline.cpp
r182835 r184055 792 792 if (margin.isFixed()) 793 793 return margin.value(); 794 if (margin.isPercent ())794 if (margin.isPercentOrCalculated()) 795 795 return minimumValueForLength(margin, std::max<LayoutUnit>(0, renderer->containingBlock()->availableLogicalWidth())); 796 796 return 0; -
trunk/Source/WebCore/rendering/RenderListBox.cpp
r183595 r184055 194 194 if (m_vBar) 195 195 maxLogicalWidth += m_vBar->width(); 196 if (!style().width().isPercent ())196 if (!style().width().isPercentOrCalculated()) 197 197 minLogicalWidth = maxLogicalWidth; 198 198 } -
trunk/Source/WebCore/rendering/RenderMenuList.cpp
r183591 r184055 325 325 { 326 326 maxLogicalWidth = std::max(m_optionsWidth, theme().minimumMenuListSize(style())) + m_innerBlock->paddingLeft() + m_innerBlock->paddingRight(); 327 if (!style().width().isPercent ())327 if (!style().width().isPercentOrCalculated()) 328 328 minLogicalWidth = maxLogicalWidth; 329 329 } -
trunk/Source/WebCore/rendering/RenderObject.cpp
r183788 r184055 544 544 return false; 545 545 546 if (object->style().width().isIntrinsicOrAuto() || object->style().height().isIntrinsicOrAuto() || object->style().height().isPercent ())546 if (object->style().width().isIntrinsicOrAuto() || object->style().height().isIntrinsicOrAuto() || object->style().height().isPercentOrCalculated()) 547 547 return false; 548 548 -
trunk/Source/WebCore/rendering/RenderReplaced.cpp
r183732 r184055 487 487 // We cannot resolve any percent logical width here as the available logical 488 488 // width may not be set on our containing block. 489 if (style().logicalWidth().isPercent ())489 if (style().logicalWidth().isPercentOrCalculated()) 490 490 computeIntrinsicLogicalWidths(m_minPreferredLogicalWidth, m_maxPreferredLogicalWidth); 491 491 else … … 493 493 494 494 const RenderStyle& styleToUse = style(); 495 if (styleToUse.logicalWidth().isPercent () || styleToUse.logicalMaxWidth().isPercent())495 if (styleToUse.logicalWidth().isPercentOrCalculated() || styleToUse.logicalMaxWidth().isPercentOrCalculated()) 496 496 m_minPreferredLogicalWidth = 0; 497 497 -
trunk/Source/WebCore/rendering/RenderSlider.cpp
r177259 r184055 73 73 { 74 74 maxLogicalWidth = defaultTrackLength * style().effectiveZoom(); 75 if (!style().width().isPercent ())75 if (!style().width().isPercentOrCalculated()) 76 76 minLogicalWidth = maxLogicalWidth; 77 77 } -
trunk/Source/WebCore/rendering/RenderTable.cpp
r182235 r184055 369 369 } 370 370 computedLogicalHeight = styleLogicalHeight.value() - borders; 371 } else if (styleLogicalHeight.isPercent ())371 } else if (styleLogicalHeight.isPercentOrCalculated()) 372 372 computedLogicalHeight = computePercentageLogicalHeight(styleLogicalHeight); 373 373 else -
trunk/Source/WebCore/rendering/RenderTableSection.cpp
r183100 r184055 68 68 switch (logicalHeight.type()) { 69 69 case Percent: 70 if (!cRowLogicalHeight.isPercent NotCalculated() || cRowLogicalHeight.percent() < logicalHeight.percent())70 if (!cRowLogicalHeight.isPercent() || cRowLogicalHeight.percent() < logicalHeight.percent()) 71 71 row.logicalHeight = logicalHeight; 72 72 break; … … 426 426 int rowHeight = m_rowPos[1] - m_rowPos[0]; 427 427 for (unsigned r = 0; r < totalRows; ++r) { 428 if (totalPercent > 0 && m_grid[r].logicalHeight.isPercent NotCalculated()) {428 if (totalPercent > 0 && m_grid[r].logicalHeight.isPercent()) { 429 429 int toAdd = std::min<int>(extraLogicalHeight, (totalHeight * m_grid[r].logicalHeight.percent() / 100) - rowHeight); 430 430 // If toAdd is negative, then we don't want to shrink the row (this bug … … 498 498 if (m_grid[r].logicalHeight.isAuto()) 499 499 ++autoRowsCount; 500 else if (m_grid[r].logicalHeight.isPercent NotCalculated())500 else if (m_grid[r].logicalHeight.isPercent()) 501 501 totalPercent += m_grid[r].logicalHeight.percent(); 502 502 } … … 569 569 570 570 for (RenderObject* renderer = cell->firstChild(); renderer; renderer = renderer->nextSibling()) { 571 if (!is<RenderText>(*renderer) && renderer->style().logicalHeight().isPercent () && (flexAllChildren || ((renderer->isReplaced() || (is<RenderBox>(*renderer) && downcast<RenderBox>(*renderer).scrollsOverflow())) && !is<RenderTextControl>(*renderer)))) {571 if (!is<RenderText>(*renderer) && renderer->style().logicalHeight().isPercentOrCalculated() && (flexAllChildren || ((renderer->isReplaced() || (is<RenderBox>(*renderer) && downcast<RenderBox>(*renderer).scrollsOverflow())) && !is<RenderTextControl>(*renderer)))) { 572 572 // Tables with no sections do not flex. 573 573 if (!is<RenderTable>(*renderer) || downcast<RenderTable>(*renderer).hasSections()) { -
trunk/Source/WebCore/rendering/RenderTextControl.cpp
r182207 r184055 199 199 if (RenderBox* innerTextRenderBox = innerTextElement()->renderBox()) 200 200 maxLogicalWidth += innerTextRenderBox->paddingStart() + innerTextRenderBox->paddingEnd(); 201 if (!style().logicalWidth().isPercent ())201 if (!style().logicalWidth().isPercentOrCalculated()) 202 202 minLogicalWidth = maxLogicalWidth; 203 203 } -
trunk/Source/WebCore/rendering/RenderView.cpp
r183885 r184055 334 334 for (auto& box : childrenOfType<RenderBox>(*this)) { 335 335 if (box.hasRelativeLogicalHeight() 336 || box.style().logicalHeight().isPercent ()337 || box.style().logicalMinHeight().isPercent ()338 || box.style().logicalMaxHeight().isPercent ()336 || box.style().logicalHeight().isPercentOrCalculated() 337 || box.style().logicalMinHeight().isPercentOrCalculated() 338 || box.style().logicalMaxHeight().isPercentOrCalculated() 339 339 || box.isSVGRoot() 340 340 ) -
trunk/Source/WebCore/rendering/RootInlineBox.cpp
r182279 r184055 1051 1051 LayoutUnit lineHeight; 1052 1052 //Per http://www.w3.org/TR/CSS21/visudet.html#propdef-vertical-align: 'Percentages: refer to the 'line-height' of the element itself'. 1053 if (renderer->style().verticalAlignLength().isPercent ())1053 if (renderer->style().verticalAlignLength().isPercentOrCalculated()) 1054 1054 lineHeight = renderer->style().computedLineHeight(); 1055 1055 else -
trunk/Source/WebCore/rendering/style/GridLength.h
r180140 r184055 65 65 double flex() const { ASSERT(isFlex()); return m_flex; } 66 66 67 bool isPercentage() const { return m_type == LengthType && m_length.isPercent (); }67 bool isPercentage() const { return m_type == LengthType && m_length.isPercentOrCalculated(); } 68 68 69 69 bool operator==(const GridLength& o) const -
trunk/Source/WebCore/rendering/style/GridTrackSize.h
r180142 r184055 93 93 bool isContentSized() const { return m_minTrackBreadth.isContentSized() || m_maxTrackBreadth.isContentSized(); } 94 94 95 bool isPercentage() const { return m_type == LengthTrackSizing && length().isLength() && length().length().isPercent (); }95 bool isPercentage() const { return m_type == LengthTrackSizing && length().isLength() && length().length().isPercentOrCalculated(); } 96 96 97 97 bool operator==(const GridTrackSize& other) const -
trunk/Source/WebCore/rendering/style/RenderStyle.cpp
r183805 r184055 1078 1078 bool applyTransformOrigin = requireTransformOrigin(operations, applyOrigin); 1079 1079 1080 float offsetX = transformOriginX().isPercent NotCalculated() ? boundingBox.x() : 0;1081 float offsetY = transformOriginY().isPercent NotCalculated() ? boundingBox.y() : 0;1080 float offsetX = transformOriginX().isPercent() ? boundingBox.x() : 0; 1081 float offsetY = transformOriginY().isPercent() ? boundingBox.y() : 0; 1082 1082 1083 1083 if (applyTransformOrigin) { … … 1457 1457 return fontMetrics().lineSpacing(); 1458 1458 1459 if (lh.isPercent ())1459 if (lh.isPercentOrCalculated()) 1460 1460 return minimumValueForLength(lh, fontSize()); 1461 1461 -
trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp
r177259 r184055 437 437 bool RenderSVGRoot::hasRelativeDimensions() const 438 438 { 439 return svgSVGElement().intrinsicHeight().isPercent () || svgSVGElement().intrinsicWidth().isPercent();439 return svgSVGElement().intrinsicHeight().isPercentOrCalculated() || svgSVGElement().intrinsicWidth().isPercentOrCalculated(); 440 440 } 441 441 -
trunk/Source/WebCore/svg/SVGLengthContext.cpp
r174225 r184055 90 90 float SVGLengthContext::valueForLength(const Length& length, SVGLengthMode mode) 91 91 { 92 if (length.isPercent() && !length.isCalculated())92 if (length.isPercent()) 93 93 return convertValueFromPercentageToUserUnits(length.value() / 100, mode, IGNORE_EXCEPTION); 94 94 if (length.isAuto()) -
trunk/Source/WebCore/svg/graphics/SVGImage.cpp
r180511 r184055 287 287 if (!rootElement) 288 288 return false; 289 return rootElement->intrinsicWidth().isPercent ();289 return rootElement->intrinsicWidth().isPercentOrCalculated(); 290 290 } 291 291 … … 295 295 if (!rootElement) 296 296 return false; 297 return rootElement->intrinsicHeight().isPercent ();297 return rootElement->intrinsicHeight().isPercentOrCalculated(); 298 298 } 299 299
Note:
See TracChangeset
for help on using the changeset viewer.