Changeset 113738 in webkit


Ignore:
Timestamp:
Apr 10, 2012 11:14:20 AM (12 years ago)
Author:
hyatt@apple.com
Message:

Source/WebCore: https://bugs.webkit.org/show_bug.cgi?id=83595
<rdar://problem/10443278> Overlapping text in table cell across column break

If a cell's height changes such that it is taller than the overall row height because
of pagination, then grow the entire row height to enclose the cell instead of shrinking
the cell.

Reviewed by Dan Bernstein.

Added fast/multicol/cell-shrinkback.html

  • rendering/RenderTableSection.cpp:

(WebCore::RenderTableSection::layoutRows):

LayoutTests: https://bugs.webkit.org/show_bug.cgi?id=83595

Add new layout test for cells paginating across columns.

Reviewed by Dan Bernstein.

  • fast/multicol/cell-shrinkback.html: Added.
  • fast/multicol/cell-shrinkback-expected.html: Added.
  • platform/mac/fast/multicol/table-vertical-align-expected.txt:
Location:
trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r113736 r113738  
     12012-04-10  David Hyatt  <hyatt@apple.com>
     2
     3        https://bugs.webkit.org/show_bug.cgi?id=83595
     4       
     5        Add new layout test for cells paginating across columns.
     6
     7        Reviewed by Dan Bernstein.
     8
     9        * fast/multicol/cell-shrinkback.html: Added.
     10        * fast/multicol/cell-shrinkback-expected.html: Added.
     11        * platform/mac/fast/multicol/table-vertical-align-expected.txt:
     12
    1132012-04-10  David Dorwin  <ddorwin@chromium.org>
    214
  • trunk/LayoutTests/platform/mac/fast/multicol/table-vertical-align-expected.txt

    r73385 r113738  
    139139layer at (8,376) size 769x300
    140140  RenderBlock {DIV} at (0,368) size 769x300
    141     RenderTable {TABLE} at (0,0) size 376x1129 [border: (1px outset #808080)]
    142       RenderTableSection {TBODY} at (1,1) size 374x1127
     141    RenderTable {TABLE} at (0,0) size 376x1166 [border: (1px outset #808080)]
     142      RenderTableSection {TBODY} at (1,1) size 374x1164
    143143        RenderTableRow {TR} at (0,0) size 374x1127
    144144          RenderTableCell {TD} at (0,0) size 140x1127 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
     
    263263              text run at (11,1098) width 44: "of text."
    264264            RenderBR {BR} at (55,1112) size 0x0
    265           RenderTableCell {TD} at (140,478) size 234x170 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
     265          RenderTableCell {TD} at (140,478) size 234x207 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
    266266            RenderInline {SPAN} at (0,0) size 145x185
    267267              RenderText {#text} at (11,11) size 145x185
  • trunk/Source/WebCore/ChangeLog

    r113737 r113738  
     12012-04-10  David Hyatt  <hyatt@apple.com>
     2
     3        https://bugs.webkit.org/show_bug.cgi?id=83595
     4        <rdar://problem/10443278> Overlapping text in table cell across column break
     5
     6        If a cell's height changes such that it is taller than the overall row height because
     7        of pagination, then grow the entire row height to enclose the cell instead of shrinking
     8        the cell.
     9
     10        Reviewed by Dan Bernstein.
     11
     12        Added fast/multicol/cell-shrinkback.html
     13
     14        * rendering/RenderTableSection.cpp:
     15        (WebCore::RenderTableSection::layoutRows):
     16
    1172012-04-10  Luke Macpherson  <macpherson@chromium.org>
    218
  • trunk/Source/WebCore/rendering/RenderTableSection.cpp

    r113581 r113738  
    673673
    674674            // FIXME: Make pagination work with vertical tables.
    675             if (style()->isHorizontalWritingMode() && view()->layoutState()->pageLogicalHeight() && cell->height() != rHeight)
    676                 cell->setHeight(rHeight); // FIXME: Pagination might have made us change size.  For now just shrink or grow the cell to fit without doing a relayout.
     675            if (view()->layoutState()->pageLogicalHeight() && cell->logicalHeight() != rHeight) {
     676                // FIXME: Pagination might have made us change size. For now just shrink or grow the cell to fit without doing a relayout.
     677                // We'll also do a basic increase of the row height to accommodate the cell if it's bigger, but this isn't quite right
     678                // either. It's at least stable though and won't result in an infinite # of relayouts that may never stabilize.
     679                if (cell->logicalHeight() > rHeight) {
     680                    unsigned delta = cell->logicalHeight() - rHeight;
     681                    for (unsigned rowIndex = rindx + cell->rowSpan(); rowIndex <= totalRows; rowIndex++)
     682                        m_rowPos[rowIndex] += delta;
     683                    rHeight = cell->logicalHeight();
     684                } else
     685                    cell->setLogicalHeight(rHeight);
     686            }
    677687
    678688            LayoutSize childOffset(cell->location() - oldCellRect.location());
Note: See TracChangeset for help on using the changeset viewer.