Changeset 116392 in webkit
- Timestamp:
- May 7, 2012 9:12:07 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r116389 r116392 1 2012-05-07 Emil A Eklund <eae@chromium.org> 2 3 Fix performance regression for floats caused by LayoutUnit change 4 https://bugs.webkit.org/show_bug.cgi?id=85834 5 6 Reviewed by Eric Seidel. 7 8 Fix performance regression caused by r116009 by disabling the use of 9 64bit math in FractionalLayoutUnit, simplifying the pixelSnappedMaxX/Y 10 math, inlining a couple of methods and replacing the literal 0 (zero) 11 with ZERO_LAYOUT_UNIT. 12 13 No new tests, no change in functionality. 14 15 * platform/FractionalLayoutUnit.h: 16 (WebCore::boundedMultiply): 17 (WebCore::operator*): 18 (WebCore::operator/): 19 Disable the use of 64bit (long long) math in the case where the fraction 20 is set to 1. 21 22 * platform/graphics/FractionalLayoutRect.h: 23 (WebCore::FractionalLayoutRect::pixelSnappedMaxX): 24 (WebCore::FractionalLayoutRect::pixelSnappedMaxY): 25 Simplify the pixel snapping logic for maxX/maxY. 26 27 * rendering/RenderBlock.cpp: 28 (WebCore::RenderBlock::isSelfCollapsingBlock): 29 (WebCore::RenderBlock::layoutBlock): 30 (WebCore::RenderBlock::computeOverflow): 31 (WebCore::RenderBlock::clearFloatsIfNeeded): 32 (WebCore::RenderBlock::paintChildren): 33 (WebCore::RenderBlock::blockSelectionGap): 34 (WebCore::RenderBlock::logicalLeftSelectionGap): 35 (WebCore::RenderBlock::logicalRightSelectionGap): 36 (WebCore::RenderBlock::computeLogicalLocationForFloat): 37 (WebCore::RenderBlock::lowestFloatLogicalBottom): 38 (WebCore::RenderBlock::getClearDelta): 39 (WebCore::RenderBlock::computeBlockPreferredLogicalWidths): 40 (WebCore::RenderBlock::addFocusRingRects): 41 (WebCore::RenderBlock::adjustLinePositionForPagination): 42 * rendering/RenderBlock.h: 43 (WebCore::RenderBlock::availableLogicalWidthForLine): 44 (WebCore::RenderBlock::availableLogicalWidthForContent): 45 (WebCore::RenderBlock::FloatingObject::x): 46 (WebCore::RenderBlock::FloatingObject::maxX): 47 (WebCore::RenderBlock::FloatingObject::y): 48 (WebCore::RenderBlock::FloatingObject::maxY): 49 (WebCore::RenderBlock::FloatingObject::width): 50 (WebCore::RenderBlock::FloatingObject::height): 51 (FloatingObject): 52 (WebCore::RenderBlock::FloatingObject::pixelSnappedX): 53 (WebCore::RenderBlock::FloatingObject::pixelSnappedMaxX): 54 (WebCore::RenderBlock::FloatingObject::pixelSnappedY): 55 (WebCore::RenderBlock::FloatingObject::pixelSnappedMaxY): 56 (WebCore::RenderBlock::FloatingObject::pixelSnappedWidth): 57 (WebCore::RenderBlock::FloatingObject::pixelSnappedHeight): 58 (WebCore::RenderBlock::RenderBlockRareData::positiveMarginBeforeDefault): 59 (WebCore::RenderBlock::RenderBlockRareData::negativeMarginBeforeDefault): 60 (WebCore::RenderBlock::RenderBlockRareData::positiveMarginAfterDefault): 61 (WebCore::RenderBlock::RenderBlockRareData::negativeMarginAfterDefault): 62 * rendering/RenderBoxModelObject.cpp: 63 (WebCore::accumulateRelativePositionOffsets): 64 (WebCore::RenderBoxModelObject::offsetLeft): 65 (WebCore::RenderBoxModelObject::offsetTop): 66 (WebCore::RenderBoxModelObject::computedCSSPaddingTop): 67 (WebCore::RenderBoxModelObject::computedCSSPaddingBottom): 68 (WebCore::RenderBoxModelObject::computedCSSPaddingLeft): 69 (WebCore::RenderBoxModelObject::computedCSSPaddingRight): 70 (WebCore::RenderBoxModelObject::computedCSSPaddingBefore): 71 (WebCore::RenderBoxModelObject::computedCSSPaddingAfter): 72 (WebCore::RenderBoxModelObject::computedCSSPaddingStart): 73 (WebCore::RenderBoxModelObject::computedCSSPaddingEnd): 74 1 75 2012-05-07 Dongwoo Im <dw.im@samsung.com> 2 76 -
trunk/Source/WebCore/platform/FractionalLayoutUnit.h
r115928 r116392 322 322 inline FractionalLayoutUnit boundedMultiply(const FractionalLayoutUnit& a, const FractionalLayoutUnit& b) 323 323 { 324 #if ENABLE(SUBPIXEL_LAYOUT) 324 325 FractionalLayoutUnit returnVal; 325 326 long long rawVal = static_cast<long long>(a.rawValue()) * b.rawValue() / kFixedPointDenominator; … … 330 331 returnVal.setRawValue(rawVal); 331 332 return returnVal; 333 #else 334 return a.rawValue() * b.rawValue(); 335 #endif 332 336 } 333 337 334 338 inline FractionalLayoutUnit operator*(const FractionalLayoutUnit& a, const FractionalLayoutUnit& b) 335 339 { 340 #if ENABLE(SUBPIXEL_LAYOUT) 336 341 FractionalLayoutUnit returnVal; 337 342 long long rawVal = static_cast<long long>(a.rawValue()) * b.rawValue() / kFixedPointDenominator; 338 343 returnVal.setRawValue(rawVal); 339 344 return returnVal; 345 #else 346 return a.rawValue() * b.rawValue(); 347 #endif 340 348 } 341 349 … … 382 390 inline FractionalLayoutUnit operator/(const FractionalLayoutUnit& a, const FractionalLayoutUnit& b) 383 391 { 392 #if ENABLE(SUBPIXEL_LAYOUT) 384 393 FractionalLayoutUnit returnVal; 385 394 long long rawVal = static_cast<long long>(kFixedPointDenominator) * a.rawValue() / b.rawValue(); 386 395 returnVal.setRawValue(rawVal); 387 396 return returnVal; 397 #else 398 return a.rawValue() / b.rawValue(); 399 #endif 388 400 } 389 401 -
trunk/Source/WebCore/platform/graphics/FractionalLayoutRect.h
r113030 r116392 73 73 int pixelSnappedWidth() const { return snapSizeToPixel(width(), x()); } 74 74 int pixelSnappedHeight() const { return snapSizeToPixel(height(), y()); } 75 int pixelSnappedMaxX() const { return pixelSnappedX() + pixelSnappedWidth(); }76 int pixelSnappedMaxY() const { return pixelSnappedY() + pixelSnappedHeight(); }75 int pixelSnappedMaxX() const { return (m_location.x() + m_size.width()).round(); } 76 int pixelSnappedMaxY() const { return (m_location.y() + m_size.height()).round(); } 77 77 78 78 void setX(FractionalLayoutUnit x) { m_location.setX(x); } -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r116357 r116392 1237 1237 // (d) have a min-height 1238 1238 // (e) have specified that one of our margins can't collapse using a CSS extension 1239 if (logicalHeight() > 01239 if (logicalHeight() > ZERO_LAYOUT_UNIT 1240 1240 || isTable() || borderAndPaddingLogicalHeight() 1241 1241 || style()->logicalMinHeight().isPositive() … … 1382 1382 1383 1383 LayoutUnit previousHeight = logicalHeight(); 1384 setLogicalHeight( 0);1384 setLogicalHeight(ZERO_LAYOUT_UNIT); 1385 1385 bool hasSpecifiedPageLogicalHeight = false; 1386 1386 bool pageLogicalHeightChanged = false; … … 1392 1392 computeLogicalHeight(); 1393 1393 LayoutUnit columnHeight = contentLogicalHeight(); 1394 if (columnHeight > 0) {1394 if (columnHeight > ZERO_LAYOUT_UNIT) { 1395 1395 pageLogicalHeight = columnHeight; 1396 1396 hasSpecifiedPageLogicalHeight = true; 1397 1397 } 1398 setLogicalHeight( 0);1398 setLogicalHeight(ZERO_LAYOUT_UNIT); 1399 1399 } 1400 1400 if (colInfo->columnHeight() != pageLogicalHeight && everHadLayout()) { … … 1455 1455 } 1456 1456 1457 LayoutUnit repaintLogicalTop = 0;1458 LayoutUnit repaintLogicalBottom = 0;1459 LayoutUnit maxFloatLogicalBottom = 0;1457 LayoutUnit repaintLogicalTop = ZERO_LAYOUT_UNIT; 1458 LayoutUnit repaintLogicalBottom = ZERO_LAYOUT_UNIT; 1459 LayoutUnit maxFloatLogicalBottom = ZERO_LAYOUT_UNIT; 1460 1460 if (!firstChild() && !isAnonymousBlock()) 1461 1461 setChildrenInline(true); … … 1594 1594 LayoutRect rectToApply; 1595 1595 if (isHorizontalWritingMode()) 1596 rectToApply = LayoutRect(clientRect.x(), clientRect.y(), 1, max <LayoutUnit>(0, oldClientAfterEdge - clientRect.y()));1596 rectToApply = LayoutRect(clientRect.x(), clientRect.y(), 1, max(ZERO_LAYOUT_UNIT, oldClientAfterEdge - clientRect.y())); 1597 1597 else 1598 rectToApply = LayoutRect(clientRect.x(), clientRect.y(), max <LayoutUnit>(0, oldClientAfterEdge - clientRect.x()), 1);1598 rectToApply = LayoutRect(clientRect.x(), clientRect.y(), max(ZERO_LAYOUT_UNIT, oldClientAfterEdge - clientRect.x()), 1); 1599 1599 addLayoutOverflow(rectToApply); 1600 1600 } … … 1957 1957 // Adjust our height such that we are ready to be collapsed with subsequent siblings (or the bottom 1958 1958 // of the parent block). 1959 setLogicalHeight(child->y() - max <LayoutUnit>(0, marginInfo.margin()));1959 setLogicalHeight(child->y() - max(ZERO_LAYOUT_UNIT, marginInfo.margin())); 1960 1960 } else 1961 1961 // Increase our height by the amount we had to clear. … … 2721 2721 && (absoluteChildY + child->height()) > paintInfo.rect.y() 2722 2722 && (absoluteChildY + child->height()) < paintInfo.rect.maxY()) { 2723 view()->setBestTruncatedAt(absoluteChildY + child->height() + max <LayoutUnit>(0, child->collapsedMarginAfter()), this, true);2723 view()->setBestTruncatedAt(absoluteChildY + child->height() + max(ZERO_LAYOUT_UNIT, child->collapsedMarginAfter()), this, true); 2724 2724 return; 2725 2725 } … … 3269 3269 LayoutUnit logicalTop = lastLogicalTop; 3270 3270 LayoutUnit logicalHeight = blockDirectionOffset(rootBlock, offsetFromRootBlock) + logicalBottom - logicalTop; 3271 if (logicalHeight <= static_cast<LayoutUnit>(0))3271 if (logicalHeight <= ZERO_LAYOUT_UNIT) 3272 3272 return LayoutRect(); 3273 3273 … … 3276 3276 LayoutUnit logicalRight = min(lastLogicalRight, logicalRightSelectionOffset(rootBlock, logicalBottom)); 3277 3277 LayoutUnit logicalWidth = logicalRight - logicalLeft; 3278 if (logicalWidth <= static_cast<LayoutUnit>(0))3278 if (logicalWidth <= ZERO_LAYOUT_UNIT) 3279 3279 return LayoutRect(); 3280 3280 … … 3292 3292 LayoutUnit rootBlockLogicalRight = min(inlineDirectionOffset(rootBlock, offsetFromRootBlock) + logicalLeft, min(logicalRightSelectionOffset(rootBlock, logicalTop), logicalRightSelectionOffset(rootBlock, logicalTop + logicalHeight))); 3293 3293 LayoutUnit rootBlockLogicalWidth = rootBlockLogicalRight - rootBlockLogicalLeft; 3294 if (rootBlockLogicalWidth <= static_cast<LayoutUnit>(0))3294 if (rootBlockLogicalWidth <= ZERO_LAYOUT_UNIT) 3295 3295 return LayoutRect(); 3296 3296 … … 3308 3308 LayoutUnit rootBlockLogicalRight = min(logicalRightSelectionOffset(rootBlock, logicalTop), logicalRightSelectionOffset(rootBlock, logicalTop + logicalHeight)); 3309 3309 LayoutUnit rootBlockLogicalWidth = rootBlockLogicalRight - rootBlockLogicalLeft; 3310 if (rootBlockLogicalWidth <= static_cast<LayoutUnit>(0))3310 if (rootBlockLogicalWidth <= ZERO_LAYOUT_UNIT) 3311 3311 return LayoutRect(); 3312 3312 … … 3576 3576 } 3577 3577 } 3578 floatLogicalLeft = max <LayoutUnit>(logicalLeftOffset - borderAndPaddingLogicalLeft(), floatLogicalLeft);3578 floatLogicalLeft = max(logicalLeftOffset - borderAndPaddingLogicalLeft(), floatLogicalLeft); 3579 3579 } else { 3580 3580 LayoutUnit heightRemainingLeft = 1; … … 3970 3970 { 3971 3971 if (!m_floatingObjects) 3972 return 0;3973 LayoutUnit lowestFloatBottom = 0;3972 return ZERO_LAYOUT_UNIT; 3973 LayoutUnit lowestFloatBottom = ZERO_LAYOUT_UNIT; 3974 3974 const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set(); 3975 3975 FloatingObjectSetIterator end = floatingObjectSet.end(); … … 4348 4348 4349 4349 // We also clear floats if we are too big to sit on the same line as a float (and wish to avoid floats by default). 4350 LayoutUnit result = clearSet ? max <LayoutUnit>(0, logicalBottom - logicalTop) : ZERO_LAYOUT_UNIT;4350 LayoutUnit result = clearSet ? max(ZERO_LAYOUT_UNIT, logicalBottom - logicalTop) : ZERO_LAYOUT_UNIT; 4351 4351 if (!result && child->avoidsFloats()) { 4352 4352 LayoutUnit newLogicalTop = logicalTop; … … 5691 5691 5692 5692 // Always make sure these values are non-negative. 5693 m_minPreferredLogicalWidth = max <LayoutUnit>(0, m_minPreferredLogicalWidth);5694 m_maxPreferredLogicalWidth = max <LayoutUnit>(0, m_maxPreferredLogicalWidth);5693 m_minPreferredLogicalWidth = max(ZERO_LAYOUT_UNIT, m_minPreferredLogicalWidth); 5694 m_maxPreferredLogicalWidth = max(ZERO_LAYOUT_UNIT, m_maxPreferredLogicalWidth); 5695 5695 5696 5696 m_maxPreferredLogicalWidth = max(floatLeftWidth + floatRightWidth, m_maxPreferredLogicalWidth); … … 6491 6491 // https://bugs.webkit.org/show_bug.cgi?id=46781 6492 6492 bool prevInlineHasLineBox = toRenderInline(inlineElementContinuation()->node()->renderer())->firstLineBox(); 6493 float topMargin = prevInlineHasLineBox ? collapsedMarginBefore() : static_cast<LayoutUnit>(0);6494 float bottomMargin = nextInlineHasLineBox ? collapsedMarginAfter() : static_cast<LayoutUnit>(0);6493 float topMargin = prevInlineHasLineBox ? collapsedMarginBefore() : ZERO_LAYOUT_UNIT; 6494 float bottomMargin = nextInlineHasLineBox ? collapsedMarginAfter() : ZERO_LAYOUT_UNIT; 6495 6495 LayoutRect rect(additionalOffset.x(), additionalOffset.y() - topMargin, width(), height() + topMargin + bottomMargin); 6496 6496 if (!rect.isEmpty()) … … 6744 6744 if (!hasUniformPageLogicalHeight && !pushToNextPageWithMinimumLogicalHeight(remainingLogicalHeight, logicalOffset, lineHeight)) 6745 6745 return; 6746 LayoutUnit totalLogicalHeight = lineHeight + max <LayoutUnit>(0, logicalOffset);6746 LayoutUnit totalLogicalHeight = lineHeight + max(ZERO_LAYOUT_UNIT, logicalOffset); 6747 6747 LayoutUnit pageLogicalHeightAtNewOffset = hasUniformPageLogicalHeight ? pageLogicalHeight : pageLogicalHeightForOffset(logicalOffset + remainingLogicalHeight); 6748 6748 if (lineBox == firstRootBox() && totalLogicalHeight < pageLogicalHeightAtNewOffset && !isPositioned() && !isTableCell()) 6749 setPaginationStrut(remainingLogicalHeight + max <LayoutUnit>(0, logicalOffset));6749 setPaginationStrut(remainingLogicalHeight + max(ZERO_LAYOUT_UNIT, logicalOffset)); 6750 6750 else { 6751 6751 delta += remainingLogicalHeight; -
trunk/Source/WebCore/rendering/RenderBlock.h
r116298 r116392 132 132 LayoutUnit availableLogicalWidthForLine(LayoutUnit position, bool firstLine, RenderRegion* region, LayoutUnit offsetFromLogicalTopOfFirstPage) const 133 133 { 134 return max <LayoutUnit>(0, logicalRightOffsetForLine(position, firstLine, region, offsetFromLogicalTopOfFirstPage)134 return max(ZERO_LAYOUT_UNIT, logicalRightOffsetForLine(position, firstLine, region, offsetFromLogicalTopOfFirstPage) 135 135 - logicalLeftOffsetForLine(position, firstLine, region, offsetFromLogicalTopOfFirstPage)); 136 136 } … … 333 333 LayoutUnit availableLogicalWidthForContent(RenderRegion* region, LayoutUnit offsetFromLogicalTopOfFirstPage) const 334 334 { 335 return max <LayoutUnit>(0, logicalRightOffsetForContent(region, offsetFromLogicalTopOfFirstPage) -335 return max(ZERO_LAYOUT_UNIT, logicalRightOffsetForContent(region, offsetFromLogicalTopOfFirstPage) - 336 336 logicalLeftOffsetForContent(region, offsetFromLogicalTopOfFirstPage)); } 337 337 LayoutUnit startOffsetForContent(RenderRegion* region, LayoutUnit offsetFromLogicalTopOfFirstPage) const … … 565 565 void setIsPlaced(bool placed = true) { m_isPlaced = placed; } 566 566 567 LayoutUnit x() const { ASSERT(isPlaced()); return m_frameRect.x(); }568 LayoutUnit maxX() const { ASSERT(isPlaced()); return m_frameRect.maxX(); }569 LayoutUnit y() const { ASSERT(isPlaced()); return m_frameRect.y(); }570 LayoutUnit maxY() const { ASSERT(isPlaced()); return m_frameRect.maxY(); }571 LayoutUnit width() const { return m_frameRect.width(); }572 LayoutUnit height() const { return m_frameRect.height(); }573 574 in t pixelSnappedX() const { ASSERT(isPlaced()); return m_frameRect.pixelSnappedX(); }575 in t pixelSnappedMaxX() const { ASSERT(isPlaced()); return m_frameRect.pixelSnappedMaxX(); }576 in t pixelSnappedY() const { ASSERT(isPlaced()); return m_frameRect.pixelSnappedY(); }577 in t pixelSnappedMaxY() const { ASSERT(isPlaced()); return m_frameRect.pixelSnappedMaxY(); }578 in t pixelSnappedWidth() const { return m_frameRect.pixelSnappedWidth(); }579 in t pixelSnappedHeight() const { return m_frameRect.pixelSnappedHeight(); }567 inline LayoutUnit x() const { ASSERT(isPlaced()); return m_frameRect.x(); } 568 inline LayoutUnit maxX() const { ASSERT(isPlaced()); return m_frameRect.maxX(); } 569 inline LayoutUnit y() const { ASSERT(isPlaced()); return m_frameRect.y(); } 570 inline LayoutUnit maxY() const { ASSERT(isPlaced()); return m_frameRect.maxY(); } 571 inline LayoutUnit width() const { return m_frameRect.width(); } 572 inline LayoutUnit height() const { return m_frameRect.height(); } 573 574 inline int pixelSnappedX() const { ASSERT(isPlaced()); return m_frameRect.pixelSnappedX(); } 575 inline int pixelSnappedMaxX() const { ASSERT(isPlaced()); return m_frameRect.pixelSnappedMaxX(); } 576 inline int pixelSnappedY() const { ASSERT(isPlaced()); return m_frameRect.pixelSnappedY(); } 577 inline int pixelSnappedMaxY() const { ASSERT(isPlaced()); return m_frameRect.pixelSnappedMaxY(); } 578 inline int pixelSnappedWidth() const { return m_frameRect.pixelSnappedWidth(); } 579 inline int pixelSnappedHeight() const { return m_frameRect.pixelSnappedHeight(); } 580 580 581 581 void setX(LayoutUnit x) { ASSERT(!isInPlacedTree()); m_frameRect.setX(x); } … … 1073 1073 static LayoutUnit positiveMarginBeforeDefault(const RenderBlock* block) 1074 1074 { 1075 return std::max <LayoutUnit>(block->marginBefore(), 0);1075 return std::max(block->marginBefore(), ZERO_LAYOUT_UNIT); 1076 1076 } 1077 1077 1078 1078 static LayoutUnit negativeMarginBeforeDefault(const RenderBlock* block) 1079 1079 { 1080 return std::max <LayoutUnit>(-block->marginBefore(), 0);1080 return std::max(-block->marginBefore(), ZERO_LAYOUT_UNIT); 1081 1081 } 1082 1082 static LayoutUnit positiveMarginAfterDefault(const RenderBlock* block) 1083 1083 { 1084 return std::max <LayoutUnit>(block->marginAfter(), 0);1084 return std::max(block->marginAfter(), ZERO_LAYOUT_UNIT); 1085 1085 } 1086 1086 static LayoutUnit negativeMarginAfterDefault(const RenderBlock* block) 1087 1087 { 1088 return std::max <LayoutUnit>(-block->marginAfter(), 0);1088 return std::max(-block->marginAfter(), ZERO_LAYOUT_UNIT); 1089 1089 } 1090 1090 -
trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp
r116069 r116392 479 479 if (!child->isAnonymousBlock() || !child->isRelPositioned()) 480 480 return 0; 481 LayoutUnit offset = 0;481 LayoutUnit offset = ZERO_LAYOUT_UNIT; 482 482 RenderObject* p = toRenderBlock(child)->inlineElementContinuation(); 483 483 while (p && p->isRenderInline()) { … … 541 541 // return 0 and stop this algorithm. 542 542 if (isBody()) 543 return 0;543 return ZERO_LAYOUT_UNIT; 544 544 545 545 RenderBoxModelObject* offsetPar = offsetParent(); … … 575 575 // return 0 and stop this algorithm. 576 576 if (isBody()) 577 return 0;577 return ZERO_LAYOUT_UNIT; 578 578 579 579 RenderBoxModelObject* offsetPar = offsetParent(); … … 615 615 LayoutUnit RenderBoxModelObject::computedCSSPaddingTop() const 616 616 { 617 LayoutUnit w = 0;617 LayoutUnit w = ZERO_LAYOUT_UNIT; 618 618 RenderView* renderView = 0; 619 619 Length padding = style()->paddingTop(); … … 627 627 LayoutUnit RenderBoxModelObject::computedCSSPaddingBottom() const 628 628 { 629 LayoutUnit w = 0;629 LayoutUnit w = ZERO_LAYOUT_UNIT; 630 630 RenderView* renderView = 0; 631 631 Length padding = style()->paddingBottom(); … … 639 639 LayoutUnit RenderBoxModelObject::computedCSSPaddingLeft() const 640 640 { 641 LayoutUnit w = 0;641 LayoutUnit w = ZERO_LAYOUT_UNIT; 642 642 RenderView* renderView = 0; 643 643 Length padding = style()->paddingLeft(); … … 651 651 LayoutUnit RenderBoxModelObject::computedCSSPaddingRight() const 652 652 { 653 LayoutUnit w = 0;653 LayoutUnit w = ZERO_LAYOUT_UNIT; 654 654 RenderView* renderView = 0; 655 655 Length padding = style()->paddingRight(); … … 663 663 LayoutUnit RenderBoxModelObject::computedCSSPaddingBefore() const 664 664 { 665 LayoutUnit w = 0;665 LayoutUnit w = ZERO_LAYOUT_UNIT; 666 666 RenderView* renderView = 0; 667 667 Length padding = style()->paddingBefore(); … … 675 675 LayoutUnit RenderBoxModelObject::computedCSSPaddingAfter() const 676 676 { 677 LayoutUnit w = 0;677 LayoutUnit w = ZERO_LAYOUT_UNIT; 678 678 RenderView* renderView = 0; 679 679 Length padding = style()->paddingAfter(); … … 687 687 LayoutUnit RenderBoxModelObject::computedCSSPaddingStart() const 688 688 { 689 LayoutUnit w = 0;689 LayoutUnit w = ZERO_LAYOUT_UNIT; 690 690 RenderView* renderView = 0; 691 691 Length padding = style()->paddingStart(); … … 699 699 LayoutUnit RenderBoxModelObject::computedCSSPaddingEnd() const 700 700 { 701 LayoutUnit w = 0;701 LayoutUnit w = ZERO_LAYOUT_UNIT; 702 702 RenderView* renderView = 0; 703 703 Length padding = style()->paddingEnd();
Note: See TracChangeset
for help on using the changeset viewer.