Changeset 151575 in webkit


Ignore:
Timestamp:
Jun 13, 2013, 5:39:36 PM (12 years ago)
Author:
zoltan@webkit.org
Message:

Use borderAndPadding[Before,After]() instead of border[Before,After]() + padding[Before,After]()
https://bugs.webkit.org/show_bug.cgi?id=117611

Reviewed by Dirk Schulze.

I added a new function called borderAndPaddingAfter(), since we already had borderAndPaddingBefore(). I changed
every separate additions to the old/new function. This change makes the code shorter and more straightforward.

Behavior hasn't changed, no new tests were needed.

  • rendering/InlineFlowBox.cpp:

(WebCore::InlineFlowBox::placeBoxesInBlockDirection):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::marginBeforeEstimateForChild):
(WebCore::RenderBlock::layoutBlockChildren):
(WebCore::RenderBlock::paintColumnRules):
(WebCore::RenderBlock::columnRectAt):
(WebCore::RenderBlock::relayoutForPagination):
(WebCore::RenderBlock::adjustRectForColumns):
(WebCore::RenderBlock::flipForWritingModeIncludingColumns):
(WebCore::RenderBlock::adjustStartEdgeForWritingModeIncludingColumns):
(WebCore::RenderBlock::adjustForColumns):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread):
(WebCore::RenderBlock::layoutInlineChildren):

  • rendering/RenderBoxModelObject.h:

(WebCore::RenderBoxModelObject::borderAndPaddingStart):
(WebCore::RenderBoxModelObject::borderAndPaddingBefore):
(WebCore::RenderBoxModelObject::borderAndPaddingAfter):
(WebCore::RenderBoxModelObject::borderAndPaddingLogicalHeight):

  • rendering/RenderMultiColumnBlock.cpp:

(WebCore::RenderMultiColumnBlock::layoutSpecialExcludedChild):

  • rendering/RenderMultiColumnSet.cpp:

(WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset):
(WebCore::RenderMultiColumnSet::prepareForLayout):
(WebCore::RenderMultiColumnSet::columnRectAt):

  • rendering/RenderTableCell.cpp:

(WebCore::RenderTableCell::computeIntrinsicPadding):
(WebCore::RenderTableCell::cellBaselinePosition):

  • rendering/RenderTableSection.cpp:

(WebCore::RenderTableSection::calcRowLogicalHeight):
(WebCore::RenderTableSection::layoutRows):
(WebCore::RenderTableSection::firstLineBoxBaseline):

  • rendering/RootInlineBox.cpp:

(WebCore::RootInlineBox::lineSnapAdjustment):
(WebCore::RootInlineBox::selectionTop):
(WebCore::RootInlineBox::ascentAndDescentForBox):

