Diff
Modified: trunk/Source/WebCore/ChangeLog (151574 => 151575)
--- trunk/Source/WebCore/ChangeLog 2013-06-13 23:54:25 UTC (rev 151574)
+++ trunk/Source/WebCore/ChangeLog 2013-06-14 00:39:36 UTC (rev 151575)
@@ -1,3 +1,54 @@
+2013-06-13 Zoltan Horvath <[email protected]>
+
+ 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):
+
2013-06-13 Andreas Kling <[email protected]>
Move Node::shouldUseInputMethod() to Element.
Modified: trunk/Source/WebCore/rendering/InlineFlowBox.cpp (151574 => 151575)
--- trunk/Source/WebCore/rendering/InlineFlowBox.cpp 2013-06-13 23:54:25 UTC (rev 151574)
+++ trunk/Source/WebCore/rendering/InlineFlowBox.cpp 2013-06-14 00:39:36 UTC (rev 151575)
@@ -627,7 +627,7 @@
if (descendantsHaveSameLineHeightAndBaseline()) {
adjustmentForChildrenWithSameLineHeightAndBaseline = logicalTop();
if (parent())
- adjustmentForChildrenWithSameLineHeightAndBaseline += (boxModelObject()->borderBefore() + boxModelObject()->paddingBefore());
+ adjustmentForChildrenWithSameLineHeightAndBaseline += (boxModelObject()->borderAndPaddingBefore());
}
for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) {
Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (151574 => 151575)
--- trunk/Source/WebCore/rendering/RenderBlock.cpp 2013-06-13 23:54:25 UTC (rev 151574)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp 2013-06-14 00:39:36 UTC (rev 151575)
@@ -1652,7 +1652,7 @@
layoutBlockChildren(relayoutChildren, maxFloatLogicalBottom);
// Expand our intrinsic height to encompass floats.
- LayoutUnit toAdd = borderAfter() + paddingAfter() + scrollbarLogicalHeight();
+ LayoutUnit toAdd = borderAndPaddingAfter() + scrollbarLogicalHeight();
if (lowestFloatLogicalBottom() > (logicalHeight() - toAdd) && expandsToEncloseOverhangingFloats())
setLogicalHeight(lowestFloatLogicalBottom() + toAdd);
@@ -2312,7 +2312,7 @@
if (childBlock->childrenInline() || childBlock->isWritingModeRoot())
return;
- MarginInfo childMarginInfo(childBlock, childBlock->borderBefore() + childBlock->paddingBefore(), childBlock->borderAfter() + childBlock->paddingAfter());
+ MarginInfo childMarginInfo(childBlock, childBlock->borderAndPaddingBefore(), childBlock->borderAndPaddingAfter());
if (!childMarginInfo.canCollapseMarginBeforeWithChildren())
return;
@@ -2537,8 +2537,8 @@
}
}
- LayoutUnit beforeEdge = borderBefore() + paddingBefore();
- LayoutUnit afterEdge = borderAfter() + paddingAfter() + scrollbarLogicalHeight();
+ LayoutUnit beforeEdge = borderAndPaddingBefore();
+ LayoutUnit afterEdge = borderAndPaddingAfter() + scrollbarLogicalHeight();
setLogicalHeight(beforeEdge);
@@ -3035,10 +3035,10 @@
bool topToBottom = !style()->isFlippedBlocksWritingMode() ^ colInfo->progressionIsReversed();
LayoutUnit ruleLeft = isHorizontalWritingMode()
? borderLeft() + paddingLeft()
- : colGap / 2 - colGap - ruleThickness / 2 + (!colInfo->progressionIsReversed() ? borderBefore() + paddingBefore() : borderAfter() + paddingAfter());
+ : colGap / 2 - colGap - ruleThickness / 2 + (!colInfo->progressionIsReversed() ? borderAndPaddingBefore() : borderAndPaddingAfter());
LayoutUnit ruleWidth = isHorizontalWritingMode() ? contentWidth() : ruleThickness;
LayoutUnit ruleTop = isHorizontalWritingMode()
- ? colGap / 2 - colGap - ruleThickness / 2 + (!colInfo->progressionIsReversed() ? borderBefore() + paddingBefore() : borderAfter() + paddingAfter())
+ ? colGap / 2 - colGap - ruleThickness / 2 + (!colInfo->progressionIsReversed() ? borderAndPaddingBefore() : borderAndPaddingAfter())
: borderStart() + paddingStart();
LayoutUnit ruleHeight = isHorizontalWritingMode() ? ruleThickness : contentHeight();
LayoutRect ruleRect(ruleLeft, ruleTop, ruleWidth, ruleHeight);
@@ -5582,7 +5582,7 @@
// Compute the appropriate rect based off our information.
LayoutUnit colLogicalWidth = colInfo->desiredColumnWidth();
LayoutUnit colLogicalHeight = colInfo->columnHeight();
- LayoutUnit colLogicalTop = borderBefore() + paddingBefore();
+ LayoutUnit colLogicalTop = borderAndPaddingBefore();
LayoutUnit colLogicalLeft = logicalLeftOffsetForContent();
LayoutUnit colGap = columnGap();
if (colInfo->progressionAxis() == ColumnInfo::InlineAxis) {
@@ -5612,7 +5612,7 @@
addOverflowFromInlineChildren();
else
addOverflowFromBlockChildren();
- LayoutUnit layoutOverflowLogicalBottom = (isHorizontalWritingMode() ? layoutOverflowRect().maxY() : layoutOverflowRect().maxX()) - borderBefore() - paddingBefore();
+ LayoutUnit layoutOverflowLogicalBottom = (isHorizontalWritingMode() ? layoutOverflowRect().maxY() : layoutOverflowRect().maxX()) - borderAndPaddingBefore();
// FIXME: We don't balance properly at all in the presence of forced page breaks. We need to understand what
// the distance between forced page breaks is so that we can avoid making the minimum column height too tall.
@@ -5626,7 +5626,7 @@
// maximum page break distance.
if (!pageLogicalHeight) {
LayoutUnit distanceBetweenBreaks = max<LayoutUnit>(colInfo->maximumDistanceBetweenForcedBreaks(),
- view()->layoutState()->pageLogicalOffset(this, borderBefore() + paddingBefore() + layoutOverflowLogicalBottom) - colInfo->forcedBreakOffset());
+ view()->layoutState()->pageLogicalOffset(this, borderAndPaddingBefore() + layoutOverflowLogicalBottom) - colInfo->forcedBreakOffset());
columnHeight = max(colInfo->minimumColumnHeight(), distanceBetweenBreaks);
}
} else if (layoutOverflowLogicalBottom > boundedMultiply(pageLogicalHeight, desiredColumnCount)) {
@@ -5646,7 +5646,7 @@
colInfo->setColumnCountAndHeight(ceilf((float)layoutOverflowLogicalBottom / pageLogicalHeight), pageLogicalHeight);
if (columnCount(colInfo)) {
- setLogicalHeight(borderBefore() + paddingBefore() + colInfo->columnHeight() + borderAfter() + paddingAfter() + scrollbarLogicalHeight());
+ setLogicalHeight(borderAndPaddingBefore() + colInfo->columnHeight() + borderAndPaddingAfter() + scrollbarLogicalHeight());
m_overflow.clear();
} else
m_overflow = savedOverflow.release();
@@ -5758,7 +5758,7 @@
LayoutRect result;
bool isHorizontal = isHorizontalWritingMode();
- LayoutUnit beforeBorderPadding = borderBefore() + paddingBefore();
+ LayoutUnit beforeBorderPadding = borderAndPaddingBefore();
LayoutUnit colHeight = colInfo->columnHeight();
if (!colHeight)
return;
@@ -5807,7 +5807,7 @@
return point;
ColumnInfo* colInfo = columnInfo();
LayoutUnit columnLogicalHeight = colInfo->columnHeight();
- LayoutUnit expandedLogicalHeight = borderBefore() + paddingBefore() + columnCount(colInfo) * columnLogicalHeight + borderAfter() + paddingAfter() + scrollbarLogicalHeight();
+ LayoutUnit expandedLogicalHeight = borderAndPaddingBefore() + columnCount(colInfo) * columnLogicalHeight + borderAndPaddingAfter() + scrollbarLogicalHeight();
if (isHorizontalWritingMode())
return LayoutPoint(point.x(), expandedLogicalHeight - point.y());
return LayoutPoint(expandedLogicalHeight - point.x(), point.y());
@@ -5821,7 +5821,7 @@
ColumnInfo* colInfo = columnInfo();
LayoutUnit columnLogicalHeight = colInfo->columnHeight();
- LayoutUnit expandedLogicalHeight = borderBefore() + paddingBefore() + columnCount(colInfo) * columnLogicalHeight + borderAfter() + paddingAfter() + scrollbarLogicalHeight();
+ LayoutUnit expandedLogicalHeight = borderAndPaddingBefore() + columnCount(colInfo) * columnLogicalHeight + borderAndPaddingAfter() + scrollbarLogicalHeight();
if (isHorizontalWritingMode())
rect.setY(expandedLogicalHeight - rect.maxY());
@@ -5843,7 +5843,7 @@
for (unsigned i = 0; i < colCount; ++i) {
// Compute the edges for a given column in the block progression direction.
- LayoutRect sliceRect = LayoutRect(logicalLeft, borderBefore() + paddingBefore() + i * colLogicalHeight, colLogicalWidth, colLogicalHeight);
+ LayoutRect sliceRect = LayoutRect(logicalLeft, borderAndPaddingBefore() + i * colLogicalHeight, colLogicalWidth, colLogicalHeight);
if (!isHorizontalWritingMode())
sliceRect = sliceRect.transposedRect();
@@ -5855,7 +5855,7 @@
if (colInfo->progressionAxis() == ColumnInfo::InlineAxis)
offset.expand(columnRectAt(colInfo, i).x() - logicalLeft, -logicalOffset);
else
- offset.expand(0, columnRectAt(colInfo, i).y() - logicalOffset - borderBefore() - paddingBefore());
+ offset.expand(0, columnRectAt(colInfo, i).y() - logicalOffset - borderAndPaddingBefore());
return;
}
} else {
@@ -5863,7 +5863,7 @@
if (colInfo->progressionAxis() == ColumnInfo::InlineAxis)
offset.expand(-logicalOffset, columnRectAt(colInfo, i).y() - logicalLeft);
else
- offset.expand(columnRectAt(colInfo, i).x() - logicalOffset - borderBefore() - paddingBefore(), 0);
+ offset.expand(columnRectAt(colInfo, i).x() - logicalOffset - borderAndPaddingBefore(), 0);
return;
}
}
Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (151574 => 151575)
--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2013-06-13 23:54:25 UTC (rev 151574)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2013-06-14 00:39:36 UTC (rev 151575)
@@ -1687,7 +1687,7 @@
LayoutUnit logicalLineTopInFlowThread = logicalHeight() + offsetFromLogicalTopOfFirstPage();
LayoutUnit logicalLineBottomInFlowThread = logicalLineTopInFlowThread + lineHeight;
LayoutUnit logicalRegionTopInFlowThread = currentRegion->logicalTopForFlowThreadContent();
- LayoutUnit logicalRegionBottomInFlowThread = logicalRegionTopInFlowThread + currentRegion->logicalHeight() - currentRegion->borderAndPaddingBefore() - currentRegion->borderAfter() - currentRegion->paddingAfter();
+ LayoutUnit logicalRegionBottomInFlowThread = logicalRegionTopInFlowThread + currentRegion->logicalHeight() - currentRegion->borderAndPaddingBefore() - currentRegion->borderAndPaddingAfter();
// We only want to deal regions with shapes, so we look up for the next region whether it has a shape
if (!shapeInsideInfo && !currentRegion->isLastRegion()) {
@@ -1717,7 +1717,7 @@
logicalLineTopInFlowThread = logicalHeight() + offsetFromLogicalTopOfFirstPage();
logicalLineBottomInFlowThread = logicalLineTopInFlowThread + lineHeight;
logicalRegionTopInFlowThread = currentRegion->logicalTopForFlowThreadContent();
- logicalRegionBottomInFlowThread = logicalRegionTopInFlowThread + currentRegion->logicalHeight() - currentRegion->borderAndPaddingBefore() - currentRegion->borderAfter() - currentRegion->paddingAfter();
+ logicalRegionBottomInFlowThread = logicalRegionTopInFlowThread + currentRegion->logicalHeight() - currentRegion->borderAndPaddingBefore() - currentRegion->borderAndPaddingAfter();
}
if (!shapeInsideInfo)
@@ -1743,7 +1743,7 @@
// Overflow from last shape on last region should be pushed below the content box
if (currentRegion->isLastRegion() && !lineOverflowsFromShapeInside && (lineTop + lineHeight) > shapeInsideInfo->shapeLogicalBottom()) {
lineOverflowsFromShapeInside = true;
- LayoutUnit newLogicalHeight = this->logicalHeight() + (shapeInsideInfo->shapeContainingBlockHeight() - (lineTop + currentRegion->borderAfter() + currentRegion->paddingAfter()));
+ LayoutUnit newLogicalHeight = this->logicalHeight() + (shapeInsideInfo->shapeContainingBlockHeight() - (lineTop + currentRegion->borderAndPaddingAfter()));
setLogicalHeight(newLogicalHeight);
}
}
@@ -2091,7 +2091,7 @@
void RenderBlock::layoutInlineChildren(bool relayoutChildren, LayoutUnit& repaintLogicalTop, LayoutUnit& repaintLogicalBottom)
{
- setLogicalHeight(borderBefore() + paddingBefore());
+ setLogicalHeight(borderAndPaddingBefore());
// Lay out our hypothetical grid line as though it occurs at the top of the block.
if (view()->layoutState() && view()->layoutState()->lineGrid() == this)
@@ -2182,7 +2182,7 @@
}
// Now add in the bottom border/padding.
- setLogicalHeight(logicalHeight() + lastLineAnnotationsAdjustment + borderAfter() + paddingAfter() + scrollbarLogicalHeight());
+ setLogicalHeight(logicalHeight() + lastLineAnnotationsAdjustment + borderAndPaddingAfter() + scrollbarLogicalHeight());
if (!firstLineBox() && hasLineIfEmpty())
setLogicalHeight(logicalHeight() + lineHeight(true, isHorizontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes));
Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.h (151574 => 151575)
--- trunk/Source/WebCore/rendering/RenderBoxModelObject.h 2013-06-13 23:54:25 UTC (rev 151574)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.h 2013-06-14 00:39:36 UTC (rev 151575)
@@ -122,14 +122,16 @@
virtual int borderStart() const { return style()->borderStartWidth(); }
virtual int borderEnd() const { return style()->borderEndWidth(); }
+ LayoutUnit borderAndPaddingStart() const { return borderStart() + paddingStart(); }
+ LayoutUnit borderAndPaddingBefore() const { return borderBefore() + paddingBefore(); }
+ LayoutUnit borderAndPaddingAfter() const { return borderAfter() + paddingAfter(); }
+
LayoutUnit borderAndPaddingHeight() const { return borderTop() + borderBottom() + paddingTop() + paddingBottom(); }
LayoutUnit borderAndPaddingWidth() const { return borderLeft() + borderRight() + paddingLeft() + paddingRight(); }
- LayoutUnit borderAndPaddingLogicalHeight() const { return borderBefore() + borderAfter() + paddingBefore() + paddingAfter(); }
+ LayoutUnit borderAndPaddingLogicalHeight() const { return borderAndPaddingBefore() + borderAndPaddingAfter(); }
LayoutUnit borderAndPaddingLogicalWidth() const { return borderStart() + borderEnd() + paddingStart() + paddingEnd(); }
LayoutUnit borderAndPaddingLogicalLeft() const { return style()->isHorizontalWritingMode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop(); }
- LayoutUnit borderAndPaddingStart() const { return borderStart() + paddingStart(); }
- LayoutUnit borderAndPaddingBefore() const { return borderBefore() + paddingBefore(); }
LayoutUnit borderLogicalLeft() const { return style()->isHorizontalWritingMode() ? borderLeft() : borderTop(); }
LayoutUnit borderLogicalRight() const { return style()->isHorizontalWritingMode() ? borderRight() : borderBottom(); }
Modified: trunk/Source/WebCore/rendering/RenderMultiColumnBlock.cpp (151574 => 151575)
--- trunk/Source/WebCore/rendering/RenderMultiColumnBlock.cpp 2013-06-13 23:54:25 UTC (rev 151574)
+++ trunk/Source/WebCore/rendering/RenderMultiColumnBlock.cpp 2013-06-14 00:39:36 UTC (rev 151575)
@@ -172,7 +172,7 @@
if (relayoutChildren)
m_flowThread->setChildNeedsLayout(true, MarkOnlyThis);
- setLogicalTopForChild(m_flowThread, borderBefore() + paddingBefore());
+ setLogicalTopForChild(m_flowThread, borderAndPaddingBefore());
m_flowThread->layoutIfNeeded();
determineLogicalLeftPositionForChild(m_flowThread);
Modified: trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp (151574 => 151575)
--- trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp 2013-06-13 23:54:25 UTC (rev 151574)
+++ trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp 2013-06-14 00:39:36 UTC (rev 151575)
@@ -60,7 +60,7 @@
LayoutUnit RenderMultiColumnSet::heightAdjustedForSetOffset(LayoutUnit height) const
{
RenderMultiColumnBlock* multicolBlock = toRenderMultiColumnBlock(parent());
- LayoutUnit contentLogicalTop = logicalTop() - multicolBlock->borderBefore() - multicolBlock->paddingBefore();
+ LayoutUnit contentLogicalTop = logicalTop() - multicolBlock->borderAndPaddingBefore();
height -= contentLogicalTop;
return max(height, LayoutUnit(1)); // Let's avoid zero height, as that would probably cause an infinite amount of columns to be created.
@@ -163,7 +163,7 @@
// Set box logical top.
ASSERT(!previousSiblingBox() || !previousSiblingBox()->isRenderMultiColumnSet()); // FIXME: multiple set not implemented; need to examine previous set to calculate the correct logical top.
- setLogicalTop(multicolBlock->borderBefore() + multicolBlock->paddingBefore());
+ setLogicalTop(multicolBlock->borderAndPaddingBefore());
// Set box width.
updateLogicalWidth();
@@ -221,7 +221,7 @@
{
LayoutUnit colLogicalWidth = computedColumnWidth();
LayoutUnit colLogicalHeight = computedColumnHeight();
- LayoutUnit colLogicalTop = borderBefore() + paddingBefore();
+ LayoutUnit colLogicalTop = borderAndPaddingBefore();
LayoutUnit colLogicalLeft = borderAndPaddingLogicalLeft();
LayoutUnit colGap = columnGap();
if (style()->isLeftToRightDirection())
Modified: trunk/Source/WebCore/rendering/RenderTableCell.cpp (151574 => 151575)
--- trunk/Source/WebCore/rendering/RenderTableCell.cpp 2013-06-13 23:54:25 UTC (rev 151574)
+++ trunk/Source/WebCore/rendering/RenderTableCell.cpp 2013-06-14 00:39:36 UTC (rev 151575)
@@ -195,7 +195,7 @@
case LENGTH:
case BASELINE: {
LayoutUnit baseline = cellBaselinePosition();
- if (baseline > borderBefore() + paddingBefore())
+ if (baseline > borderAndPaddingBefore())
intrinsicPaddingBefore = section()->rowBaseline(rowIndex()) - (baseline - oldIntrinsicPaddingBefore);
break;
}
@@ -391,7 +391,7 @@
LayoutUnit firstLineBaseline = firstLineBoxBaseline();
if (firstLineBaseline != -1)
return firstLineBaseline;
- return paddingBefore() + borderBefore() + contentLogicalHeight();
+ return borderAndPaddingBefore() + contentLogicalHeight();
}
void RenderTableCell::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
Modified: trunk/Source/WebCore/rendering/RenderTableSection.cpp (151574 => 151575)
--- trunk/Source/WebCore/rendering/RenderTableSection.cpp 2013-06-13 23:54:25 UTC (rev 151574)
+++ trunk/Source/WebCore/rendering/RenderTableSection.cpp 2013-06-14 00:39:36 UTC (rev 151575)
@@ -336,7 +336,7 @@
// Find out the baseline. The baseline is set on the first row in a rowspan.
if (cell->isBaselineAligned()) {
LayoutUnit baselinePosition = cell->cellBaselinePosition();
- if (baselinePosition > cell->borderBefore() + cell->paddingBefore()) {
+ if (baselinePosition > cell->borderAndPaddingBefore()) {
m_grid[cellStartRow].baseline = max(m_grid[cellStartRow].baseline, baselinePosition);
// 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
// become the baseline descent applied to the rest of the row. Also we don't account for the baseline descent of
@@ -603,7 +603,7 @@
// If the baseline moved, we may have to update the data for our row. Find out the new baseline.
if (cell->isBaselineAligned()) {
LayoutUnit baseline = cell->cellBaselinePosition();
- if (baseline > cell->borderBefore() + cell->paddingBefore())
+ if (baseline > cell->borderAndPaddingBefore())
m_grid[r].baseline = max(m_grid[r].baseline, baseline);
}
}
@@ -917,7 +917,7 @@
const RenderTableCell* cell = cs.primaryCell();
// Only cells with content have a baseline
if (cell && cell->contentLogicalHeight())
- firstLineBaseline = max<int>(firstLineBaseline, cell->logicalTop() + cell->paddingBefore() + cell->borderBefore() + cell->contentLogicalHeight());
+ firstLineBaseline = max<int>(firstLineBaseline, cell->logicalTop() + cell->borderAndPaddingBefore() + cell->contentLogicalHeight());
}
return firstLineBaseline;
Modified: trunk/Source/WebCore/rendering/RootInlineBox.cpp (151574 => 151575)
--- trunk/Source/WebCore/rendering/RootInlineBox.cpp 2013-06-13 23:54:25 UTC (rev 151574)
+++ trunk/Source/WebCore/rendering/RootInlineBox.cpp 2013-06-14 00:39:36 UTC (rev 151575)
@@ -430,7 +430,7 @@
if (layoutState->isPaginated() && layoutState->pageLogicalHeight()) {
pageLogicalTop = block()->pageLogicalTopForOffset(lineTopWithLeading() + delta);
if (pageLogicalTop > firstLineTopWithLeading)
- firstTextTop = pageLogicalTop + lineGridBox->logicalTop() - lineGrid->borderBefore() - lineGrid->paddingBefore() + lineGridPaginationOrigin;
+ firstTextTop = pageLogicalTop + lineGridBox->logicalTop() - lineGrid->borderAndPaddingBefore() + lineGridPaginationOrigin;
}
if (block()->style()->lineSnap() == LineSnapContain) {
@@ -581,7 +581,7 @@
if (renderer()->style()->isFlippedLinesWritingMode())
return selectionTop;
- LayoutUnit prevBottom = prevRootBox() ? prevRootBox()->selectionBottom() : block()->borderBefore() + block()->paddingBefore();
+ LayoutUnit prevBottom = prevRootBox() ? prevRootBox()->selectionBottom() : block()->borderAndPaddingBefore();
if (prevBottom < selectionTop && block()->containsFloats()) {
// This line has actually been moved further down, probably from a large line-height, but possibly because the
// line was forced to clear floats. If so, let's check the offsets, and only be willing to use the previous
@@ -868,8 +868,8 @@
LayoutUnit ascentWithMargin = box->renderer()->style(isFirstLineStyle())->fontMetrics().ascent(baselineType());
LayoutUnit descentWithMargin = box->renderer()->style(isFirstLineStyle())->fontMetrics().descent(baselineType());
if (box->parent() && !box->renderer()->isText()) {
- ascentWithMargin += box->boxModelObject()->borderBefore() + box->boxModelObject()->paddingBefore() + box->boxModelObject()->marginBefore();
- descentWithMargin += box->boxModelObject()->borderAfter() + box->boxModelObject()->paddingAfter() + box->boxModelObject()->marginAfter();
+ ascentWithMargin += box->boxModelObject()->borderAndPaddingBefore() + box->boxModelObject()->marginBefore();
+ descentWithMargin += box->boxModelObject()->borderAndPaddingAfter() + box->boxModelObject()->marginAfter();
}
setAscentAndDescent(ascent, descent, ascentWithMargin, descentWithMargin, ascentDescentSet);