Summary: | Padding added to table-cell element after font-size change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Raphael Schweikert <sabberworm> | ||||||||
Component: | Layout and Rendering | Assignee: | zalan <zalan> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | commit-queue, esprehn+autocc, glenn, kondapallykalyan, sabberworm, simon.fraser, zalan | ||||||||
Priority: | P2 | ||||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Mac | ||||||||||
OS: | OS X 10.11 | ||||||||||
Attachments: |
|
Description
Raphael Schweikert
2016-01-06 12:21:07 PST
Created attachment 268419 [details]
Another test reduction
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); Created attachment 268691 [details]
Patch
Comment on attachment 268691 [details]
Patch
r=me
Comment on attachment 268691 [details] Patch Clearing flags on attachment: 268691 Committed r194867: <http://trac.webkit.org/changeset/194867> All reviewed patches have been landed. Closing bug. |