Location:
trunk/Source/WebCore
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r151572 r151575  
     12013-06-13  Zoltan Horvath  <zoltan@webkit.org>
     2
     3        Use borderAndPadding[Before,After]() instead of border[Before,After]() + padding[Before,After]()
     4        https://bugs.webkit.org/show_bug.cgi?id=117611
     5
     6        Reviewed by Dirk Schulze.
     7
     8        I added a new function called borderAndPaddingAfter(), since we already had borderAndPaddingBefore(). I changed
     9        every separate additions to the old/new function. This change makes the code shorter and more straightforward.
     10
     11        Behavior hasn't changed, no new tests were needed.
     12
     13        * rendering/InlineFlowBox.cpp:
     14        (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
     15        * rendering/RenderBlock.cpp:
     16        (WebCore::RenderBlock::layoutBlock):
     17        (WebCore::RenderBlock::marginBeforeEstimateForChild):
     18        (WebCore::RenderBlock::layoutBlockChildren):
     19        (WebCore::RenderBlock::paintColumnRules):
     20        (WebCore::RenderBlock::columnRectAt):
     21        (WebCore::RenderBlock::relayoutForPagination):
     22        (WebCore::RenderBlock::adjustRectForColumns):
     23        (WebCore::RenderBlock::flipForWritingModeIncludingColumns):
     24        (WebCore::RenderBlock::adjustStartEdgeForWritingModeIncludingColumns):
     25        (WebCore::RenderBlock::adjustForColumns):
     26        * rendering/RenderBlockLineLayout.cpp:
     27        (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread):
     28        (WebCore::RenderBlock::layoutInlineChildren):
     29        * rendering/RenderBoxModelObject.h:
     30        (WebCore::RenderBoxModelObject::borderAndPaddingStart):
     31        (WebCore::RenderBoxModelObject::borderAndPaddingBefore):
     32        (WebCore::RenderBoxModelObject::borderAndPaddingAfter):
     33        (WebCore::RenderBoxModelObject::borderAndPaddingLogicalHeight):
     34        * rendering/RenderMultiColumnBlock.cpp:
     35        (WebCore::RenderMultiColumnBlock::layoutSpecialExcludedChild):
     36        * rendering/RenderMultiColumnSet.cpp:
     37        (WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset):
     38        (WebCore::RenderMultiColumnSet::prepareForLayout):
     39        (WebCore::RenderMultiColumnSet::columnRectAt):
     40        * rendering/RenderTableCell.cpp:
     41        (WebCore::RenderTableCell::computeIntrinsicPadding):
     42        (WebCore::RenderTableCell::cellBaselinePosition):
     43        * rendering/RenderTableSection.cpp:
     44        (WebCore::RenderTableSection::calcRowLogicalHeight):
     45        (WebCore::RenderTableSection::layoutRows):
     46        (WebCore::RenderTableSection::firstLineBoxBaseline):
     47        * rendering/RootInlineBox.cpp:
     48        (WebCore::RootInlineBox::lineSnapAdjustment):
     49        (WebCore::RootInlineBox::selectionTop):
     50        (WebCore::RootInlineBox::ascentAndDescentForBox):
     51
    1522013-06-13  Andreas Kling  <akling@apple.com>
    253
  • trunk/Source/WebCore/rendering/InlineFlowBox.cpp

    r150355 r151575  
    628628        adjustmentForChildrenWithSameLineHeightAndBaseline = logicalTop();
    629629        if (parent())
    630             adjustmentForChildrenWithSameLineHeightAndBaseline += (boxModelObject()->borderBefore() + boxModelObject()->paddingBefore());
     630            adjustmentForChildrenWithSameLineHeightAndBaseline += (boxModelObject()->borderAndPaddingBefore());
    631631    }
    632632
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r151545 r151575  
    16531653
    16541654    // Expand our intrinsic height to encompass floats.
    1655     LayoutUnit toAdd = borderAfter() + paddingAfter() + scrollbarLogicalHeight();
     1655    LayoutUnit toAdd = borderAndPaddingAfter() + scrollbarLogicalHeight();
    16561656    if (lowestFloatLogicalBottom() > (logicalHeight() - toAdd) && expandsToEncloseOverhangingFloats())
    16571657        setLogicalHeight(lowestFloatLogicalBottom() + toAdd);
     
    23132313        return;
    23142314
    2315     MarginInfo childMarginInfo(childBlock, childBlock->borderBefore() + childBlock->paddingBefore(), childBlock->borderAfter() + childBlock->paddingAfter());
     2315    MarginInfo childMarginInfo(childBlock, childBlock->borderAndPaddingBefore(), childBlock->borderAndPaddingAfter());
    23162316    if (!childMarginInfo.canCollapseMarginBeforeWithChildren())
    23172317        return;
     
    25382538    }
    25392539
    2540     LayoutUnit beforeEdge = borderBefore() + paddingBefore();
    2541     LayoutUnit afterEdge = borderAfter() + paddingAfter() + scrollbarLogicalHeight();
     2540    LayoutUnit beforeEdge = borderAndPaddingBefore();
     2541    LayoutUnit afterEdge = borderAndPaddingAfter() + scrollbarLogicalHeight();
    25422542
    25432543    setLogicalHeight(beforeEdge);
     
    30363036        LayoutUnit ruleLeft = isHorizontalWritingMode()
    30373037            ? borderLeft() + paddingLeft()
    3038             : colGap / 2 - colGap - ruleThickness / 2 + (!colInfo->progressionIsReversed() ? borderBefore() + paddingBefore() : borderAfter() + paddingAfter());
     3038            : colGap / 2 - colGap - ruleThickness / 2 + (!colInfo->progressionIsReversed() ? borderAndPaddingBefore() : borderAndPaddingAfter());
    30393039        LayoutUnit ruleWidth = isHorizontalWritingMode() ? contentWidth() : ruleThickness;
    30403040        LayoutUnit ruleTop = isHorizontalWritingMode()
    3041             ? colGap / 2 - colGap - ruleThickness / 2 + (!colInfo->progressionIsReversed() ? borderBefore() + paddingBefore() : borderAfter() + paddingAfter())
     3041            ? colGap / 2 - colGap - ruleThickness / 2 + (!colInfo->progressionIsReversed() ? borderAndPaddingBefore() : borderAndPaddingAfter())
    30423042            : borderStart() + paddingStart();
    30433043        LayoutUnit ruleHeight = isHorizontalWritingMode() ? ruleThickness : contentHeight();
     
    55835583    LayoutUnit colLogicalWidth = colInfo->desiredColumnWidth();
    55845584    LayoutUnit colLogicalHeight = colInfo->columnHeight();
    5585     LayoutUnit colLogicalTop = borderBefore() + paddingBefore();
     5585    LayoutUnit colLogicalTop = borderAndPaddingBefore();
    55865586    LayoutUnit colLogicalLeft = logicalLeftOffsetForContent();
    55875587    LayoutUnit colGap = columnGap();
     
    56135613    else
    56145614        addOverflowFromBlockChildren();
    5615     LayoutUnit layoutOverflowLogicalBottom = (isHorizontalWritingMode() ? layoutOverflowRect().maxY() : layoutOverflowRect().maxX()) - borderBefore() - paddingBefore();
     5615    LayoutUnit layoutOverflowLogicalBottom = (isHorizontalWritingMode() ? layoutOverflowRect().maxY() : layoutOverflowRect().maxX()) - borderAndPaddingBefore();
    56165616
    56175617    // FIXME: We don't balance properly at all in the presence of forced page breaks.  We need to understand what
     
    56275627            if (!pageLogicalHeight) {
    56285628                LayoutUnit distanceBetweenBreaks = max<LayoutUnit>(colInfo->maximumDistanceBetweenForcedBreaks(),
    5629                                                                    view()->layoutState()->pageLogicalOffset(this, borderBefore() + paddingBefore() + layoutOverflowLogicalBottom) - colInfo->forcedBreakOffset());
     5629                    view()->layoutState()->pageLogicalOffset(this, borderAndPaddingBefore() + layoutOverflowLogicalBottom) - colInfo->forcedBreakOffset());
    56305630                columnHeight = max(colInfo->minimumColumnHeight(), distanceBetweenBreaks);
    56315631            }
     
    56475647
    56485648    if (columnCount(colInfo)) {
    5649         setLogicalHeight(borderBefore() + paddingBefore() + colInfo->columnHeight() + borderAfter() + paddingAfter() + scrollbarLogicalHeight());
     5649        setLogicalHeight(borderAndPaddingBefore() + colInfo->columnHeight() + borderAndPaddingAfter() + scrollbarLogicalHeight());
    56505650        m_overflow.clear();
    56515651    } else
     
    57595759
    57605760    bool isHorizontal = isHorizontalWritingMode();
    5761     LayoutUnit beforeBorderPadding = borderBefore() + paddingBefore();
     5761    LayoutUnit beforeBorderPadding = borderAndPaddingBefore();
    57625762    LayoutUnit colHeight = colInfo->columnHeight();
    57635763    if (!colHeight)
     
    58085808    ColumnInfo* colInfo = columnInfo();
    58095809    LayoutUnit columnLogicalHeight = colInfo->columnHeight();
    5810     LayoutUnit expandedLogicalHeight = borderBefore() + paddingBefore() + columnCount(colInfo) * columnLogicalHeight + borderAfter() + paddingAfter() + scrollbarLogicalHeight();
     5810    LayoutUnit expandedLogicalHeight = borderAndPaddingBefore() + columnCount(colInfo) * columnLogicalHeight + borderAndPaddingAfter() + scrollbarLogicalHeight();
    58115811    if (isHorizontalWritingMode())
    58125812        return LayoutPoint(point.x(), expandedLogicalHeight - point.y());
     
    58225822    ColumnInfo* colInfo = columnInfo();
    58235823    LayoutUnit columnLogicalHeight = colInfo->columnHeight();
    5824     LayoutUnit expandedLogicalHeight = borderBefore() + paddingBefore() + columnCount(colInfo) * columnLogicalHeight + borderAfter() + paddingAfter() + scrollbarLogicalHeight();
     5824    LayoutUnit expandedLogicalHeight = borderAndPaddingBefore() + columnCount(colInfo) * columnLogicalHeight + borderAndPaddingAfter() + scrollbarLogicalHeight();
    58255825   
    58265826    if (isHorizontalWritingMode())
     
    58445844    for (unsigned i = 0; i < colCount; ++i) {
    58455845        // Compute the edges for a given column in the block progression direction.
    5846         LayoutRect sliceRect = LayoutRect(logicalLeft, borderBefore() + paddingBefore() + i * colLogicalHeight, colLogicalWidth, colLogicalHeight);
     5846        LayoutRect sliceRect = LayoutRect(logicalLeft, borderAndPaddingBefore() + i * colLogicalHeight, colLogicalWidth, colLogicalHeight);
    58475847        if (!isHorizontalWritingMode())
    58485848            sliceRect = sliceRect.transposedRect();
     
    58565856                    offset.expand(columnRectAt(colInfo, i).x() - logicalLeft, -logicalOffset);
    58575857                else
    5858                     offset.expand(0, columnRectAt(colInfo, i).y() - logicalOffset - borderBefore() - paddingBefore());
     5858                    offset.expand(0, columnRectAt(colInfo, i).y() - logicalOffset - borderAndPaddingBefore());
    58595859                return;
    58605860            }
     
    58645864                    offset.expand(-logicalOffset, columnRectAt(colInfo, i).y() - logicalLeft);
    58655865                else
    5866                     offset.expand(columnRectAt(colInfo, i).x() - logicalOffset - borderBefore() - paddingBefore(), 0);
     5866                    offset.expand(columnRectAt(colInfo, i).x() - logicalOffset - borderAndPaddingBefore(), 0);
    58675867                return;
    58685868            }
  • trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp

    r151570 r151575  
    16881688    LayoutUnit logicalLineBottomInFlowThread = logicalLineTopInFlowThread + lineHeight;
    16891689    LayoutUnit logicalRegionTopInFlowThread = currentRegion->logicalTopForFlowThreadContent();
    1690     LayoutUnit logicalRegionBottomInFlowThread = logicalRegionTopInFlowThread + currentRegion->logicalHeight() - currentRegion->borderAndPaddingBefore() - currentRegion->borderAfter() - currentRegion->paddingAfter();
     1690    LayoutUnit logicalRegionBottomInFlowThread = logicalRegionTopInFlowThread + currentRegion->logicalHeight() - currentRegion->borderAndPaddingBefore() - currentRegion->borderAndPaddingAfter();
    16911691
    16921692    // We only want to deal regions with shapes, so we look up for the next region whether it has a shape
     
    17181718        logicalLineBottomInFlowThread = logicalLineTopInFlowThread + lineHeight;
    17191719        logicalRegionTopInFlowThread = currentRegion->logicalTopForFlowThreadContent();
    1720         logicalRegionBottomInFlowThread = logicalRegionTopInFlowThread + currentRegion->logicalHeight() - currentRegion->borderAndPaddingBefore() - currentRegion->borderAfter() - currentRegion->paddingAfter();
     1720        logicalRegionBottomInFlowThread = logicalRegionTopInFlowThread + currentRegion->logicalHeight() - currentRegion->borderAndPaddingBefore() - currentRegion->borderAndPaddingAfter();
    17211721    }
    17221722
     
    17441744    if (currentRegion->isLastRegion() && !lineOverflowsFromShapeInside && (lineTop + lineHeight) > shapeInsideInfo->shapeLogicalBottom()) {
    17451745        lineOverflowsFromShapeInside = true;
    1746         LayoutUnit newLogicalHeight = this->logicalHeight() + (shapeInsideInfo->shapeContainingBlockHeight() - (lineTop + currentRegion->borderAfter() + currentRegion->paddingAfter()));
     1746        LayoutUnit newLogicalHeight = this->logicalHeight() + (shapeInsideInfo->shapeContainingBlockHeight() - (lineTop + currentRegion->borderAndPaddingAfter()));
    17471747        setLogicalHeight(newLogicalHeight);
    17481748    }
     
    20922092void RenderBlock::layoutInlineChildren(bool relayoutChildren, LayoutUnit& repaintLogicalTop, LayoutUnit& repaintLogicalBottom)
    20932093{
    2094     setLogicalHeight(borderBefore() + paddingBefore());
     2094    setLogicalHeight(borderAndPaddingBefore());
    20952095   
    20962096    // Lay out our hypothetical grid line as though it occurs at the top of the block.
     
    21832183
    21842184    // Now add in the bottom border/padding.
    2185     setLogicalHeight(logicalHeight() + lastLineAnnotationsAdjustment + borderAfter() + paddingAfter() + scrollbarLogicalHeight());
     2185    setLogicalHeight(logicalHeight() + lastLineAnnotationsAdjustment + borderAndPaddingAfter() + scrollbarLogicalHeight());
    21862186
    21872187    if (!firstLineBox() && hasLineIfEmpty())
  • trunk/Source/WebCore/rendering/RenderBoxModelObject.h

    r150312 r151575  
    123123    virtual int borderEnd() const { return style()->borderEndWidth(); }
    124124
     125    LayoutUnit borderAndPaddingStart() const { return borderStart() + paddingStart(); }
     126    LayoutUnit borderAndPaddingBefore() const { return borderBefore() + paddingBefore(); }
     127    LayoutUnit borderAndPaddingAfter() const { return borderAfter() + paddingAfter(); }
     128
    125129    LayoutUnit borderAndPaddingHeight() const { return borderTop() + borderBottom() + paddingTop() + paddingBottom(); }
    126130    LayoutUnit borderAndPaddingWidth() const { return borderLeft() + borderRight() + paddingLeft() + paddingRight(); }
    127     LayoutUnit borderAndPaddingLogicalHeight() const { return borderBefore() + borderAfter() + paddingBefore() + paddingAfter(); }
     131    LayoutUnit borderAndPaddingLogicalHeight() const { return borderAndPaddingBefore() + borderAndPaddingAfter(); }
    128132    LayoutUnit borderAndPaddingLogicalWidth() const { return borderStart() + borderEnd() + paddingStart() + paddingEnd(); }
    129133    LayoutUnit borderAndPaddingLogicalLeft() const { return style()->isHorizontalWritingMode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop(); }
    130134
    131     LayoutUnit borderAndPaddingStart() const { return borderStart() + paddingStart(); }
    132     LayoutUnit borderAndPaddingBefore() const { return borderBefore() + paddingBefore(); }
    133135    LayoutUnit borderLogicalLeft() const { return style()->isHorizontalWritingMode() ? borderLeft() : borderTop(); }
    134136    LayoutUnit borderLogicalRight() const { return style()->isHorizontalWritingMode() ? borderRight() : borderBottom(); }
  • trunk/Source/WebCore/rendering/RenderMultiColumnBlock.cpp

    r151545 r151575  
    173173        m_flowThread->setChildNeedsLayout(true, MarkOnlyThis);
    174174   
    175     setLogicalTopForChild(m_flowThread, borderBefore() + paddingBefore());
     175    setLogicalTopForChild(m_flowThread, borderAndPaddingBefore());
    176176    m_flowThread->layoutIfNeeded();
    177177    determineLogicalLeftPositionForChild(m_flowThread);
  • trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp

    r151545 r151575  
    6161{
    6262    RenderMultiColumnBlock* multicolBlock = toRenderMultiColumnBlock(parent());
    63     LayoutUnit contentLogicalTop = logicalTop() - multicolBlock->borderBefore() - multicolBlock->paddingBefore();
     63    LayoutUnit contentLogicalTop = logicalTop() - multicolBlock->borderAndPaddingBefore();
    6464
    6565    height -= contentLogicalTop;
     
    164164    // Set box logical top.
    165165    ASSERT(!previousSiblingBox() || !previousSiblingBox()->isRenderMultiColumnSet()); // FIXME: multiple set not implemented; need to examine previous set to calculate the correct logical top.
    166     setLogicalTop(multicolBlock->borderBefore() + multicolBlock->paddingBefore());
     166    setLogicalTop(multicolBlock->borderAndPaddingBefore());
    167167
    168168    // Set box width.
     
    222222    LayoutUnit colLogicalWidth = computedColumnWidth();
    223223    LayoutUnit colLogicalHeight = computedColumnHeight();
    224     LayoutUnit colLogicalTop = borderBefore() + paddingBefore();
     224    LayoutUnit colLogicalTop = borderAndPaddingBefore();
    225225    LayoutUnit colLogicalLeft = borderAndPaddingLogicalLeft();
    226226    LayoutUnit colGap = columnGap();
  • trunk/Source/WebCore/rendering/RenderTableCell.cpp

    r149553 r151575  
    196196    case BASELINE: {
    197197        LayoutUnit baseline = cellBaselinePosition();
    198         if (baseline > borderBefore() + paddingBefore())
     198        if (baseline > borderAndPaddingBefore())
    199199            intrinsicPaddingBefore = section()->rowBaseline(rowIndex()) - (baseline - oldIntrinsicPaddingBefore);
    200200        break;
     
    392392    if (firstLineBaseline != -1)
    393393        return firstLineBaseline;
    394     return paddingBefore() + borderBefore() + contentLogicalHeight();
     394    return borderAndPaddingBefore() + contentLogicalHeight();
    395395}
    396396
  • trunk/Source/WebCore/rendering/RenderTableSection.cpp

    r151444 r151575  
    337337                if (cell->isBaselineAligned()) {
    338338                    LayoutUnit baselinePosition = cell->cellBaselinePosition();
    339                     if (baselinePosition > cell->borderBefore() + cell->paddingBefore()) {
     339                    if (baselinePosition > cell->borderAndPaddingBefore()) {
    340340                        m_grid[cellStartRow].baseline = max(m_grid[cellStartRow].baseline, baselinePosition);
    341341                        // The descent of a cell that spans multiple rows does not affect the height of the first row it spans, so don't let it
     
    604604                if (cell->isBaselineAligned()) {
    605605                    LayoutUnit baseline = cell->cellBaselinePosition();
    606                     if (baseline > cell->borderBefore() + cell->paddingBefore())
     606                    if (baseline > cell->borderAndPaddingBefore())
    607607                        m_grid[r].baseline = max(m_grid[r].baseline, baseline);
    608608                }
     
    918918        // Only cells with content have a baseline
    919919        if (cell && cell->contentLogicalHeight())
    920             firstLineBaseline = max<int>(firstLineBaseline, cell->logicalTop() + cell->paddingBefore() + cell->borderBefore() + cell->contentLogicalHeight());
     920            firstLineBaseline = max<int>(firstLineBaseline, cell->logicalTop() + cell->borderAndPaddingBefore() + cell->contentLogicalHeight());
    921921    }
    922922
  • trunk/Source/WebCore/rendering/RootInlineBox.cpp

    r150365 r151575  
    431431        pageLogicalTop = block()->pageLogicalTopForOffset(lineTopWithLeading() + delta);
    432432        if (pageLogicalTop > firstLineTopWithLeading)
    433             firstTextTop = pageLogicalTop + lineGridBox->logicalTop() - lineGrid->borderBefore() - lineGrid->paddingBefore() + lineGridPaginationOrigin;
     433            firstTextTop = pageLogicalTop + lineGridBox->logicalTop() - lineGrid->borderAndPaddingBefore() + lineGridPaginationOrigin;
    434434    }
    435435
     
    582582        return selectionTop;
    583583
    584     LayoutUnit prevBottom = prevRootBox() ? prevRootBox()->selectionBottom() : block()->borderBefore() + block()->paddingBefore();
     584    LayoutUnit prevBottom = prevRootBox() ? prevRootBox()->selectionBottom() : block()->borderAndPaddingBefore();
    585585    if (prevBottom < selectionTop && block()->containsFloats()) {
    586586        // This line has actually been moved further down, probably from a large line-height, but possibly because the
     
    869869        LayoutUnit descentWithMargin = box->renderer()->style(isFirstLineStyle())->fontMetrics().descent(baselineType());
    870870        if (box->parent() && !box->renderer()->isText()) {
    871             ascentWithMargin += box->boxModelObject()->borderBefore() + box->boxModelObject()->paddingBefore() + box->boxModelObject()->marginBefore();
    872             descentWithMargin += box->boxModelObject()->borderAfter() + box->boxModelObject()->paddingAfter() + box->boxModelObject()->marginAfter();
     871            ascentWithMargin += box->boxModelObject()->borderAndPaddingBefore() + box->boxModelObject()->marginBefore();
     872            descentWithMargin += box->boxModelObject()->borderAndPaddingAfter() + box->boxModelObject()->marginAfter();
    873873        }
    874874        setAscentAndDescent(ascent, descent, ascentWithMargin, descentWithMargin, ascentDescentSet);
Note: See TracChangeset for help on using the changeset viewer.