Changeset 238359 in webkit


Ignore:
Timestamp:
Nov 17, 2018 7:14:31 PM (5 years ago)
Author:
Ross Kirsling
Message:

Remove superfluous LayoutUnit initializations
https://bugs.webkit.org/show_bug.cgi?id=191791

Reviewed by Simon Fraser.

First step toward making LayoutUnit constructors explicit:
eliminate = 0 when constructing LayoutUnit lvalues.

  • editing/Editor.cpp:

(WebCore::Editor::firstRectForRange const):

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::modify):
(WebCore::FrameSelection::lineDirectionPointForBlockDirectionNavigation):

  • html/shadow/SliderThumbElement.cpp:

(WebCore::RenderSliderContainer::computeLogicalHeight const):

  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:

(WebCore::Layout::InlineFormattingContext::Geometry::justifyRuns):

  • page/FrameView.cpp:

(WebCore::FrameView::forceLayoutForPagination):

  • page/SpatialNavigation.cpp:

(WebCore::scrollInDirection):
(WebCore::distanceDataForNode):

  • rendering/AutoTableLayout.cpp:

(WebCore::AutoTableLayout::layout):

  • rendering/GridTrackSizingAlgorithm.cpp:

(WebCore::marginIntrinsicLogicalWidthForChild):
(WebCore::GridTrackSizingAlgorithm::gridAreaBreadthForChild const):

  • rendering/InlineFlowBox.cpp:

(WebCore::InlineFlowBox::placeBoxesInBlockDirection):
(WebCore::InlineFlowBox::paintFillLayer):
(WebCore::InlineFlowBox::paintBoxDecorations):
(WebCore::InlineFlowBox::paintMask):
(WebCore::InlineFlowBox::computeOverAnnotationAdjustment const):
(WebCore::InlineFlowBox::computeUnderAnnotationAdjustment const):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::marginIntrinsicLogicalWidthForChild const):
(WebCore::RenderBlock::layoutPositionedObject):
(WebCore::RenderBlock::selectionGapRectsForRepaint):
(WebCore::RenderBlock::paintSelection):
(WebCore::RenderBlock::textIndentOffset const):
(WebCore::RenderBlock::computeBlockPreferredLogicalWidths const):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::layoutBlockChildren):
(WebCore::RenderBlockFlow::marginValuesForChild const):
(WebCore::RenderBlockFlow::estimateLogicalTopPosition):
(WebCore::RenderBlockFlow::applyBeforeBreak):
(WebCore::RenderBlockFlow::applyAfterBreak):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::clearFloats):
(WebCore::RenderBlockFlow::lowestFloatLogicalBottom const):
(WebCore::RenderBlockFlow::lowestInitialLetterLogicalBottom const):
(WebCore::RenderBlockFlow::addOverhangingFloats):
(WebCore::RenderBlockFlow::getClearDelta):
(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::setLogicalWidthForTextRun):
(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
(WebCore::RenderBlockFlow::determineStartPosition):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::fillAvailableMeasure const):
(WebCore::RenderBox::computeIntrinsicLogicalWidthUsing const):
(WebCore::RenderBox::computeLogicalWidthInFragmentUsing const):
(WebCore::RenderBox::computePercentageLogicalHeight const):
(WebCore::RenderBox::computeReplacedLogicalWidthUsing const):
(WebCore::RenderBox::computePositionedLogicalWidthUsing const):
(WebCore::RenderBox::computePositionedLogicalHeightUsing const):
(WebCore::RenderBox::computePositionedLogicalWidthReplaced const):
(WebCore::RenderBox::computePositionedLogicalHeightReplaced const):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::computedCSSPadding const):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry const):

  • rendering/RenderDeprecatedFlexibleBox.cpp:

(WebCore::marginWidthForChild):
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):

  • rendering/RenderFileUploadControl.cpp:

(WebCore::RenderFileUploadControl::paintObject):

  • rendering/RenderFragmentedFlow.cpp:

(WebCore::RenderFragmentedFlow::validateFragments):
(WebCore::RenderFragmentedFlow::adjustedPositionRelativeToOffsetParent const):
(WebCore::RenderFragmentedFlow::updateFragmentsFragmentedFlowPortionRect):

  • rendering/RenderFrameSet.cpp:

(WebCore::RenderFrameSet::paint):

  • rendering/RenderListItem.cpp:

(WebCore::RenderListItem::positionListMarker):

  • rendering/RenderListMarker.cpp:

(WebCore::RenderListMarker::computePreferredLogicalWidths):
(WebCore::RenderListMarker::updateMargins):

  • rendering/RenderMultiColumnSet.cpp:

(WebCore::RenderMultiColumnSet::initialBlockOffsetForPainting const):

  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::layoutBlock):

  • rendering/RenderTable.cpp:

(WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
(WebCore::RenderTable::layout):
(WebCore::RenderTable::offsetWidthForColumn const):
(WebCore::RenderTable::offsetHeightForColumn const):
(WebCore::RenderTable::outerBorderBefore const):
(WebCore::RenderTable::outerBorderAfter const):
(WebCore::RenderTable::outerBorderStart const):
(WebCore::RenderTable::outerBorderEnd const):

  • rendering/RenderTableCell.cpp:

(WebCore::RenderTableCell::logicalWidthFromColumns const):
(WebCore::RenderTableCell::computeIntrinsicPadding):

  • rendering/RenderTableSection.cpp:

(WebCore::RenderTableSection::calcRowLogicalHeight):
(WebCore::RenderTableSection::distributeExtraLogicalHeightToPercentRows):
(WebCore::RenderTableSection::distributeExtraLogicalHeightToAutoRows):
(WebCore::RenderTableSection::distributeRemainingExtraLogicalHeight):
(WebCore::RenderTableSection::layoutRows):
(WebCore::RenderTableSection::calcOuterBorderBefore const):
(WebCore::RenderTableSection::calcOuterBorderAfter const):
(WebCore::RenderTableSection::calcOuterBorderStart const):
(WebCore::RenderTableSection::calcOuterBorderEnd const):

  • rendering/RootInlineBox.cpp:

(WebCore::RootInlineBox::alignBoxesInBlockDirection):
(WebCore::RootInlineBox::beforeAnnotationsAdjustment const):
(WebCore::RootInlineBox::lineSnapAdjustment const):
(WebCore::RootInlineBox::verticalPositionForBox):

  • rendering/line/BreakingContext.h:

(WebCore::inlineLogicalWidth):

  • rendering/mathml/RenderMathMLBlock.cpp:

(WebCore::RenderMathMLBlock::layoutItems):

  • rendering/mathml/RenderMathMLFraction.cpp:

(WebCore::RenderMathMLFraction::layoutBlock):

  • rendering/mathml/RenderMathMLOperator.cpp:

(WebCore::RenderMathMLOperator::computePreferredLogicalWidths):

  • rendering/mathml/RenderMathMLRoot.cpp:

(WebCore::RenderMathMLRoot::computePreferredLogicalWidths):
(WebCore::RenderMathMLRoot::paint):

  • rendering/mathml/RenderMathMLRow.cpp:

(WebCore::RenderMathMLRow::computePreferredLogicalWidths):

  • rendering/mathml/RenderMathMLScripts.cpp:

(WebCore::RenderMathMLScripts::layoutBlock):

  • rendering/mathml/RenderMathMLUnderOver.cpp:

(WebCore::RenderMathMLUnderOver::stretchHorizontalOperatorsAndLayoutChildren):
(WebCore::RenderMathMLUnderOver::layoutBlock):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::getShadowInsetExtent const):

  • rendering/svg/RenderSVGText.cpp:

