Title: [113738] trunk
- Revision
- 113738
- Author
- hy...@apple.com
- Date
- 2012-04-10 11:14:20 -0700 (Tue, 10 Apr 2012)
Log 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:
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (113737 => 113738)
--- trunk/LayoutTests/ChangeLog 2012-04-10 18:10:45 UTC (rev 113737)
+++ trunk/LayoutTests/ChangeLog 2012-04-10 18:14:20 UTC (rev 113738)
@@ -1,3 +1,15 @@
+2012-04-10 David Hyatt <hy...@apple.com>
+
+ 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:
+
2012-04-10 David Dorwin <ddor...@chromium.org>
Add Encrypted Media Extensions methods to HTMLMediaElement
Added: trunk/LayoutTests/fast/multicol/cell-shrinkback.html (0 => 113738)
--- trunk/LayoutTests/fast/multicol/cell-shrinkback.html (rev 0)
+++ trunk/LayoutTests/fast/multicol/cell-shrinkback.html 2012-04-10 18:14:20 UTC (rev 113738)
@@ -0,0 +1,10 @@
+<div style="height: 100px; width: 200px; border: solid; -webkit-columns: 2; -webkit-column-gap:0">
+ <div style="height: 55px;"></div>
+ <table cellspacing=0 cellpadding=0>
+ <tr>
+ <td><div style="height: 50px; width: 25px;"></div></td>
+ <td style="background-color: orange;" valign=bottom>Text</td>
+ </tr>
+ </table>
+ <div style="border-top: solid;"></div>
+</div>
Modified: trunk/LayoutTests/platform/mac/fast/multicol/table-vertical-align-expected.txt (113737 => 113738)
--- trunk/LayoutTests/platform/mac/fast/multicol/table-vertical-align-expected.txt 2012-04-10 18:10:45 UTC (rev 113737)
+++ trunk/LayoutTests/platform/mac/fast/multicol/table-vertical-align-expected.txt 2012-04-10 18:14:20 UTC (rev 113738)
@@ -138,8 +138,8 @@
text run at (11,85) width 108: "cell."
layer at (8,376) size 769x300
RenderBlock {DIV} at (0,368) size 769x300
- RenderTable {TABLE} at (0,0) size 376x1129 [border: (1px outset #808080)]
- RenderTableSection {TBODY} at (1,1) size 374x1127
+ RenderTable {TABLE} at (0,0) size 376x1166 [border: (1px outset #808080)]
+ RenderTableSection {TBODY} at (1,1) size 374x1164
RenderTableRow {TR} at (0,0) size 374x1127
RenderTableCell {TD} at (0,0) size 140x1127 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderText {#text} at (11,11) size 105x36
@@ -262,7 +262,7 @@
text run at (11,1080) width 105: "This cell has lots"
text run at (11,1098) width 44: "of text."
RenderBR {BR} at (55,1112) size 0x0
- RenderTableCell {TD} at (140,478) size 234x170 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
+ RenderTableCell {TD} at (140,478) size 234x207 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
RenderInline {SPAN} at (0,0) size 145x185
RenderText {#text} at (11,11) size 145x185
text run at (11,11) width 145: "Other"
Modified: trunk/Source/WebCore/ChangeLog (113737 => 113738)
--- trunk/Source/WebCore/ChangeLog 2012-04-10 18:10:45 UTC (rev 113737)
+++ trunk/Source/WebCore/ChangeLog 2012-04-10 18:14:20 UTC (rev 113738)
@@ -1,3 +1,19 @@
+2012-04-10 David Hyatt <hy...@apple.com>
+
+ 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):
+
2012-04-10 Luke Macpherson <macpher...@chromium.org>
Remove unnecessary null check in void SimplifyMarkupCommand::doApply().
Modified: trunk/Source/WebCore/rendering/RenderTableSection.cpp (113737 => 113738)
--- trunk/Source/WebCore/rendering/RenderTableSection.cpp 2012-04-10 18:10:45 UTC (rev 113737)
+++ trunk/Source/WebCore/rendering/RenderTableSection.cpp 2012-04-10 18:14:20 UTC (rev 113738)
@@ -672,8 +672,18 @@
cell->layoutIfNeeded();
// FIXME: Make pagination work with vertical tables.
- if (style()->isHorizontalWritingMode() && view()->layoutState()->pageLogicalHeight() && cell->height() != rHeight)
- 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.
+ if (view()->layoutState()->pageLogicalHeight() && cell->logicalHeight() != rHeight) {
+ // FIXME: Pagination might have made us change size. For now just shrink or grow the cell to fit without doing a relayout.
+ // 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
+ // either. It's at least stable though and won't result in an infinite # of relayouts that may never stabilize.
+ if (cell->logicalHeight() > rHeight) {
+ unsigned delta = cell->logicalHeight() - rHeight;
+ for (unsigned rowIndex = rindx + cell->rowSpan(); rowIndex <= totalRows; rowIndex++)
+ m_rowPos[rowIndex] += delta;
+ rHeight = cell->logicalHeight();
+ } else
+ cell->setLogicalHeight(rHeight);
+ }
LayoutSize childOffset(cell->location() - oldCellRect.location());
if (childOffset.width() || childOffset.height()) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes