Changeset 194867 in webkit


Ignore:
Timestamp:
Jan 11, 2016 2:03:03 PM (8 years ago)
Author:
Alan Bujtas
Message:

Padding added to table-cell element after font-size change.
https://bugs.webkit.org/show_bug.cgi?id=152796

Reviewed by David Hyatt.

Do not include intrinsicPaddingBefore value while figuring out the height of a row.
In RenderTableSection::calcRowLogicalHeight() we are interested in the height of the content
without the additional padding (normal padding is included).

Source/WebCore:

Test: fast/table/table-baseline-grows.html

  • rendering/RenderTableSection.cpp:

(WebCore::RenderTableSection::calcRowLogicalHeight):

LayoutTests:

  • TestExpectations: This test fails even without the patch when Ahem font is not used.
  • fast/table/table-baseline-grows-expected.html: Added.
  • fast/table/table-baseline-grows.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r194865 r194867  
     12016-01-11  Zalan Bujtas  <zalan@apple.com>
     2
     3        Padding added to table-cell element after font-size change.
     4        https://bugs.webkit.org/show_bug.cgi?id=152796
     5
     6        Reviewed by David Hyatt.
     7
     8        Do not include intrinsicPaddingBefore value while figuring out the height of a row.
     9        In RenderTableSection::calcRowLogicalHeight() we are interested in the height of the content
     10        without the additional padding (normal padding is included).
     11
     12        * TestExpectations: This test fails even without the patch when Ahem font is not used.
     13        * fast/table/table-baseline-grows-expected.html: Added.
     14        * fast/table/table-baseline-grows.html: Added.
     15
    1162016-01-11  Dave Hyatt  <hyatt@apple.com>
    217
  • trunk/LayoutTests/TestExpectations

    r194583 r194867  
    785785
    786786webkit.org/b/151949 streams/reference-implementation/pipe-to.html [ Failure ]
     787
     788webkit.org/b/52185 fast/css/vertical-align-baseline-rowspan-010.html [ ImageOnlyFailure ]
  • trunk/Source/WebCore/ChangeLog

    r194866 r194867  
     12016-01-11  Zalan Bujtas  <zalan@apple.com>
     2
     3        Padding added to table-cell element after font-size change.
     4        https://bugs.webkit.org/show_bug.cgi?id=152796
     5
     6        Reviewed by David Hyatt.
     7
     8        Do not include intrinsicPaddingBefore value while figuring out the height of a row.
     9        In RenderTableSection::calcRowLogicalHeight() we are interested in the height of the content
     10        without the additional padding (normal padding is included).
     11
     12        Test: fast/table/table-baseline-grows.html
     13
     14        * rendering/RenderTableSection.cpp:
     15        (WebCore::RenderTableSection::calcRowLogicalHeight):
     16
    1172016-01-11  Andy Estes  <aestes@apple.com>
    218
  • trunk/Source/WebCore/rendering/RenderTableSection.cpp

    r194496 r194867  
    334334                // Find out the baseline. The baseline is set on the first row in a rowspan.
    335335                if (cell->isBaselineAligned()) {
    336                     LayoutUnit baselinePosition = cell->cellBaselinePosition();
    337                     if (baselinePosition > cell->borderAndPaddingBefore()) {
     336                    LayoutUnit baselinePosition = cell->cellBaselinePosition() - cell->intrinsicPaddingBefore();
     337                    LayoutUnit borderAndComputedPaddingBefore = cell->borderAndPaddingBefore() - cell->intrinsicPaddingBefore();
     338                    if (baselinePosition > borderAndComputedPaddingBefore) {
    338339                        m_grid[cellStartRow].baseline = std::max(m_grid[cellStartRow].baseline, baselinePosition);
    339340                        // 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
     
    342343                        LayoutUnit cellStartRowBaselineDescent = 0;
    343344                        if (cell->rowSpan() == 1) {
    344                             baselineDescent = std::max(baselineDescent, cellLogicalHeight - (baselinePosition - cell->intrinsicPaddingBefore()));
     345                            baselineDescent = std::max(baselineDescent, cellLogicalHeight - baselinePosition);
    345346                            cellStartRowBaselineDescent = baselineDescent;
    346347                        }
Note: See TracChangeset for help on using the changeset viewer.