(WebCore::RenderSVGText::layout):

Location:
trunk/Source/WebCore
Files:
37 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r238357 r238359  
     12018-11-17  Ross Kirsling  <ross.kirsling@sony.com>
     2
     3        Remove superfluous LayoutUnit initializations
     4        https://bugs.webkit.org/show_bug.cgi?id=191791
     5
     6        Reviewed by Simon Fraser.
     7
     8        First step toward making LayoutUnit constructors explicit:
     9        eliminate `= 0` when constructing LayoutUnit lvalues.
     10
     11        * editing/Editor.cpp:
     12        (WebCore::Editor::firstRectForRange const):
     13        * editing/FrameSelection.cpp:
     14        (WebCore::FrameSelection::modify):
     15        (WebCore::FrameSelection::lineDirectionPointForBlockDirectionNavigation):
     16        * html/shadow/SliderThumbElement.cpp:
     17        (WebCore::RenderSliderContainer::computeLogicalHeight const):
     18        * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
     19        (WebCore::Layout::InlineFormattingContext::Geometry::justifyRuns):
     20        * page/FrameView.cpp:
     21        (WebCore::FrameView::forceLayoutForPagination):
     22        * page/SpatialNavigation.cpp:
     23        (WebCore::scrollInDirection):
     24        (WebCore::distanceDataForNode):
     25        * rendering/AutoTableLayout.cpp:
     26        (WebCore::AutoTableLayout::layout):
     27        * rendering/GridTrackSizingAlgorithm.cpp:
     28        (WebCore::marginIntrinsicLogicalWidthForChild):
     29        (WebCore::GridTrackSizingAlgorithm::gridAreaBreadthForChild const):
     30        * rendering/InlineFlowBox.cpp:
     31        (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
     32        (WebCore::InlineFlowBox::paintFillLayer):
     33        (WebCore::InlineFlowBox::paintBoxDecorations):
     34        (WebCore::InlineFlowBox::paintMask):
     35        (WebCore::InlineFlowBox::computeOverAnnotationAdjustment const):
     36        (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment const):
     37        * rendering/RenderBlock.cpp:
     38        (WebCore::RenderBlock::marginIntrinsicLogicalWidthForChild const):
     39        (WebCore::RenderBlock::layoutPositionedObject):
     40        (WebCore::RenderBlock::selectionGapRectsForRepaint):
     41        (WebCore::RenderBlock::paintSelection):
     42        (WebCore::RenderBlock::textIndentOffset const):
     43        (WebCore::RenderBlock::computeBlockPreferredLogicalWidths const):
     44        * rendering/RenderBlockFlow.cpp:
     45        (WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
     46        (WebCore::RenderBlockFlow::layoutBlock):
     47        (WebCore::RenderBlockFlow::layoutBlockChildren):
     48        (WebCore::RenderBlockFlow::marginValuesForChild const):
     49        (WebCore::RenderBlockFlow::estimateLogicalTopPosition):
     50        (WebCore::RenderBlockFlow::applyBeforeBreak):
     51        (WebCore::RenderBlockFlow::applyAfterBreak):
     52        (WebCore::RenderBlockFlow::adjustBlockChildForPagination):
     53        (WebCore::RenderBlockFlow::clearFloats):
     54        (WebCore::RenderBlockFlow::lowestFloatLogicalBottom const):
     55        (WebCore::RenderBlockFlow::lowestInitialLetterLogicalBottom const):
     56        (WebCore::RenderBlockFlow::addOverhangingFloats):
     57        (WebCore::RenderBlockFlow::getClearDelta):
     58        (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):
     59        * rendering/RenderBlockLineLayout.cpp:
     60        (WebCore::setLogicalWidthForTextRun):
     61        (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
     62        (WebCore::RenderBlockFlow::determineStartPosition):
     63        * rendering/RenderBox.cpp:
     64        (WebCore::RenderBox::fillAvailableMeasure const):
     65        (WebCore::RenderBox::computeIntrinsicLogicalWidthUsing const):
     66        (WebCore::RenderBox::computeLogicalWidthInFragmentUsing const):
     67        (WebCore::RenderBox::computePercentageLogicalHeight const):
     68        (WebCore::RenderBox::computeReplacedLogicalWidthUsing const):
     69        (WebCore::RenderBox::computePositionedLogicalWidthUsing const):
     70        (WebCore::RenderBox::computePositionedLogicalHeightUsing const):
     71        (WebCore::RenderBox::computePositionedLogicalWidthReplaced const):
     72        (WebCore::RenderBox::computePositionedLogicalHeightReplaced const):
     73        * rendering/RenderBoxModelObject.cpp:
     74        (WebCore::RenderBoxModelObject::computedCSSPadding const):
     75        (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry const):
     76        * rendering/RenderDeprecatedFlexibleBox.cpp:
     77        (WebCore::marginWidthForChild):
     78        (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
     79        (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
     80        * rendering/RenderFileUploadControl.cpp:
     81        (WebCore::RenderFileUploadControl::paintObject):
     82        * rendering/RenderFragmentedFlow.cpp:
     83        (WebCore::RenderFragmentedFlow::validateFragments):
     84        (WebCore::RenderFragmentedFlow::adjustedPositionRelativeToOffsetParent const):
     85        (WebCore::RenderFragmentedFlow::updateFragmentsFragmentedFlowPortionRect):
     86        * rendering/RenderFrameSet.cpp:
     87        (WebCore::RenderFrameSet::paint):
     88        * rendering/RenderListItem.cpp:
     89        (WebCore::RenderListItem::positionListMarker):
     90        * rendering/RenderListMarker.cpp:
     91        (WebCore::RenderListMarker::computePreferredLogicalWidths):
     92        (WebCore::RenderListMarker::updateMargins):
     93        * rendering/RenderMultiColumnSet.cpp:
     94        (WebCore::RenderMultiColumnSet::initialBlockOffsetForPainting const):
     95        * rendering/RenderRubyRun.cpp:
     96        (WebCore::RenderRubyRun::layoutBlock):
     97        * rendering/RenderTable.cpp:
     98        (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
     99        (WebCore::RenderTable::layout):
     100        (WebCore::RenderTable::offsetWidthForColumn const):
     101        (WebCore::RenderTable::offsetHeightForColumn const):
     102        (WebCore::RenderTable::outerBorderBefore const):
     103        (WebCore::RenderTable::outerBorderAfter const):
     104        (WebCore::RenderTable::outerBorderStart const):
     105        (WebCore::RenderTable::outerBorderEnd const):
     106        * rendering/RenderTableCell.cpp:
     107        (WebCore::RenderTableCell::logicalWidthFromColumns const):
     108        (WebCore::RenderTableCell::computeIntrinsicPadding):
     109        * rendering/RenderTableSection.cpp:
     110        (WebCore::RenderTableSection::calcRowLogicalHeight):
     111        (WebCore::RenderTableSection::distributeExtraLogicalHeightToPercentRows):
     112        (WebCore::RenderTableSection::distributeExtraLogicalHeightToAutoRows):
     113        (WebCore::RenderTableSection::distributeRemainingExtraLogicalHeight):
     114        (WebCore::RenderTableSection::layoutRows):
     115        (WebCore::RenderTableSection::calcOuterBorderBefore const):
     116        (WebCore::RenderTableSection::calcOuterBorderAfter const):
     117        (WebCore::RenderTableSection::calcOuterBorderStart const):
     118        (WebCore::RenderTableSection::calcOuterBorderEnd const):
     119        * rendering/RootInlineBox.cpp:
     120        (WebCore::RootInlineBox::alignBoxesInBlockDirection):
     121        (WebCore::RootInlineBox::beforeAnnotationsAdjustment const):
     122        (WebCore::RootInlineBox::lineSnapAdjustment const):
     123        (WebCore::RootInlineBox::verticalPositionForBox):
     124        * rendering/line/BreakingContext.h:
     125        (WebCore::inlineLogicalWidth):
     126        * rendering/mathml/RenderMathMLBlock.cpp:
     127        (WebCore::RenderMathMLBlock::layoutItems):
     128        * rendering/mathml/RenderMathMLFraction.cpp:
     129        (WebCore::RenderMathMLFraction::layoutBlock):
     130        * rendering/mathml/RenderMathMLOperator.cpp:
     131        (WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
     132        * rendering/mathml/RenderMathMLRoot.cpp:
     133        (WebCore::RenderMathMLRoot::computePreferredLogicalWidths):
     134        (WebCore::RenderMathMLRoot::paint):
     135        * rendering/mathml/RenderMathMLRow.cpp:
     136        (WebCore::RenderMathMLRow::computePreferredLogicalWidths):
     137        * rendering/mathml/RenderMathMLScripts.cpp:
     138        (WebCore::RenderMathMLScripts::layoutBlock):
     139        * rendering/mathml/RenderMathMLUnderOver.cpp:
     140        (WebCore::RenderMathMLUnderOver::stretchHorizontalOperatorsAndLayoutChildren):
     141        (WebCore::RenderMathMLUnderOver::layoutBlock):
     142        * rendering/style/RenderStyle.cpp:
     143        (WebCore::RenderStyle::getShadowInsetExtent const):
     144        * rendering/svg/RenderSVGText.cpp:
     145        (WebCore::RenderSVGText::layout):
     146
    11472018-11-17  Simon Fraser  <simon.fraser@apple.com>
    2148
  • trunk/Source/WebCore/editing/Editor.cpp

    r238080 r238359  
    32393239        return enclosingIntRect(RenderObject::absoluteBoundingBoxRectForRange(range));
    32403240
    3241     LayoutUnit extraWidthToEndOfLine = 0;
     3241    LayoutUnit extraWidthToEndOfLine;
    32423242    IntRect startCaretRect = RenderedPosition(startVisiblePosition).absoluteRect(&extraWidthToEndOfLine);
    32433243    if (startCaretRect == IntRect())
  • trunk/Source/WebCore/editing/FrameSelection.cpp

    r237266 r238359  
    14231423
    14241424    VisiblePosition pos;
    1425     LayoutUnit xPos = 0;
     1425    LayoutUnit xPos;
    14261426    switch (alter) {
    14271427    case AlterationMove:
     
    14891489LayoutUnit FrameSelection::lineDirectionPointForBlockDirectionNavigation(EPositionType type)
    14901490{
    1491     LayoutUnit x = 0;
     1491    LayoutUnit x;
    14921492
    14931493    if (isNone())
  • trunk/Source/WebCore/html/shadow/SliderThumbElement.cpp

    r237266 r238359  
    142142    if (input.renderer()->isSlider() && !isVertical && input.list()) {
    143143        int offsetFromCenter = theme().sliderTickOffsetFromTrackCenter();
    144         LayoutUnit trackHeight = 0;
     144        LayoutUnit trackHeight;
    145145        if (offsetFromCenter < 0)
    146146            trackHeight = -2 * offsetFromCenter;
  • trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContextGeometry.cpp

    r238028 r238359  
    126126
    127127    float expansion = widthToDistribute.toFloat() / expansionOpportunities;
    128     LayoutUnit accumulatedExpansion = 0;
     128    LayoutUnit accumulatedExpansion;
    129129    for (auto runIndex = *runRange.firstRunIndex; runIndex <= *runRange.lastRunIndex; ++runIndex) {
    130130        auto& inlineRun = inlineRuns[runIndex];
  • trunk/Source/WebCore/page/FrameView.cpp

    r238352 r238359  
    46144614            LayoutUnit docLogicalTop = horizontalWritingMode ? updatedDocumentRect.y() : updatedDocumentRect.x();
    46154615            LayoutUnit docLogicalRight = horizontalWritingMode ? updatedDocumentRect.maxX() : updatedDocumentRect.maxY();
    4616             LayoutUnit clippedLogicalLeft = 0;
     4616            LayoutUnit clippedLogicalLeft;
    46174617            if (!renderView->style().isLeftToRightDirection())
    46184618                clippedLogicalLeft = docLogicalRight - pageLogicalWidth;
  • trunk/Source/WebCore/page/SpatialNavigation.cpp

    r235457 r238359  
    337337
    338338    if (frame && canScrollInDirection(frame->document(), direction)) {
    339         LayoutUnit dx = 0;
    340         LayoutUnit dy = 0;
     339        LayoutUnit dx;
     340        LayoutUnit dy;
    341341        switch (direction) {
    342342        case FocusDirectionLeft:
     
    373373
    374374    if (canScrollInDirection(container, direction)) {
    375         LayoutUnit dx = 0;
    376         LayoutUnit dy = 0;
     375        LayoutUnit dx;
     376        LayoutUnit dy;
    377377        switch (direction) {
    378378        case FocusDirectionLeft:
     
    661661    LayoutPoint exitPoint;
    662662    LayoutPoint entryPoint;
    663     LayoutUnit sameAxisDistance = 0;
    664     LayoutUnit otherAxisDistance = 0;
     663    LayoutUnit sameAxisDistance;
     664    LayoutUnit otherAxisDistance;
    665665    entryAndExitPointsForDirection(direction, currentRect, nodeRect, exitPoint, entryPoint);
    666666
  • trunk/Source/WebCore/rendering/AutoTableLayout.cpp

    r233148 r238359  
    774774    }
    775775
    776     LayoutUnit pos = 0;
     776    LayoutUnit pos;
    777777    for (size_t i = 0; i < nEffCols; ++i) {
    778778        m_table->setColumnPosition(i, pos);
  • trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp

    r238114 r238359  
    115115    Length marginLeft = child.style().marginStartUsing(&renderGrid->style());
    116116    Length marginRight = child.style().marginEndUsing(&renderGrid->style());
    117     LayoutUnit margin = 0;
     117    LayoutUnit margin;
    118118    if (marginLeft.isFixed())
    119119        margin += marginLeft.value();
     
    583583    const Vector<GridTrack>& allTracks = tracks(direction);
    584584    const GridSpan& span = m_grid.gridItemSpan(child, direction);
    585     LayoutUnit gridAreaBreadth = 0;
     585    LayoutUnit gridAreaBreadth;
    586586    for (auto trackPosition : span)
    587587        gridAreaBreadth += allTracks[trackPosition].baseSize();
  • trunk/Source/WebCore/rendering/InlineFlowBox.cpp

    r238001 r238359  
    628628    }
    629629
    630     LayoutUnit adjustmentForChildrenWithSameLineHeightAndBaseline = 0;
     630    LayoutUnit adjustmentForChildrenWithSameLineHeightAndBaseline;
    631631    if (descendantsHaveSameLineHeightAndBaseline()) {
    632632        adjustmentForChildrenWithSameLineHeightAndBaseline = logicalTop();
     
    12591259        // as though you had one single line.  This means each line has to pick up the background where
    12601260        // the previous line left off.
    1261         LayoutUnit logicalOffsetOnLine = 0;
     1261        LayoutUnit logicalOffsetOnLine;
    12621262        LayoutUnit totalLogicalWidth;
    12631263        if (renderer().style().direction() == TextDirection::LTR) {
     
    14041404        // FIXME: What the heck do we do with RTL here? The math we're using is obviously not right,
    14051405        // but it isn't even clear how this should work at all.
    1406         LayoutUnit logicalOffsetOnLine = 0;
     1406        LayoutUnit logicalOffsetOnLine;
    14071407        for (InlineFlowBox* curr = prevLineBox(); curr; curr = curr->prevLineBox())
    14081408            logicalOffsetOnLine += curr->logicalWidth();
     
    14721472        // We have a mask image that spans multiple lines.
    14731473        // We need to adjust _tx and _ty by the width of all previous lines.
    1474         LayoutUnit logicalOffsetOnLine = 0;
     1474        LayoutUnit logicalOffsetOnLine;
    14751475        for (InlineFlowBox* curr = prevLineBox(); curr; curr = curr->prevLineBox())
    14761476            logicalOffsetOnLine += curr->logicalWidth();
     
    15611561LayoutUnit InlineFlowBox::computeOverAnnotationAdjustment(LayoutUnit allowedPosition) const
    15621562{
    1563     LayoutUnit result = 0;
     1563    LayoutUnit result;
    15641564    for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) {
    15651565        if (child->renderer().isOutOfFlowPositioned())
     
    16091609LayoutUnit InlineFlowBox::computeUnderAnnotationAdjustment(LayoutUnit allowedPosition) const
    16101610{
    1611     LayoutUnit result = 0;
     1611    LayoutUnit result;
    16121612    for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) {
    16131613        if (child->renderer().isOutOfFlowPositioned())
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r237266 r238359  
    971971    Length marginLeft = child.style().marginStartUsing(&style());
    972972    Length marginRight = child.style().marginEndUsing(&style());
    973     LayoutUnit margin = 0;
     973    LayoutUnit margin;
    974974    if (marginLeft.isFixed())
    975975        margin += marginLeft.value();
     
    10121012    // If we are paginated or in a line grid, compute a vertical position for our object now.
    10131013    // If it's wrong we'll lay out again.
    1014     LayoutUnit oldLogicalTop = 0;
     1014    LayoutUnit oldLogicalTop;
    10151015    bool needsBlockDirectionLocationSetBeforeLayout = r.needsLayout() && view().frameView().layoutContext().layoutState()->needsBlockDirectionLocationSetBeforeLayout();
    10161016    if (needsBlockDirectionLocationSetBeforeLayout) {
     
    14141414
    14151415    LogicalSelectionOffsetCaches cache(*this);
    1416     LayoutUnit lastTop = 0;
     1416    LayoutUnit lastTop;
    14171417    LayoutUnit lastLeft = logicalLeftSelectionOffset(*this, lastTop, cache);
    14181418    LayoutUnit lastRight = logicalRightSelectionOffset(*this, lastTop, cache);
     
    14261426    if (shouldPaintSelectionGaps() && paintInfo.phase == PaintPhase::Foreground) {
    14271427        LogicalSelectionOffsetCaches cache(*this);
    1428         LayoutUnit lastTop = 0;
     1428        LayoutUnit lastTop;
    14291429        LayoutUnit lastLeft = logicalLeftSelectionOffset(*this, lastTop, cache);
    14301430        LayoutUnit lastRight = logicalRightSelectionOffset(*this, lastTop, cache);
     
    18401840LayoutUnit RenderBlock::textIndentOffset() const
    18411841{
    1842     LayoutUnit cw = 0;
     1842    LayoutUnit cw;
    18431843    if (style().textIndent().isPercentOrCalculated())
    18441844        cw = containingBlock()->availableLogicalWidth();
     
    23092309        Length startMarginLength = childStyle.marginStartUsing(&styleToUse);
    23102310        Length endMarginLength = childStyle.marginEndUsing(&styleToUse);
    2311         LayoutUnit margin = 0;
    2312         LayoutUnit marginStart = 0;
    2313         LayoutUnit marginEnd = 0;
     2311        LayoutUnit margin;
     2312        LayoutUnit marginStart;
     2313        LayoutUnit marginEnd;
    23142314        if (startMarginLength.isFixed())
    23152315            marginStart += startMarginLength.value();
  • trunk/Source/WebCore/rendering/RenderBlockFlow.cpp

    r235586 r238359  
    227227        addIntrudingFloats(&parentBlock, &parentBlock, parentBlock.logicalLeftOffsetForContent(), logicalTopOffset);
    228228   
    229     LayoutUnit logicalLeftOffset = 0;
     229    LayoutUnit logicalLeftOffset;
    230230    if (previousBlock)
    231231        logicalTopOffset -= previousBlock->logicalTop();
     
    471471    checkForPaginationLogicalHeightChange(relayoutChildren, pageLogicalHeight, pageLogicalHeightChanged);
    472472
    473     LayoutUnit repaintLogicalTop = 0;
    474     LayoutUnit repaintLogicalBottom = 0;
    475     LayoutUnit maxFloatLogicalBottom = 0;
     473    LayoutUnit repaintLogicalTop;
     474    LayoutUnit repaintLogicalBottom;
     475    LayoutUnit maxFloatLogicalBottom;
    476476    const RenderStyle& styleToUse = style();
    477477    {
     
    625625    layoutExcludedChildren(relayoutChildren);
    626626
    627     LayoutUnit previousFloatLogicalBottom = 0;
     627    LayoutUnit previousFloatLogicalBottom;
    628628    maxFloatLogicalBottom = 0;
    629629
     
    908908RenderBlockFlow::MarginValues RenderBlockFlow::marginValuesForChild(RenderBox& child) const
    909909{
    910     LayoutUnit childBeforePositive = 0;
    911     LayoutUnit childBeforeNegative = 0;
    912     LayoutUnit childAfterPositive = 0;
    913     LayoutUnit childAfterNegative = 0;
    914 
    915     LayoutUnit beforeMargin = 0;
    916     LayoutUnit afterMargin = 0;
     910    LayoutUnit childBeforePositive;
     911    LayoutUnit childBeforeNegative;
     912    LayoutUnit childAfterPositive;
     913    LayoutUnit childAfterNegative;
     914
     915    LayoutUnit beforeMargin;
     916    LayoutUnit afterMargin;
    917917
    918918    RenderBlockFlow* childRenderBlock = is<RenderBlockFlow>(child) ? &downcast<RenderBlockFlow>(child) : nullptr;
     
    12641264    LayoutUnit logicalTopEstimate = logicalHeight();
    12651265    if (!marginInfo.canCollapseWithMarginBefore()) {
    1266         LayoutUnit positiveMarginBefore = 0;
    1267         LayoutUnit negativeMarginBefore = 0;
     1266        LayoutUnit positiveMarginBefore;
     1267        LayoutUnit negativeMarginBefore;
    12681268        bool discardMarginBefore = false;
    12691269        if (child.selfNeedsLayout()) {
     
    15071507        }
    15081508        if (checkFragmentBreaks) {
    1509             LayoutUnit offsetBreakAdjustment = 0;
     1509            LayoutUnit offsetBreakAdjustment;
    15101510            if (fragmentedFlow->addForcedFragmentBreak(this, offsetFromLogicalTopOfFirstPage() + logicalOffset, &child, true, &offsetBreakAdjustment))
    15111511                return logicalOffset + offsetBreakAdjustment;
     
    15371537        }
    15381538        if (checkFragmentBreaks) {
    1539             LayoutUnit offsetBreakAdjustment = 0;
     1539            LayoutUnit offsetBreakAdjustment;
    15401540            if (fragmentedFlow->addForcedFragmentBreak(this, offsetFromLogicalTopOfFirstPage() + logicalOffset + marginOffset, &child, false, &offsetBreakAdjustment))
    15411541                return logicalOffset + marginOffset + offsetBreakAdjustment;
     
    15961596    LayoutUnit logicalTopAfterUnsplittableAdjustment = adjustForUnsplittableChild(child, result);
    15971597   
    1598     LayoutUnit paginationStrut = 0;
     1598    LayoutUnit paginationStrut;
    15991599    LayoutUnit unsplittableAdjustmentDelta = logicalTopAfterUnsplittableAdjustment - logicalTopBeforeUnsplittableAdjustment;
    16001600    if (unsplittableAdjustmentDelta)
     
    25392539    positionNewFloats();
    25402540    // set y position
    2541     LayoutUnit newY = 0;
     2541    LayoutUnit newY;
    25422542    switch (clear) {
    25432543    case Clear::Left:
     
    25932593    if (!m_floatingObjects)
    25942594        return 0;
    2595     LayoutUnit lowestFloatBottom = 0;
     2595    LayoutUnit lowestFloatBottom;
    25962596    const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
    25972597    auto end = floatingObjectSet.end();
     
    26082608    if (!m_floatingObjects)
    26092609        return 0;
    2610     LayoutUnit lowestFloatBottom = 0;
     2610    LayoutUnit lowestFloatBottom;
    26112611    const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
    26122612    auto end = floatingObjectSet.end();
     
    26272627    LayoutUnit childLogicalTop = child.logicalTop();
    26282628    LayoutUnit childLogicalLeft = child.logicalLeft();
    2629     LayoutUnit lowestFloatLogicalBottom = 0;
     2629    LayoutUnit lowestFloatLogicalBottom;
    26302630
    26312631    // Floats that will remain the child's responsibility to paint should factor into its
     
    28022802    // At least one float is present. We need to perform the clearance computation.
    28032803    bool clearSet = child.style().clear() != Clear::None;
    2804     LayoutUnit logicalBottom = 0;
     2804    LayoutUnit logicalBottom;
    28052805    switch (child.style().clear()) {
    28062806    case Clear::None:
     
    41454145                    if (!child->isFloating())
    41464146                        lastText = nullptr;
    4147                     LayoutUnit margins = 0;
     4147                    LayoutUnit margins;
    41484148                    Length startMargin = childStyle.marginStart();
    41494149                    Length endMargin = childStyle.marginEnd();
  • trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp

    r235615 r238359  
    472472    }
    473473   
    474     LayoutUnit hyphenWidth = 0;
     474    LayoutUnit hyphenWidth;
    475475    if (downcast<InlineTextBox>(*run->box()).hasHyphen())
    476476        hyphenWidth = measureHyphenWidth(renderer, font, &fallbackFonts);
     
    14141414                    layoutState.updateRepaintRangeFromBox(lineBox);
    14151415               
    1416                 LayoutUnit adjustment = 0;
     1416                LayoutUnit adjustment;
    14171417                bool overflowsFragment = false;
    14181418               
     
    17901790        // Paginate all of the clean lines.
    17911791        bool paginated = view().frameView().layoutContext().layoutState() && view().frameView().layoutContext().layoutState()->isPaginated();
    1792         LayoutUnit paginationDelta = 0;
     1792        LayoutUnit paginationDelta;
    17931793        auto floatsIterator = floats.begin();
    17941794        auto end = floats.end();
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r238212 r238359  
    24052405LayoutUnit RenderBox::fillAvailableMeasure(LayoutUnit availableLogicalWidth) const
    24062406{
    2407     LayoutUnit marginStart = 0;
    2408     LayoutUnit marginEnd = 0;
     2407    LayoutUnit marginStart;
     2408    LayoutUnit marginEnd;
    24092409    return fillAvailableMeasure(availableLogicalWidth, marginStart, marginEnd);
    24102410}
     
    24222422        return std::max(borderAndPadding, fillAvailableMeasure(availableLogicalWidth));
    24232423
    2424     LayoutUnit minLogicalWidth = 0;
    2425     LayoutUnit maxLogicalWidth = 0;
     2424    LayoutUnit minLogicalWidth;
     2425    LayoutUnit maxLogicalWidth;
    24262426    computeIntrinsicLogicalWidths(minLogicalWidth, maxLogicalWidth);
    24272427
     
    24572457        return computeIntrinsicLogicalWidthUsing(logicalWidth, availableLogicalWidth, borderAndPaddingLogicalWidth());
    24582458
    2459     LayoutUnit marginStart = 0;
    2460     LayoutUnit marginEnd = 0;
     2459    LayoutUnit marginStart;
     2460    LayoutUnit marginEnd;
    24612461    LayoutUnit logicalWidthResult = fillAvailableMeasure(availableLogicalWidth, marginStart, marginEnd);
    24622462
     
    29092909    RenderBlock* cb = containingBlock();
    29102910    const RenderBox* containingBlockChild = this;
    2911     LayoutUnit rootMarginBorderPaddingHeight = 0;
     2911    LayoutUnit rootMarginBorderPaddingHeight;
    29122912    bool isHorizontal = isHorizontalWritingMode();
    29132913    while (cb && !is<RenderView>(*cb) && skipContainingBlockForPercentHeightCalculation(*cb, isHorizontal != cb->isHorizontalWritingMode())) {
     
    29842984        case MaxContent: {
    29852985            // MinContent/MaxContent don't need the availableLogicalWidth argument.
    2986             LayoutUnit availableLogicalWidth = 0;
     2986            LayoutUnit availableLogicalWidth;
    29872987            return computeIntrinsicLogicalWidthUsing(logicalWidth, availableLogicalWidth, borderAndPaddingLogicalWidth()) - borderAndPaddingLogicalWidth();
    29882988        }
     
    35673567    ASSERT(!(logicalLeft.isAuto() && logicalRight.isAuto()));
    35683568
    3569     LayoutUnit logicalLeftValue = 0;
     3569    LayoutUnit logicalLeftValue;
    35703570
    35713571    const LayoutUnit containerRelativeLogicalWidth = containingBlockLogicalWidthForPositioned(containerBlock, nullptr, false);
     
    39063906    const LayoutUnit containerRelativeLogicalWidth = containingBlockLogicalWidthForPositioned(containerBlock, nullptr, false);
    39073907
    3908     LayoutUnit logicalTopValue = 0;
     3908    LayoutUnit logicalTopValue;
    39093909
    39103910    bool logicalHeightIsAuto = logicalHeightLength.isAuto();
     
    40884088     *    'margin-right' ('margin-left').
    40894089    \*-----------------------------------------------------------------------*/
    4090     LayoutUnit logicalLeftValue = 0;
    4091     LayoutUnit logicalRightValue = 0;
     4090    LayoutUnit logicalLeftValue;
     4091    LayoutUnit logicalRightValue;
    40924092
    40934093    if (marginLogicalLeft.isAuto() && marginLogicalRight.isAuto()) {
     
    42494249     *    margins must get equal values.
    42504250    \*-----------------------------------------------------------------------*/
    4251     LayoutUnit logicalTopValue = 0;
    4252     LayoutUnit logicalBottomValue = 0;
     4251    LayoutUnit logicalTopValue;
     4252    LayoutUnit logicalBottomValue;
    42534253
    42544254    if (marginBefore.isAuto() && marginAfter.isAuto()) {
  • trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp

    r237266 r238359  
    626626LayoutUnit RenderBoxModelObject::computedCSSPadding(const Length& padding) const
    627627{
    628     LayoutUnit w = 0;
     628    LayoutUnit w;
    629629    if (padding.isPercentOrCalculated())
    630630        w = containingBlockLogicalWidthForContent();
     
    12151215    const LayoutRect& borderBoxRect, RenderElement* backgroundObject) const
    12161216{
    1217     LayoutUnit left = 0;
    1218     LayoutUnit top = 0;
     1217    LayoutUnit left;
     1218    LayoutUnit top;
    12191219    LayoutSize positioningAreaSize;
    12201220    // Determine the background positioning area and set destination rect to the background painting area.
     
    12251225    float deviceScaleFactor = document().deviceScaleFactor();
    12261226    if (!fixedAttachment) {
    1227         LayoutUnit right = 0;
    1228         LayoutUnit bottom = 0;
     1227        LayoutUnit right;
     1228        LayoutUnit bottom;
    12291229        // Scroll and Local.
    12301230        if (fillLayer.origin() != FillBox::Border) {
  • trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp

    r234808 r238359  
    137137    Length marginLeft = child->style().marginLeft();
    138138    Length marginRight = child->style().marginRight();
    139     LayoutUnit margin = 0;
     139    LayoutUnit margin;
    140140    if (marginLeft.isFixed())
    141141        margin += marginLeft.value();
     
    387387    LayoutUnit xPos = borderLeft() + paddingLeft();
    388388    bool heightSpecified = false;
    389     LayoutUnit oldHeight = 0;
    390 
    391     LayoutUnit remainingSpace = 0;
     389    LayoutUnit oldHeight;
     390
     391    LayoutUnit remainingSpace;
    392392
    393393    FlexBoxIterator iterator(this);
     
    623623        || (!style().isLeftToRightDirection() && style().boxPack() != BoxPack::End))) {
    624624        // Children must be repositioned.
    625         LayoutUnit offset = 0;
     625        LayoutUnit offset;
    626626        if (style().boxPack() == BoxPack::Justify) {
    627627            // Determine the total number of children.
     
    679679    LayoutUnit toAdd = borderBottom() + paddingBottom() + horizontalScrollbarHeight();
    680680    bool heightSpecified = false;
    681     LayoutUnit oldHeight = 0;
    682 
    683     LayoutUnit remainingSpace = 0;
     681    LayoutUnit oldHeight;
     682
     683    LayoutUnit remainingSpace;
    684684
    685685    FlexBoxIterator iterator(this);
     
    879879    if (style().boxPack() != BoxPack::Start && remainingSpace > 0) {
    880880        // Children must be repositioned.
    881         LayoutUnit offset = 0;
     881        LayoutUnit offset;
    882882        if (style().boxPack() == BoxPack::Justify) {
    883883            // Determine the total number of children.
  • trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp

    r237266 r238359  
    153153            textX = contentLeft + contentWidth() - buttonAndIconWidth - font.width(textRun);
    154154
    155         LayoutUnit textY = 0;
     155        LayoutUnit textY;
    156156        // We want to match the button's baseline
    157157        // FIXME: Make this work with transforms.
  • trunk/Source/WebCore/rendering/RenderFragmentedFlow.cpp

    r234808 r238359  
    112112
    113113        if (hasFragments()) {
    114             LayoutUnit previousFragmentLogicalWidth = 0;
    115             LayoutUnit previousFragmentLogicalHeight = 0;
     114            LayoutUnit previousFragmentLogicalWidth;
     115            LayoutUnit previousFragmentLogicalHeight;
    116116            bool firstFragmentVisited = false;
    117117           
     
    293293           
    294294            // Get the logical top coordinate of the current object.
    295             LayoutUnit top = 0;
     295            LayoutUnit top;
    296296            if (is<RenderBlock>(boxModelObject))
    297297                top = downcast<RenderBlock>(boxModelObject).offsetFromLogicalTopOfFirstPage();
     
    781781void RenderFragmentedFlow::updateFragmentsFragmentedFlowPortionRect()
    782782{
    783     LayoutUnit logicalHeight = 0;
     783    LayoutUnit logicalHeight;
    784784    // FIXME: Optimize not to clear the interval all the time. This implies manually managing the tree nodes lifecycle.
    785785    m_fragmentIntervalTree.clear();
  • trunk/Source/WebCore/rendering/RenderFrameSet.cpp

    r237266 r238359  
    140140    LayoutUnit borderThickness = frameSetElement().border();
    141141   
    142     LayoutUnit yPos = 0;
     142    LayoutUnit yPos;
    143143    for (size_t r = 0; r < rows; r++) {
    144         LayoutUnit xPos = 0;
     144        LayoutUnit xPos;
    145145        for (size_t c = 0; c < cols; c++) {
    146146            downcast<RenderElement>(*child).paint(paintInfo, adjustedPaintOffset);
  • trunk/Source/WebCore/rendering/RenderListItem.cpp

    r232178 r238359  
    271271
    272272    LayoutUnit markerOldLogicalLeft = m_marker->logicalLeft();
    273     LayoutUnit blockOffset = 0;
    274     LayoutUnit lineOffset = 0;
     273    LayoutUnit blockOffset;
     274    LayoutUnit lineOffset;
    275275    for (auto* ancestor = m_marker->parentBox(); ancestor && ancestor != this; ancestor = ancestor->parentBox()) {
    276276        blockOffset += ancestor->logicalTop();
  • trunk/Source/WebCore/rendering/RenderListMarker.cpp

    r237990 r238359  
    15551555    const FontCascade& font = style().fontCascade();
    15561556
    1557     LayoutUnit logicalWidth = 0;
     1557    LayoutUnit logicalWidth;
    15581558    ListStyleType type = style().listStyleType();
    15591559    switch (type) {
     
    16701670    const FontMetrics& fontMetrics = style().fontMetrics();
    16711671
    1672     LayoutUnit marginStart = 0;
    1673     LayoutUnit marginEnd = 0;
     1672    LayoutUnit marginStart;
     1673    LayoutUnit marginEnd;
    16741674
    16751675    if (isInside()) {
  • trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp

    r234215 r238359  
    704704    bool progressionIsInline = multiColumnFlow()->progressionIsInline();
    705705   
    706     LayoutUnit result = 0;
     706    LayoutUnit result;
    707707    if (!progressionIsInline && progressionReversed) {
    708708        LayoutRect colRect = columnRectAt(0);
  • trunk/Source/WebCore/rendering/RenderRubyRun.cpp

    r232178 r238359  
    156156    // Place the RenderRubyText such that its bottom is flush with the lineTop of the first line of the RenderRubyBase.
    157157    LayoutUnit lastLineRubyTextBottom = rt->logicalHeight();
    158     LayoutUnit firstLineRubyTextTop = 0;
     158    LayoutUnit firstLineRubyTextTop;
    159159    RootInlineBox* rootBox = rt->lastRootBox();
    160160    if (rootBox) {
     
    171171        setWidth(width() + distanceBetweenBase - font.letterSpacing());
    172172        if (RenderRubyBase* rb = rubyBase()) {
    173             LayoutUnit firstLineTop = 0;
     173            LayoutUnit firstLineTop;
    174174            LayoutUnit lastLineBottom = logicalHeight();
    175175            RootInlineBox* rootBox = rb->firstRootBox();
     
    185185        }
    186186    } else if (style().isFlippedLinesWritingMode() == (style().rubyPosition() == RubyPosition::After)) {
    187         LayoutUnit firstLineTop = 0;
     187        LayoutUnit firstLineTop;
    188188        if (RenderRubyBase* rb = rubyBase()) {
    189189            RootInlineBox* rootBox = rb->firstRootBox();
  • trunk/Source/WebCore/rendering/RenderTable.cpp

    r234619 r238359  
    301301
    302302    // HTML tables' width styles already include borders and paddings, but CSS tables' width styles do not.
    303     LayoutUnit borders = 0;
     303    LayoutUnit borders;
    304304    bool isCSSTable = !is<HTMLTableElement>(element());
    305305    if (isCSSTable && styleLogicalWidth.isSpecified() && styleLogicalWidth.isPositive() && style().boxSizing() == BoxSizing::ContentBox)
     
    401401    recalcBordersInRowDirection();
    402402    bool sectionMoved = false;
    403     LayoutUnit movedSectionLogicalTop = 0;
     403    LayoutUnit movedSectionLogicalTop;
    404404
    405405    LayoutRepainter repainter(*this, checkForRepaintDuringLayout());
     
    423423        m_tableLayout->layout();
    424424
    425         LayoutUnit totalSectionLogicalHeight = 0;
    426         LayoutUnit oldTableLogicalTop = 0;
     425        LayoutUnit totalSectionLogicalHeight;
     426        LayoutUnit oldTableLogicalTop;
    427427        for (unsigned i = 0; i < m_captions.size(); i++) {
    428428            if (m_captions[i]->style().captionSide() == CaptionSide::Bottom)
     
    466466            updateLogicalHeight();
    467467
    468         LayoutUnit computedLogicalHeight = 0;
     468        LayoutUnit computedLogicalHeight;
    469469   
    470470        Length logicalHeightLength = style().logicalHeight();
     
    935935    unsigned numberOfEffectiveColumns = numEffCols();
    936936    ASSERT_WITH_SECURITY_IMPLICATION(m_columnPos.size() >= numberOfEffectiveColumns + 1);
    937     LayoutUnit width = 0;
     937    LayoutUnit width;
    938938    LayoutUnit spacing = m_hSpacing;
    939939    while (currentColumn) {
     
    965965        return m_columnOffsetHeight;
    966966    }
    967     LayoutUnit height = 0;
     967    LayoutUnit height;
    968968    for (RenderTableSection* section = topSection(); section; section = sectionBelow(section))
    969969        height += section->offsetHeight();
     
    12091209    if (!collapseBorders())
    12101210        return 0;
    1211     LayoutUnit borderWidth = 0;
     1211    LayoutUnit borderWidth;
    12121212    if (RenderTableSection* topSection = this->topSection()) {
    12131213        borderWidth = topSection->outerBorderBefore();
     
    12291229    if (!collapseBorders())
    12301230        return 0;
    1231     LayoutUnit borderWidth = 0;
     1231    LayoutUnit borderWidth;
    12321232
    12331233    if (RenderTableSection* section = bottomSection()) {
     
    12521252        return 0;
    12531253
    1254     LayoutUnit borderWidth = 0;
     1254    LayoutUnit borderWidth;
    12551255
    12561256    const BorderValue& tb = style().borderStart();
     
    12791279        return 0;
    12801280
    1281     LayoutUnit borderWidth = 0;
     1281    LayoutUnit borderWidth;
    12821282
    12831283    const BorderValue& tb = style().borderEnd();
  • trunk/Source/WebCore/rendering/RenderTableCell.cpp

    r238001 r238359  
    155155
    156156    unsigned colSpanCount = colSpan();
    157     LayoutUnit colWidthSum = 0;
     157    LayoutUnit colWidthSum;
    158158    for (unsigned i = 1; i <= colSpanCount; i++) {
    159159        Length colWidth = tableCol->style().logicalWidth();
     
    209209    LayoutUnit logicalHeightWithoutIntrinsicPadding = logicalHeight() - oldIntrinsicPaddingBefore - oldIntrinsicPaddingAfter;
    210210
    211     LayoutUnit intrinsicPaddingBefore = 0;
     211    LayoutUnit intrinsicPaddingBefore;
    212212    switch (style().verticalAlign()) {
    213213    case VerticalAlign::Sub:
  • trunk/Source/WebCore/rendering/RenderTableSection.cpp

    r234619 r238359  
    232232
    233233    // We ignore the border-spacing on any non-top section as it is already included in the previous section's last row position.
    234     LayoutUnit spacing = 0;
     234    LayoutUnit spacing;
    235235    if (this == table()->topSection())
    236236        spacing = table()->vBorderSpacing();
     
    245245    for (unsigned r = 0; r < totalRows; r++) {
    246246        m_grid[r].baseline = 0;
    247         LayoutUnit baselineDescent = 0;
     247        LayoutUnit baselineDescent;
    248248
    249249        // Our base size is the biggest logical height from our cells' styles (excluding row spanning cells).
     
    305305                        // become the baseline descent applied to the rest of the row. Also we don't account for the baseline descent of
    306306                        // non-spanning cells when computing a spanning cell's extent.
    307                         LayoutUnit cellStartRowBaselineDescent = 0;
     307                        LayoutUnit cellStartRowBaselineDescent;
    308308                        if (cell->rowSpan() == 1) {
    309309                            baselineDescent = std::max(baselineDescent, cellLogicalHeight - baselinePosition);
     
    384384    unsigned totalRows = m_grid.size();
    385385    LayoutUnit totalHeight = m_rowPos[totalRows] + extraLogicalHeight;
    386     LayoutUnit totalLogicalHeightAdded = 0;
     386    LayoutUnit totalLogicalHeightAdded;
    387387    totalPercent = std::min(totalPercent, 100);
    388388    LayoutUnit rowHeight = m_rowPos[1] - m_rowPos[0];
     
    409409        return;
    410410
    411     LayoutUnit totalLogicalHeightAdded = 0;
     411    LayoutUnit totalLogicalHeightAdded;
    412412    for (unsigned r = 0; r < m_grid.size(); ++r) {
    413413        if (autoRowsCount > 0 && m_grid[r].logicalHeight.isAuto()) {
     
    431431    // FIXME: m_rowPos[totalRows] - m_rowPos[0] is the total rows' size.
    432432    LayoutUnit totalRowSize = m_rowPos[totalRows];
    433     LayoutUnit totalLogicalHeightAdded = 0;
     433    LayoutUnit totalLogicalHeightAdded;
    434434    LayoutUnit previousRowPosition = m_rowPos[0];
    435435    for (unsigned r = 0; r < totalRows; r++) {
     
    569569        }
    570570
    571         LayoutUnit rowHeightIncreaseForPagination = 0;
     571        LayoutUnit rowHeightIncreaseForPagination;
    572572
    573573        for (unsigned c = 0; c < nEffCols; c++) {
     
    684684        return 0;
    685685
    686     LayoutUnit borderWidth = 0;
     686    LayoutUnit borderWidth;
    687687
    688688    const BorderValue& sb = style().borderBefore();
     
    734734        return 0;
    735735
    736     LayoutUnit borderWidth = 0;
     736    LayoutUnit borderWidth;
    737737
    738738    const BorderValue& sb = style().borderAfter();
     
    784784        return 0;
    785785
    786     LayoutUnit borderWidth = 0;
     786    LayoutUnit borderWidth;
    787787
    788788    const BorderValue& sb = style().borderStart();
     
    827827        return 0;
    828828
    829     LayoutUnit borderWidth = 0;
     829    LayoutUnit borderWidth;
    830830
    831831    const BorderValue& sb = style().borderEnd();
  • trunk/Source/WebCore/rendering/RootInlineBox.cpp

    r237266 r238359  
    244244        return 0;
    245245
    246     LayoutUnit maxPositionTop = 0;
    247     LayoutUnit maxPositionBottom = 0;
     246    LayoutUnit maxPositionTop;
     247    LayoutUnit maxPositionBottom;
    248248    int maxAscent = 0;
    249249    int maxDescent = 0;
     
    301301LayoutUnit RootInlineBox::beforeAnnotationsAdjustment() const
    302302{
    303     LayoutUnit result = 0;
     303    LayoutUnit result;
    304304
    305305    if (!renderer().style().isFlippedLinesWritingMode()) {
     
    374374    // If we're paginated, see if we're on a page after the first one. If so, the grid resets on subsequent pages.
    375375    // FIXME: If the grid is an ancestor of the pagination establisher, then this is incorrect.
    376     LayoutUnit pageLogicalTop = 0;
     376    LayoutUnit pageLogicalTop;
    377377    if (layoutState->isPaginated() && layoutState->pageLogicalHeight()) {
    378378        pageLogicalTop = blockFlow().pageLogicalTopForOffset(lineTopWithLeading() + delta);
     
    10141014    }
    10151015
    1016     LayoutUnit verticalPosition = 0;
     1016    LayoutUnit verticalPosition;
    10171017    VerticalAlign verticalAlign = renderer->style().verticalAlign();
    10181018    if (verticalAlign == VerticalAlign::Top || verticalAlign == VerticalAlign::Bottom)
  • trunk/Source/WebCore/rendering/line/BreakingContext.h

    r232229 r238359  
    410410{
    411411    unsigned lineDepth = 1;
    412     LayoutUnit extraWidth = 0;
     412    LayoutUnit extraWidth;
    413413    RenderElement* parent = child->parent();
    414414    while (is<RenderInline>(*parent) && lineDepth++ < cMaxLineDepth) {
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp

    r234808 r238359  
    191191    LayoutUnit horizontalOffset = borderStart() + paddingStart();
    192192
    193     LayoutUnit preferredHorizontalExtent = 0;
     193    LayoutUnit preferredHorizontalExtent;
    194194    for (auto* child = firstChildBox(); child; child = child->nextSiblingBox()) {
    195195        LayoutUnit childHorizontalExtent = child->maxPreferredLogicalWidth() - child->horizontalBorderAndPaddingExtent();
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp

    r234619 r238359  
    225225    setLogicalWidth(std::max(numerator().logicalWidth(), denominator().logicalWidth()));
    226226
    227     LayoutUnit verticalOffset = 0; // This is the top of the renderer.
     227    LayoutUnit verticalOffset; // This is the top of the renderer.
    228228    LayoutPoint numeratorLocation(horizontalOffset(numerator(), element().numeratorAlignment()), verticalOffset);
    229229    numerator().setLocation(numeratorLocation);
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp

    r234808 r238359  
    191191    ASSERT(preferredLogicalWidthsDirty());
    192192
    193     LayoutUnit preferredWidth = 0;
     193    LayoutUnit preferredWidth;
    194194
    195195    if (!useMathOperator()) {
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp

    r232178 r238359  
    162162    }
    163163
    164     LayoutUnit preferredWidth = 0;
     164    LayoutUnit preferredWidth;
    165165    if (rootType() == RootType::SquareRoot) {
    166166        preferredWidth += m_radicalOperator.maxPreferredWidth();
     
    274274    // We draw the radical operator.
    275275    LayoutPoint radicalOperatorTopLeft = paintOffset + location();
    276     LayoutUnit horizontalOffset = 0;
     276    LayoutUnit horizontalOffset;
    277277    if (rootType() == RootType::RootWithIndex) {
    278278        auto horizontal = horizontalParameters();
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp

    r227722 r238359  
    130130    m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = 0;
    131131
    132     LayoutUnit preferredWidth = 0;
     132    LayoutUnit preferredWidth;
    133133    for (auto* child = firstChildBox(); child; child = child->nextSiblingBox()) {
    134134        if (child->isOutOfFlowPositioned())
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp

    r226287 r238359  
    372372    LayoutUnit baseDescent = reference.base->logicalHeight() - baseAscent;
    373373    LayoutUnit baseItalicCorrection = std::min(reference.base->logicalWidth(), italicCorrection(reference));
    374     LayoutUnit horizontalOffset = 0;
     374    LayoutUnit horizontalOffset;
    375375
    376376    LayoutUnit ascent = std::max(baseAscent, metrics.ascent + metrics.supShift);
     
    405405    case ScriptType::Multiscripts: {
    406406        // Calculate the logical width.
    407         LayoutUnit logicalWidth = 0;
     407        LayoutUnit logicalWidth;
    408408        auto subScript = reference.firstPreScript;
    409409        while (subScript) {
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp

    r226287 r238359  
    9595    Vector<RenderMathMLOperator*, 3> stretchyOperators;
    9696    bool isAllStretchyOperators = true;
    97     LayoutUnit stretchWidth = 0;
     97    LayoutUnit stretchWidth;
    9898
    9999    for (auto* child = firstChildBox(); child; child = child->nextSiblingBox()) {
     
    318318
    319319    VerticalParameters parameters = verticalParameters();
    320     LayoutUnit verticalOffset = 0;
     320    LayoutUnit verticalOffset;
    321321    if (scriptType() == ScriptType::Over || scriptType() == ScriptType::UnderOver) {
    322322        verticalOffset += parameters.overExtraAscender;
  • trunk/Source/WebCore/rendering/style/RenderStyle.cpp

    r238155 r238359  
    17681768LayoutBoxExtent RenderStyle::getShadowInsetExtent(const ShadowData* shadow) const
    17691769{
    1770     LayoutUnit top = 0;
    1771     LayoutUnit right = 0;
    1772     LayoutUnit bottom = 0;
    1773     LayoutUnit left = 0;
     1770    LayoutUnit top;
     1771    LayoutUnit right;
     1772    LayoutUnit bottom;
     1773    LayoutUnit left;
    17741774
    17751775    for ( ; shadow; shadow = shadow->next()) {
  • trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp

    r237255 r238359  
    403403    FloatRect oldBoundaries = objectBoundingBox();
    404404    ASSERT(childrenInline());
    405     LayoutUnit repaintLogicalTop = 0;
    406     LayoutUnit repaintLogicalBottom = 0;
     405    LayoutUnit repaintLogicalTop;
     406    LayoutUnit repaintLogicalBottom;
    407407    rebuildFloatingObjectSetFromIntrudingFloats();
    408408    layoutInlineChildren(true, repaintLogicalTop, repaintLogicalBottom);
Note: See TracChangeset for help on using the changeset viewer.