Changeset 149585 in webkit


Ignore:
Timestamp:
May 6, 2013 12:32:33 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

REGRESSION(r140907) - Backport blink r149612 to fix vertical-align and rowspan issue
https://bugs.webkit.org/show_bug.cgi?id=115611

Source/WebCore:

Patch by Julien Chaffraix.
Patch by Robert Hogan <robert@webkit.org> on 2013-05-06
Reviewed by Benjamin Poulain.

Backport phttps://src.chromium.org/viewvc/blink?view=rev&revision=149612 from
https://chromiumcodereview.appspot.com/14105010

Fix the rows' height computation with vertical-align: baseline and rowspan.
r140907 was careful in avoiding updating the baseline descent for
spanning cells. However it still added the non-spanning cells baseline
descent to the spanning cells' row height computation.
This change avoids the previous issue by not adding the baseline
descent in this case.

Test: fast/table/baseline-align-rowspan.html

  • rendering/RenderTableSection.cpp:

(WebCore::RenderTableSection::calcRowLogicalHeight):

LayoutTests:

Patch by Robert Hogan <robert@webkit.org> on 2013-05-06
Reviewed by Benjamin Poulain.

  • fast/table/baseline-align-rowspan-expected.txt: Added.
  • fast/table/baseline-align-rowspan.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r149581 r149585  
     12013-05-06  Robert Hogan  <robert@webkit.org>
     2
     3        REGRESSION(r140907) - Backport blink r149612 to fix vertical-align and rowspan issue
     4        https://bugs.webkit.org/show_bug.cgi?id=115611
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        * fast/table/baseline-align-rowspan-expected.txt: Added.
     9        * fast/table/baseline-align-rowspan.html: Added.
     10
    1112013-05-05  Chris Fleizach  <cfleizach@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r149583 r149585  
     12013-05-06  Robert Hogan  <robert@webkit.org>
     2
     3        REGRESSION(r140907) - Backport blink r149612 to fix vertical-align and rowspan issue
     4        https://bugs.webkit.org/show_bug.cgi?id=115611
     5
     6        Patch by Julien Chaffraix.
     7        Reviewed by Benjamin Poulain.
     8
     9        Backport phttps://src.chromium.org/viewvc/blink?view=rev&revision=149612 from
     10        https://chromiumcodereview.appspot.com/14105010
     11       
     12        Fix the rows' height computation with vertical-align: baseline and rowspan.
     13        r140907 was careful in avoiding updating the baseline descent for
     14        spanning cells. However it still added the non-spanning cells baseline
     15        descent to the spanning cells' row height computation.
     16        This change avoids the previous issue by not adding the baseline
     17        descent in this case.
     18
     19        Test: fast/table/baseline-align-rowspan.html
     20
     21        * rendering/RenderTableSection.cpp:
     22        (WebCore::RenderTableSection::calcRowLogicalHeight):
     23
    1242013-05-05  Anders Carlsson  <andersca@apple.com>
    225
  • trunk/Source/WebCore/rendering/RenderTableSection.cpp

    r149579 r149585  
    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
    342                         // become the baseline descent applied to the rest of the row.
    343                         if (cell->rowSpan() == 1)
     342                        // become the baseline descent applied to the rest of the row. Also we don't account for the baseline descent of
     343                        // non-spanning cells when computing a spanning cell's extent.
     344                        int cellStartRowBaselineDescent = 0;
     345                        if (cell->rowSpan() == 1) {
    344346                            baselineDescent = max(baselineDescent, cellLogicalHeight - (baselinePosition - cell->intrinsicPaddingBefore()));
    345                         m_rowPos[cellStartRow + 1] = max<int>(m_rowPos[cellStartRow + 1], m_rowPos[cellStartRow] + m_grid[cellStartRow].baseline + baselineDescent);
     347                            cellStartRowBaselineDescent = baselineDescent;
     348                        }
     349                        m_rowPos[cellStartRow + 1] = max<int>(m_rowPos[cellStartRow + 1], m_rowPos[cellStartRow] + m_grid[cellStartRow].baseline + cellStartRowBaselineDescent);
    346350                    }
    347351                }
Note: See TracChangeset for help on using the changeset viewer.