<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Padding added to table-cell element after font-size change"
href="https://bugs.webkit.org/show_bug.cgi?id=152796#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Padding added to table-cell element after font-size change"
href="https://bugs.webkit.org/show_bug.cgi?id=152796">bug 152796</a>
from <span class="vcard"><a class="email" href="mailto:zalan@apple.com" title="zalan <zalan@apple.com>"> <span class="fn">zalan</span></a>
</span></b>
<pre>baseline position compute is broken.
diff --git a/Source/WebCore/rendering/RenderTableSection.cpp b/Source/WebCore/rendering/RenderTableSection.cpp
index ff9877b..a96cede 100644
--- a/Source/WebCore/rendering/RenderTableSection.cpp
+++ b/Source/WebCore/rendering/RenderTableSection.cpp
@@ -333,15 +333,15 @@ LayoutUnit RenderTableSection::calcRowLogicalHeight()
// 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->borderAndPaddingBefore()) {
+ LayoutUnit baselinePosition = cell->cellBaselinePosition() - cell->intrinsicPaddingBefore();
+ if (baselinePosition > cell->borderAndPaddingBefore() - cell->intrinsicPaddingBefore()) {
m_grid[cellStartRow].baseline = std::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
// non-spanning cells when computing a spanning cell's extent.
LayoutUnit cellStartRowBaselineDescent = 0;
if (cell->rowSpan() == 1) {
- baselineDescent = std::max(baselineDescent, cellLogicalHeight - (baselinePosition - cell->intrinsicPaddingBefore()));
+ baselineDescent = std::max(baselineDescent, cellLogicalHeight - baselinePosition);
cellStartRowBaselineDescent = baselineDescent;
}
m_rowPos[cellStartRow + 1] = std::max(m_rowPos[cellStartRow + 1], m_rowPos[cellStartRow] + m_grid[cellStartRow].baseline + cellStartRowBaselineDescent);</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>