Changeset 238359 in webkit
- Timestamp:
- Nov 17, 2018 7:14:31 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 37 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r238357 r238359 1 2018-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 1 147 2018-11-17 Simon Fraser <simon.fraser@apple.com> 2 148 -
trunk/Source/WebCore/editing/Editor.cpp
r238080 r238359 3239 3239 return enclosingIntRect(RenderObject::absoluteBoundingBoxRectForRange(range)); 3240 3240 3241 LayoutUnit extraWidthToEndOfLine = 0;3241 LayoutUnit extraWidthToEndOfLine; 3242 3242 IntRect startCaretRect = RenderedPosition(startVisiblePosition).absoluteRect(&extraWidthToEndOfLine); 3243 3243 if (startCaretRect == IntRect()) -
trunk/Source/WebCore/editing/FrameSelection.cpp
r237266 r238359 1423 1423 1424 1424 VisiblePosition pos; 1425 LayoutUnit xPos = 0;1425 LayoutUnit xPos; 1426 1426 switch (alter) { 1427 1427 case AlterationMove: … … 1489 1489 LayoutUnit FrameSelection::lineDirectionPointForBlockDirectionNavigation(EPositionType type) 1490 1490 { 1491 LayoutUnit x = 0;1491 LayoutUnit x; 1492 1492 1493 1493 if (isNone()) -
trunk/Source/WebCore/html/shadow/SliderThumbElement.cpp
r237266 r238359 142 142 if (input.renderer()->isSlider() && !isVertical && input.list()) { 143 143 int offsetFromCenter = theme().sliderTickOffsetFromTrackCenter(); 144 LayoutUnit trackHeight = 0;144 LayoutUnit trackHeight; 145 145 if (offsetFromCenter < 0) 146 146 trackHeight = -2 * offsetFromCenter; -
trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContextGeometry.cpp
r238028 r238359 126 126 127 127 float expansion = widthToDistribute.toFloat() / expansionOpportunities; 128 LayoutUnit accumulatedExpansion = 0;128 LayoutUnit accumulatedExpansion; 129 129 for (auto runIndex = *runRange.firstRunIndex; runIndex <= *runRange.lastRunIndex; ++runIndex) { 130 130 auto& inlineRun = inlineRuns[runIndex]; -
trunk/Source/WebCore/page/FrameView.cpp
r238352 r238359 4614 4614 LayoutUnit docLogicalTop = horizontalWritingMode ? updatedDocumentRect.y() : updatedDocumentRect.x(); 4615 4615 LayoutUnit docLogicalRight = horizontalWritingMode ? updatedDocumentRect.maxX() : updatedDocumentRect.maxY(); 4616 LayoutUnit clippedLogicalLeft = 0;4616 LayoutUnit clippedLogicalLeft; 4617 4617 if (!renderView->style().isLeftToRightDirection()) 4618 4618 clippedLogicalLeft = docLogicalRight - pageLogicalWidth; -
trunk/Source/WebCore/page/SpatialNavigation.cpp
r235457 r238359 337 337 338 338 if (frame && canScrollInDirection(frame->document(), direction)) { 339 LayoutUnit dx = 0;340 LayoutUnit dy = 0;339 LayoutUnit dx; 340 LayoutUnit dy; 341 341 switch (direction) { 342 342 case FocusDirectionLeft: … … 373 373 374 374 if (canScrollInDirection(container, direction)) { 375 LayoutUnit dx = 0;376 LayoutUnit dy = 0;375 LayoutUnit dx; 376 LayoutUnit dy; 377 377 switch (direction) { 378 378 case FocusDirectionLeft: … … 661 661 LayoutPoint exitPoint; 662 662 LayoutPoint entryPoint; 663 LayoutUnit sameAxisDistance = 0;664 LayoutUnit otherAxisDistance = 0;663 LayoutUnit sameAxisDistance; 664 LayoutUnit otherAxisDistance; 665 665 entryAndExitPointsForDirection(direction, currentRect, nodeRect, exitPoint, entryPoint); 666 666 -
trunk/Source/WebCore/rendering/AutoTableLayout.cpp
r233148 r238359 774 774 } 775 775 776 LayoutUnit pos = 0;776 LayoutUnit pos; 777 777 for (size_t i = 0; i < nEffCols; ++i) { 778 778 m_table->setColumnPosition(i, pos); -
trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp
r238114 r238359 115 115 Length marginLeft = child.style().marginStartUsing(&renderGrid->style()); 116 116 Length marginRight = child.style().marginEndUsing(&renderGrid->style()); 117 LayoutUnit margin = 0;117 LayoutUnit margin; 118 118 if (marginLeft.isFixed()) 119 119 margin += marginLeft.value(); … … 583 583 const Vector<GridTrack>& allTracks = tracks(direction); 584 584 const GridSpan& span = m_grid.gridItemSpan(child, direction); 585 LayoutUnit gridAreaBreadth = 0;585 LayoutUnit gridAreaBreadth; 586 586 for (auto trackPosition : span) 587 587 gridAreaBreadth += allTracks[trackPosition].baseSize(); -
trunk/Source/WebCore/rendering/InlineFlowBox.cpp
r238001 r238359 628 628 } 629 629 630 LayoutUnit adjustmentForChildrenWithSameLineHeightAndBaseline = 0;630 LayoutUnit adjustmentForChildrenWithSameLineHeightAndBaseline; 631 631 if (descendantsHaveSameLineHeightAndBaseline()) { 632 632 adjustmentForChildrenWithSameLineHeightAndBaseline = logicalTop(); … … 1259 1259 // as though you had one single line. This means each line has to pick up the background where 1260 1260 // the previous line left off. 1261 LayoutUnit logicalOffsetOnLine = 0;1261 LayoutUnit logicalOffsetOnLine; 1262 1262 LayoutUnit totalLogicalWidth; 1263 1263 if (renderer().style().direction() == TextDirection::LTR) { … … 1404 1404 // FIXME: What the heck do we do with RTL here? The math we're using is obviously not right, 1405 1405 // but it isn't even clear how this should work at all. 1406 LayoutUnit logicalOffsetOnLine = 0;1406 LayoutUnit logicalOffsetOnLine; 1407 1407 for (InlineFlowBox* curr = prevLineBox(); curr; curr = curr->prevLineBox()) 1408 1408 logicalOffsetOnLine += curr->logicalWidth(); … … 1472 1472 // We have a mask image that spans multiple lines. 1473 1473 // We need to adjust _tx and _ty by the width of all previous lines. 1474 LayoutUnit logicalOffsetOnLine = 0;1474 LayoutUnit logicalOffsetOnLine; 1475 1475 for (InlineFlowBox* curr = prevLineBox(); curr; curr = curr->prevLineBox()) 1476 1476 logicalOffsetOnLine += curr->logicalWidth(); … … 1561 1561 LayoutUnit InlineFlowBox::computeOverAnnotationAdjustment(LayoutUnit allowedPosition) const 1562 1562 { 1563 LayoutUnit result = 0;1563 LayoutUnit result; 1564 1564 for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) { 1565 1565 if (child->renderer().isOutOfFlowPositioned()) … … 1609 1609 LayoutUnit InlineFlowBox::computeUnderAnnotationAdjustment(LayoutUnit allowedPosition) const 1610 1610 { 1611 LayoutUnit result = 0;1611 LayoutUnit result; 1612 1612 for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) { 1613 1613 if (child->renderer().isOutOfFlowPositioned()) -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r237266 r238359 971 971 Length marginLeft = child.style().marginStartUsing(&style()); 972 972 Length marginRight = child.style().marginEndUsing(&style()); 973 LayoutUnit margin = 0;973 LayoutUnit margin; 974 974 if (marginLeft.isFixed()) 975 975 margin += marginLeft.value(); … … 1012 1012 // If we are paginated or in a line grid, compute a vertical position for our object now. 1013 1013 // If it's wrong we'll lay out again. 1014 LayoutUnit oldLogicalTop = 0;1014 LayoutUnit oldLogicalTop; 1015 1015 bool needsBlockDirectionLocationSetBeforeLayout = r.needsLayout() && view().frameView().layoutContext().layoutState()->needsBlockDirectionLocationSetBeforeLayout(); 1016 1016 if (needsBlockDirectionLocationSetBeforeLayout) { … … 1414 1414 1415 1415 LogicalSelectionOffsetCaches cache(*this); 1416 LayoutUnit lastTop = 0;1416 LayoutUnit lastTop; 1417 1417 LayoutUnit lastLeft = logicalLeftSelectionOffset(*this, lastTop, cache); 1418 1418 LayoutUnit lastRight = logicalRightSelectionOffset(*this, lastTop, cache); … … 1426 1426 if (shouldPaintSelectionGaps() && paintInfo.phase == PaintPhase::Foreground) { 1427 1427 LogicalSelectionOffsetCaches cache(*this); 1428 LayoutUnit lastTop = 0;1428 LayoutUnit lastTop; 1429 1429 LayoutUnit lastLeft = logicalLeftSelectionOffset(*this, lastTop, cache); 1430 1430 LayoutUnit lastRight = logicalRightSelectionOffset(*this, lastTop, cache); … … 1840 1840 LayoutUnit RenderBlock::textIndentOffset() const 1841 1841 { 1842 LayoutUnit cw = 0;1842 LayoutUnit cw; 1843 1843 if (style().textIndent().isPercentOrCalculated()) 1844 1844 cw = containingBlock()->availableLogicalWidth(); … … 2309 2309 Length startMarginLength = childStyle.marginStartUsing(&styleToUse); 2310 2310 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; 2314 2314 if (startMarginLength.isFixed()) 2315 2315 marginStart += startMarginLength.value(); -
trunk/Source/WebCore/rendering/RenderBlockFlow.cpp
r235586 r238359 227 227 addIntrudingFloats(&parentBlock, &parentBlock, parentBlock.logicalLeftOffsetForContent(), logicalTopOffset); 228 228 229 LayoutUnit logicalLeftOffset = 0;229 LayoutUnit logicalLeftOffset; 230 230 if (previousBlock) 231 231 logicalTopOffset -= previousBlock->logicalTop(); … … 471 471 checkForPaginationLogicalHeightChange(relayoutChildren, pageLogicalHeight, pageLogicalHeightChanged); 472 472 473 LayoutUnit repaintLogicalTop = 0;474 LayoutUnit repaintLogicalBottom = 0;475 LayoutUnit maxFloatLogicalBottom = 0;473 LayoutUnit repaintLogicalTop; 474 LayoutUnit repaintLogicalBottom; 475 LayoutUnit maxFloatLogicalBottom; 476 476 const RenderStyle& styleToUse = style(); 477 477 { … … 625 625 layoutExcludedChildren(relayoutChildren); 626 626 627 LayoutUnit previousFloatLogicalBottom = 0;627 LayoutUnit previousFloatLogicalBottom; 628 628 maxFloatLogicalBottom = 0; 629 629 … … 908 908 RenderBlockFlow::MarginValues RenderBlockFlow::marginValuesForChild(RenderBox& child) const 909 909 { 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; 917 917 918 918 RenderBlockFlow* childRenderBlock = is<RenderBlockFlow>(child) ? &downcast<RenderBlockFlow>(child) : nullptr; … … 1264 1264 LayoutUnit logicalTopEstimate = logicalHeight(); 1265 1265 if (!marginInfo.canCollapseWithMarginBefore()) { 1266 LayoutUnit positiveMarginBefore = 0;1267 LayoutUnit negativeMarginBefore = 0;1266 LayoutUnit positiveMarginBefore; 1267 LayoutUnit negativeMarginBefore; 1268 1268 bool discardMarginBefore = false; 1269 1269 if (child.selfNeedsLayout()) { … … 1507 1507 } 1508 1508 if (checkFragmentBreaks) { 1509 LayoutUnit offsetBreakAdjustment = 0;1509 LayoutUnit offsetBreakAdjustment; 1510 1510 if (fragmentedFlow->addForcedFragmentBreak(this, offsetFromLogicalTopOfFirstPage() + logicalOffset, &child, true, &offsetBreakAdjustment)) 1511 1511 return logicalOffset + offsetBreakAdjustment; … … 1537 1537 } 1538 1538 if (checkFragmentBreaks) { 1539 LayoutUnit offsetBreakAdjustment = 0;1539 LayoutUnit offsetBreakAdjustment; 1540 1540 if (fragmentedFlow->addForcedFragmentBreak(this, offsetFromLogicalTopOfFirstPage() + logicalOffset + marginOffset, &child, false, &offsetBreakAdjustment)) 1541 1541 return logicalOffset + marginOffset + offsetBreakAdjustment; … … 1596 1596 LayoutUnit logicalTopAfterUnsplittableAdjustment = adjustForUnsplittableChild(child, result); 1597 1597 1598 LayoutUnit paginationStrut = 0;1598 LayoutUnit paginationStrut; 1599 1599 LayoutUnit unsplittableAdjustmentDelta = logicalTopAfterUnsplittableAdjustment - logicalTopBeforeUnsplittableAdjustment; 1600 1600 if (unsplittableAdjustmentDelta) … … 2539 2539 positionNewFloats(); 2540 2540 // set y position 2541 LayoutUnit newY = 0;2541 LayoutUnit newY; 2542 2542 switch (clear) { 2543 2543 case Clear::Left: … … 2593 2593 if (!m_floatingObjects) 2594 2594 return 0; 2595 LayoutUnit lowestFloatBottom = 0;2595 LayoutUnit lowestFloatBottom; 2596 2596 const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set(); 2597 2597 auto end = floatingObjectSet.end(); … … 2608 2608 if (!m_floatingObjects) 2609 2609 return 0; 2610 LayoutUnit lowestFloatBottom = 0;2610 LayoutUnit lowestFloatBottom; 2611 2611 const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set(); 2612 2612 auto end = floatingObjectSet.end(); … … 2627 2627 LayoutUnit childLogicalTop = child.logicalTop(); 2628 2628 LayoutUnit childLogicalLeft = child.logicalLeft(); 2629 LayoutUnit lowestFloatLogicalBottom = 0;2629 LayoutUnit lowestFloatLogicalBottom; 2630 2630 2631 2631 // Floats that will remain the child's responsibility to paint should factor into its … … 2802 2802 // At least one float is present. We need to perform the clearance computation. 2803 2803 bool clearSet = child.style().clear() != Clear::None; 2804 LayoutUnit logicalBottom = 0;2804 LayoutUnit logicalBottom; 2805 2805 switch (child.style().clear()) { 2806 2806 case Clear::None: … … 4145 4145 if (!child->isFloating()) 4146 4146 lastText = nullptr; 4147 LayoutUnit margins = 0;4147 LayoutUnit margins; 4148 4148 Length startMargin = childStyle.marginStart(); 4149 4149 Length endMargin = childStyle.marginEnd(); -
trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp
r235615 r238359 472 472 } 473 473 474 LayoutUnit hyphenWidth = 0;474 LayoutUnit hyphenWidth; 475 475 if (downcast<InlineTextBox>(*run->box()).hasHyphen()) 476 476 hyphenWidth = measureHyphenWidth(renderer, font, &fallbackFonts); … … 1414 1414 layoutState.updateRepaintRangeFromBox(lineBox); 1415 1415 1416 LayoutUnit adjustment = 0;1416 LayoutUnit adjustment; 1417 1417 bool overflowsFragment = false; 1418 1418 … … 1790 1790 // Paginate all of the clean lines. 1791 1791 bool paginated = view().frameView().layoutContext().layoutState() && view().frameView().layoutContext().layoutState()->isPaginated(); 1792 LayoutUnit paginationDelta = 0;1792 LayoutUnit paginationDelta; 1793 1793 auto floatsIterator = floats.begin(); 1794 1794 auto end = floats.end(); -
trunk/Source/WebCore/rendering/RenderBox.cpp
r238212 r238359 2405 2405 LayoutUnit RenderBox::fillAvailableMeasure(LayoutUnit availableLogicalWidth) const 2406 2406 { 2407 LayoutUnit marginStart = 0;2408 LayoutUnit marginEnd = 0;2407 LayoutUnit marginStart; 2408 LayoutUnit marginEnd; 2409 2409 return fillAvailableMeasure(availableLogicalWidth, marginStart, marginEnd); 2410 2410 } … … 2422 2422 return std::max(borderAndPadding, fillAvailableMeasure(availableLogicalWidth)); 2423 2423 2424 LayoutUnit minLogicalWidth = 0;2425 LayoutUnit maxLogicalWidth = 0;2424 LayoutUnit minLogicalWidth; 2425 LayoutUnit maxLogicalWidth; 2426 2426 computeIntrinsicLogicalWidths(minLogicalWidth, maxLogicalWidth); 2427 2427 … … 2457 2457 return computeIntrinsicLogicalWidthUsing(logicalWidth, availableLogicalWidth, borderAndPaddingLogicalWidth()); 2458 2458 2459 LayoutUnit marginStart = 0;2460 LayoutUnit marginEnd = 0;2459 LayoutUnit marginStart; 2460 LayoutUnit marginEnd; 2461 2461 LayoutUnit logicalWidthResult = fillAvailableMeasure(availableLogicalWidth, marginStart, marginEnd); 2462 2462 … … 2909 2909 RenderBlock* cb = containingBlock(); 2910 2910 const RenderBox* containingBlockChild = this; 2911 LayoutUnit rootMarginBorderPaddingHeight = 0;2911 LayoutUnit rootMarginBorderPaddingHeight; 2912 2912 bool isHorizontal = isHorizontalWritingMode(); 2913 2913 while (cb && !is<RenderView>(*cb) && skipContainingBlockForPercentHeightCalculation(*cb, isHorizontal != cb->isHorizontalWritingMode())) { … … 2984 2984 case MaxContent: { 2985 2985 // MinContent/MaxContent don't need the availableLogicalWidth argument. 2986 LayoutUnit availableLogicalWidth = 0;2986 LayoutUnit availableLogicalWidth; 2987 2987 return computeIntrinsicLogicalWidthUsing(logicalWidth, availableLogicalWidth, borderAndPaddingLogicalWidth()) - borderAndPaddingLogicalWidth(); 2988 2988 } … … 3567 3567 ASSERT(!(logicalLeft.isAuto() && logicalRight.isAuto())); 3568 3568 3569 LayoutUnit logicalLeftValue = 0;3569 LayoutUnit logicalLeftValue; 3570 3570 3571 3571 const LayoutUnit containerRelativeLogicalWidth = containingBlockLogicalWidthForPositioned(containerBlock, nullptr, false); … … 3906 3906 const LayoutUnit containerRelativeLogicalWidth = containingBlockLogicalWidthForPositioned(containerBlock, nullptr, false); 3907 3907 3908 LayoutUnit logicalTopValue = 0;3908 LayoutUnit logicalTopValue; 3909 3909 3910 3910 bool logicalHeightIsAuto = logicalHeightLength.isAuto(); … … 4088 4088 * 'margin-right' ('margin-left'). 4089 4089 \*-----------------------------------------------------------------------*/ 4090 LayoutUnit logicalLeftValue = 0;4091 LayoutUnit logicalRightValue = 0;4090 LayoutUnit logicalLeftValue; 4091 LayoutUnit logicalRightValue; 4092 4092 4093 4093 if (marginLogicalLeft.isAuto() && marginLogicalRight.isAuto()) { … … 4249 4249 * margins must get equal values. 4250 4250 \*-----------------------------------------------------------------------*/ 4251 LayoutUnit logicalTopValue = 0;4252 LayoutUnit logicalBottomValue = 0;4251 LayoutUnit logicalTopValue; 4252 LayoutUnit logicalBottomValue; 4253 4253 4254 4254 if (marginBefore.isAuto() && marginAfter.isAuto()) { -
trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp
r237266 r238359 626 626 LayoutUnit RenderBoxModelObject::computedCSSPadding(const Length& padding) const 627 627 { 628 LayoutUnit w = 0;628 LayoutUnit w; 629 629 if (padding.isPercentOrCalculated()) 630 630 w = containingBlockLogicalWidthForContent(); … … 1215 1215 const LayoutRect& borderBoxRect, RenderElement* backgroundObject) const 1216 1216 { 1217 LayoutUnit left = 0;1218 LayoutUnit top = 0;1217 LayoutUnit left; 1218 LayoutUnit top; 1219 1219 LayoutSize positioningAreaSize; 1220 1220 // Determine the background positioning area and set destination rect to the background painting area. … … 1225 1225 float deviceScaleFactor = document().deviceScaleFactor(); 1226 1226 if (!fixedAttachment) { 1227 LayoutUnit right = 0;1228 LayoutUnit bottom = 0;1227 LayoutUnit right; 1228 LayoutUnit bottom; 1229 1229 // Scroll and Local. 1230 1230 if (fillLayer.origin() != FillBox::Border) { -
trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
r234808 r238359 137 137 Length marginLeft = child->style().marginLeft(); 138 138 Length marginRight = child->style().marginRight(); 139 LayoutUnit margin = 0;139 LayoutUnit margin; 140 140 if (marginLeft.isFixed()) 141 141 margin += marginLeft.value(); … … 387 387 LayoutUnit xPos = borderLeft() + paddingLeft(); 388 388 bool heightSpecified = false; 389 LayoutUnit oldHeight = 0;390 391 LayoutUnit remainingSpace = 0;389 LayoutUnit oldHeight; 390 391 LayoutUnit remainingSpace; 392 392 393 393 FlexBoxIterator iterator(this); … … 623 623 || (!style().isLeftToRightDirection() && style().boxPack() != BoxPack::End))) { 624 624 // Children must be repositioned. 625 LayoutUnit offset = 0;625 LayoutUnit offset; 626 626 if (style().boxPack() == BoxPack::Justify) { 627 627 // Determine the total number of children. … … 679 679 LayoutUnit toAdd = borderBottom() + paddingBottom() + horizontalScrollbarHeight(); 680 680 bool heightSpecified = false; 681 LayoutUnit oldHeight = 0;682 683 LayoutUnit remainingSpace = 0;681 LayoutUnit oldHeight; 682 683 LayoutUnit remainingSpace; 684 684 685 685 FlexBoxIterator iterator(this); … … 879 879 if (style().boxPack() != BoxPack::Start && remainingSpace > 0) { 880 880 // Children must be repositioned. 881 LayoutUnit offset = 0;881 LayoutUnit offset; 882 882 if (style().boxPack() == BoxPack::Justify) { 883 883 // Determine the total number of children. -
trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp
r237266 r238359 153 153 textX = contentLeft + contentWidth() - buttonAndIconWidth - font.width(textRun); 154 154 155 LayoutUnit textY = 0;155 LayoutUnit textY; 156 156 // We want to match the button's baseline 157 157 // FIXME: Make this work with transforms. -
trunk/Source/WebCore/rendering/RenderFragmentedFlow.cpp
r234808 r238359 112 112 113 113 if (hasFragments()) { 114 LayoutUnit previousFragmentLogicalWidth = 0;115 LayoutUnit previousFragmentLogicalHeight = 0;114 LayoutUnit previousFragmentLogicalWidth; 115 LayoutUnit previousFragmentLogicalHeight; 116 116 bool firstFragmentVisited = false; 117 117 … … 293 293 294 294 // Get the logical top coordinate of the current object. 295 LayoutUnit top = 0;295 LayoutUnit top; 296 296 if (is<RenderBlock>(boxModelObject)) 297 297 top = downcast<RenderBlock>(boxModelObject).offsetFromLogicalTopOfFirstPage(); … … 781 781 void RenderFragmentedFlow::updateFragmentsFragmentedFlowPortionRect() 782 782 { 783 LayoutUnit logicalHeight = 0;783 LayoutUnit logicalHeight; 784 784 // FIXME: Optimize not to clear the interval all the time. This implies manually managing the tree nodes lifecycle. 785 785 m_fragmentIntervalTree.clear(); -
trunk/Source/WebCore/rendering/RenderFrameSet.cpp
r237266 r238359 140 140 LayoutUnit borderThickness = frameSetElement().border(); 141 141 142 LayoutUnit yPos = 0;142 LayoutUnit yPos; 143 143 for (size_t r = 0; r < rows; r++) { 144 LayoutUnit xPos = 0;144 LayoutUnit xPos; 145 145 for (size_t c = 0; c < cols; c++) { 146 146 downcast<RenderElement>(*child).paint(paintInfo, adjustedPaintOffset); -
trunk/Source/WebCore/rendering/RenderListItem.cpp
r232178 r238359 271 271 272 272 LayoutUnit markerOldLogicalLeft = m_marker->logicalLeft(); 273 LayoutUnit blockOffset = 0;274 LayoutUnit lineOffset = 0;273 LayoutUnit blockOffset; 274 LayoutUnit lineOffset; 275 275 for (auto* ancestor = m_marker->parentBox(); ancestor && ancestor != this; ancestor = ancestor->parentBox()) { 276 276 blockOffset += ancestor->logicalTop(); -
trunk/Source/WebCore/rendering/RenderListMarker.cpp
r237990 r238359 1555 1555 const FontCascade& font = style().fontCascade(); 1556 1556 1557 LayoutUnit logicalWidth = 0;1557 LayoutUnit logicalWidth; 1558 1558 ListStyleType type = style().listStyleType(); 1559 1559 switch (type) { … … 1670 1670 const FontMetrics& fontMetrics = style().fontMetrics(); 1671 1671 1672 LayoutUnit marginStart = 0;1673 LayoutUnit marginEnd = 0;1672 LayoutUnit marginStart; 1673 LayoutUnit marginEnd; 1674 1674 1675 1675 if (isInside()) { -
trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp
r234215 r238359 704 704 bool progressionIsInline = multiColumnFlow()->progressionIsInline(); 705 705 706 LayoutUnit result = 0;706 LayoutUnit result; 707 707 if (!progressionIsInline && progressionReversed) { 708 708 LayoutRect colRect = columnRectAt(0); -
trunk/Source/WebCore/rendering/RenderRubyRun.cpp
r232178 r238359 156 156 // Place the RenderRubyText such that its bottom is flush with the lineTop of the first line of the RenderRubyBase. 157 157 LayoutUnit lastLineRubyTextBottom = rt->logicalHeight(); 158 LayoutUnit firstLineRubyTextTop = 0;158 LayoutUnit firstLineRubyTextTop; 159 159 RootInlineBox* rootBox = rt->lastRootBox(); 160 160 if (rootBox) { … … 171 171 setWidth(width() + distanceBetweenBase - font.letterSpacing()); 172 172 if (RenderRubyBase* rb = rubyBase()) { 173 LayoutUnit firstLineTop = 0;173 LayoutUnit firstLineTop; 174 174 LayoutUnit lastLineBottom = logicalHeight(); 175 175 RootInlineBox* rootBox = rb->firstRootBox(); … … 185 185 } 186 186 } else if (style().isFlippedLinesWritingMode() == (style().rubyPosition() == RubyPosition::After)) { 187 LayoutUnit firstLineTop = 0;187 LayoutUnit firstLineTop; 188 188 if (RenderRubyBase* rb = rubyBase()) { 189 189 RootInlineBox* rootBox = rb->firstRootBox(); -
trunk/Source/WebCore/rendering/RenderTable.cpp
r234619 r238359 301 301 302 302 // HTML tables' width styles already include borders and paddings, but CSS tables' width styles do not. 303 LayoutUnit borders = 0;303 LayoutUnit borders; 304 304 bool isCSSTable = !is<HTMLTableElement>(element()); 305 305 if (isCSSTable && styleLogicalWidth.isSpecified() && styleLogicalWidth.isPositive() && style().boxSizing() == BoxSizing::ContentBox) … … 401 401 recalcBordersInRowDirection(); 402 402 bool sectionMoved = false; 403 LayoutUnit movedSectionLogicalTop = 0;403 LayoutUnit movedSectionLogicalTop; 404 404 405 405 LayoutRepainter repainter(*this, checkForRepaintDuringLayout()); … … 423 423 m_tableLayout->layout(); 424 424 425 LayoutUnit totalSectionLogicalHeight = 0;426 LayoutUnit oldTableLogicalTop = 0;425 LayoutUnit totalSectionLogicalHeight; 426 LayoutUnit oldTableLogicalTop; 427 427 for (unsigned i = 0; i < m_captions.size(); i++) { 428 428 if (m_captions[i]->style().captionSide() == CaptionSide::Bottom) … … 466 466 updateLogicalHeight(); 467 467 468 LayoutUnit computedLogicalHeight = 0;468 LayoutUnit computedLogicalHeight; 469 469 470 470 Length logicalHeightLength = style().logicalHeight(); … … 935 935 unsigned numberOfEffectiveColumns = numEffCols(); 936 936 ASSERT_WITH_SECURITY_IMPLICATION(m_columnPos.size() >= numberOfEffectiveColumns + 1); 937 LayoutUnit width = 0;937 LayoutUnit width; 938 938 LayoutUnit spacing = m_hSpacing; 939 939 while (currentColumn) { … … 965 965 return m_columnOffsetHeight; 966 966 } 967 LayoutUnit height = 0;967 LayoutUnit height; 968 968 for (RenderTableSection* section = topSection(); section; section = sectionBelow(section)) 969 969 height += section->offsetHeight(); … … 1209 1209 if (!collapseBorders()) 1210 1210 return 0; 1211 LayoutUnit borderWidth = 0;1211 LayoutUnit borderWidth; 1212 1212 if (RenderTableSection* topSection = this->topSection()) { 1213 1213 borderWidth = topSection->outerBorderBefore(); … … 1229 1229 if (!collapseBorders()) 1230 1230 return 0; 1231 LayoutUnit borderWidth = 0;1231 LayoutUnit borderWidth; 1232 1232 1233 1233 if (RenderTableSection* section = bottomSection()) { … … 1252 1252 return 0; 1253 1253 1254 LayoutUnit borderWidth = 0;1254 LayoutUnit borderWidth; 1255 1255 1256 1256 const BorderValue& tb = style().borderStart(); … … 1279 1279 return 0; 1280 1280 1281 LayoutUnit borderWidth = 0;1281 LayoutUnit borderWidth; 1282 1282 1283 1283 const BorderValue& tb = style().borderEnd(); -
trunk/Source/WebCore/rendering/RenderTableCell.cpp
r238001 r238359 155 155 156 156 unsigned colSpanCount = colSpan(); 157 LayoutUnit colWidthSum = 0;157 LayoutUnit colWidthSum; 158 158 for (unsigned i = 1; i <= colSpanCount; i++) { 159 159 Length colWidth = tableCol->style().logicalWidth(); … … 209 209 LayoutUnit logicalHeightWithoutIntrinsicPadding = logicalHeight() - oldIntrinsicPaddingBefore - oldIntrinsicPaddingAfter; 210 210 211 LayoutUnit intrinsicPaddingBefore = 0;211 LayoutUnit intrinsicPaddingBefore; 212 212 switch (style().verticalAlign()) { 213 213 case VerticalAlign::Sub: -
trunk/Source/WebCore/rendering/RenderTableSection.cpp
r234619 r238359 232 232 233 233 // 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; 235 235 if (this == table()->topSection()) 236 236 spacing = table()->vBorderSpacing(); … … 245 245 for (unsigned r = 0; r < totalRows; r++) { 246 246 m_grid[r].baseline = 0; 247 LayoutUnit baselineDescent = 0;247 LayoutUnit baselineDescent; 248 248 249 249 // Our base size is the biggest logical height from our cells' styles (excluding row spanning cells). … … 305 305 // become the baseline descent applied to the rest of the row. Also we don't account for the baseline descent of 306 306 // non-spanning cells when computing a spanning cell's extent. 307 LayoutUnit cellStartRowBaselineDescent = 0;307 LayoutUnit cellStartRowBaselineDescent; 308 308 if (cell->rowSpan() == 1) { 309 309 baselineDescent = std::max(baselineDescent, cellLogicalHeight - baselinePosition); … … 384 384 unsigned totalRows = m_grid.size(); 385 385 LayoutUnit totalHeight = m_rowPos[totalRows] + extraLogicalHeight; 386 LayoutUnit totalLogicalHeightAdded = 0;386 LayoutUnit totalLogicalHeightAdded; 387 387 totalPercent = std::min(totalPercent, 100); 388 388 LayoutUnit rowHeight = m_rowPos[1] - m_rowPos[0]; … … 409 409 return; 410 410 411 LayoutUnit totalLogicalHeightAdded = 0;411 LayoutUnit totalLogicalHeightAdded; 412 412 for (unsigned r = 0; r < m_grid.size(); ++r) { 413 413 if (autoRowsCount > 0 && m_grid[r].logicalHeight.isAuto()) { … … 431 431 // FIXME: m_rowPos[totalRows] - m_rowPos[0] is the total rows' size. 432 432 LayoutUnit totalRowSize = m_rowPos[totalRows]; 433 LayoutUnit totalLogicalHeightAdded = 0;433 LayoutUnit totalLogicalHeightAdded; 434 434 LayoutUnit previousRowPosition = m_rowPos[0]; 435 435 for (unsigned r = 0; r < totalRows; r++) { … … 569 569 } 570 570 571 LayoutUnit rowHeightIncreaseForPagination = 0;571 LayoutUnit rowHeightIncreaseForPagination; 572 572 573 573 for (unsigned c = 0; c < nEffCols; c++) { … … 684 684 return 0; 685 685 686 LayoutUnit borderWidth = 0;686 LayoutUnit borderWidth; 687 687 688 688 const BorderValue& sb = style().borderBefore(); … … 734 734 return 0; 735 735 736 LayoutUnit borderWidth = 0;736 LayoutUnit borderWidth; 737 737 738 738 const BorderValue& sb = style().borderAfter(); … … 784 784 return 0; 785 785 786 LayoutUnit borderWidth = 0;786 LayoutUnit borderWidth; 787 787 788 788 const BorderValue& sb = style().borderStart(); … … 827 827 return 0; 828 828 829 LayoutUnit borderWidth = 0;829 LayoutUnit borderWidth; 830 830 831 831 const BorderValue& sb = style().borderEnd(); -
trunk/Source/WebCore/rendering/RootInlineBox.cpp
r237266 r238359 244 244 return 0; 245 245 246 LayoutUnit maxPositionTop = 0;247 LayoutUnit maxPositionBottom = 0;246 LayoutUnit maxPositionTop; 247 LayoutUnit maxPositionBottom; 248 248 int maxAscent = 0; 249 249 int maxDescent = 0; … … 301 301 LayoutUnit RootInlineBox::beforeAnnotationsAdjustment() const 302 302 { 303 LayoutUnit result = 0;303 LayoutUnit result; 304 304 305 305 if (!renderer().style().isFlippedLinesWritingMode()) { … … 374 374 // If we're paginated, see if we're on a page after the first one. If so, the grid resets on subsequent pages. 375 375 // FIXME: If the grid is an ancestor of the pagination establisher, then this is incorrect. 376 LayoutUnit pageLogicalTop = 0;376 LayoutUnit pageLogicalTop; 377 377 if (layoutState->isPaginated() && layoutState->pageLogicalHeight()) { 378 378 pageLogicalTop = blockFlow().pageLogicalTopForOffset(lineTopWithLeading() + delta); … … 1014 1014 } 1015 1015 1016 LayoutUnit verticalPosition = 0;1016 LayoutUnit verticalPosition; 1017 1017 VerticalAlign verticalAlign = renderer->style().verticalAlign(); 1018 1018 if (verticalAlign == VerticalAlign::Top || verticalAlign == VerticalAlign::Bottom) -
trunk/Source/WebCore/rendering/line/BreakingContext.h
r232229 r238359 410 410 { 411 411 unsigned lineDepth = 1; 412 LayoutUnit extraWidth = 0;412 LayoutUnit extraWidth; 413 413 RenderElement* parent = child->parent(); 414 414 while (is<RenderInline>(*parent) && lineDepth++ < cMaxLineDepth) { -
trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp
r234808 r238359 191 191 LayoutUnit horizontalOffset = borderStart() + paddingStart(); 192 192 193 LayoutUnit preferredHorizontalExtent = 0;193 LayoutUnit preferredHorizontalExtent; 194 194 for (auto* child = firstChildBox(); child; child = child->nextSiblingBox()) { 195 195 LayoutUnit childHorizontalExtent = child->maxPreferredLogicalWidth() - child->horizontalBorderAndPaddingExtent(); -
trunk/Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp
r234619 r238359 225 225 setLogicalWidth(std::max(numerator().logicalWidth(), denominator().logicalWidth())); 226 226 227 LayoutUnit verticalOffset = 0; // This is the top of the renderer.227 LayoutUnit verticalOffset; // This is the top of the renderer. 228 228 LayoutPoint numeratorLocation(horizontalOffset(numerator(), element().numeratorAlignment()), verticalOffset); 229 229 numerator().setLocation(numeratorLocation); -
trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp
r234808 r238359 191 191 ASSERT(preferredLogicalWidthsDirty()); 192 192 193 LayoutUnit preferredWidth = 0;193 LayoutUnit preferredWidth; 194 194 195 195 if (!useMathOperator()) { -
trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp
r232178 r238359 162 162 } 163 163 164 LayoutUnit preferredWidth = 0;164 LayoutUnit preferredWidth; 165 165 if (rootType() == RootType::SquareRoot) { 166 166 preferredWidth += m_radicalOperator.maxPreferredWidth(); … … 274 274 // We draw the radical operator. 275 275 LayoutPoint radicalOperatorTopLeft = paintOffset + location(); 276 LayoutUnit horizontalOffset = 0;276 LayoutUnit horizontalOffset; 277 277 if (rootType() == RootType::RootWithIndex) { 278 278 auto horizontal = horizontalParameters(); -
trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp
r227722 r238359 130 130 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = 0; 131 131 132 LayoutUnit preferredWidth = 0;132 LayoutUnit preferredWidth; 133 133 for (auto* child = firstChildBox(); child; child = child->nextSiblingBox()) { 134 134 if (child->isOutOfFlowPositioned()) -
trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp
r226287 r238359 372 372 LayoutUnit baseDescent = reference.base->logicalHeight() - baseAscent; 373 373 LayoutUnit baseItalicCorrection = std::min(reference.base->logicalWidth(), italicCorrection(reference)); 374 LayoutUnit horizontalOffset = 0;374 LayoutUnit horizontalOffset; 375 375 376 376 LayoutUnit ascent = std::max(baseAscent, metrics.ascent + metrics.supShift); … … 405 405 case ScriptType::Multiscripts: { 406 406 // Calculate the logical width. 407 LayoutUnit logicalWidth = 0;407 LayoutUnit logicalWidth; 408 408 auto subScript = reference.firstPreScript; 409 409 while (subScript) { -
trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp
r226287 r238359 95 95 Vector<RenderMathMLOperator*, 3> stretchyOperators; 96 96 bool isAllStretchyOperators = true; 97 LayoutUnit stretchWidth = 0;97 LayoutUnit stretchWidth; 98 98 99 99 for (auto* child = firstChildBox(); child; child = child->nextSiblingBox()) { … … 318 318 319 319 VerticalParameters parameters = verticalParameters(); 320 LayoutUnit verticalOffset = 0;320 LayoutUnit verticalOffset; 321 321 if (scriptType() == ScriptType::Over || scriptType() == ScriptType::UnderOver) { 322 322 verticalOffset += parameters.overExtraAscender; -
trunk/Source/WebCore/rendering/style/RenderStyle.cpp
r238155 r238359 1768 1768 LayoutBoxExtent RenderStyle::getShadowInsetExtent(const ShadowData* shadow) const 1769 1769 { 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; 1774 1774 1775 1775 for ( ; shadow; shadow = shadow->next()) { -
trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp
r237255 r238359 403 403 FloatRect oldBoundaries = objectBoundingBox(); 404 404 ASSERT(childrenInline()); 405 LayoutUnit repaintLogicalTop = 0;406 LayoutUnit repaintLogicalBottom = 0;405 LayoutUnit repaintLogicalTop; 406 LayoutUnit repaintLogicalBottom; 407 407 rebuildFloatingObjectSetFromIntrudingFloats(); 408 408 layoutInlineChildren(true, repaintLogicalTop, repaintLogicalBottom);
Note: See TracChangeset
for help on using the changeset viewer.