Log Message
Merged r180364. <rdar://19720096>
Modified Paths
- branches/safari-600.5-branch/LayoutTests/ChangeLog
- branches/safari-600.5-branch/LayoutTests/platform/mac/fast/multicol/span/span-as-immediate-columns-child-expected.png
- branches/safari-600.5-branch/LayoutTests/platform/mac/fast/multicol/span/span-as-immediate-columns-child-expected.txt
- branches/safari-600.5-branch/Source/WebCore/ChangeLog
- branches/safari-600.5-branch/Source/WebCore/rendering/RenderBlockFlow.cpp
- branches/safari-600.5-branch/Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp
- branches/safari-600.5-branch/Source/WebCore/rendering/RenderMultiColumnSet.cpp
- branches/safari-600.5-branch/Source/WebCore/rendering/RenderMultiColumnSet.h
Added Paths
Diff
Modified: branches/safari-600.5-branch/LayoutTests/ChangeLog (180657 => 180658)
--- branches/safari-600.5-branch/LayoutTests/ChangeLog 2015-02-26 05:05:32 UTC (rev 180657)
+++ branches/safari-600.5-branch/LayoutTests/ChangeLog 2015-02-26 05:12:10 UTC (rev 180658)
@@ -1,5 +1,22 @@
2015-02-25 Dana Burkart <[email protected]>
+ Merged r180364. <rdar://problem/19720096>
+
+ 2015-02-19 David Hyatt <[email protected]>
+
+ Columns are splitting unsplittable content.
+ https://bugs.webkit.org/show_bug.cgi?id=141807
+ <rdar://problem/18387659>
+
+ Reviewed by Dean Jackson.
+
+ * fast/multicol/inline-table-dynamic-movement-expected.html: Added.
+ * fast/multicol/inline-table-dynamic-movement.html: Added.
+ * platform/mac/fast/multicol/span/span-as-immediate-columns-child-expected.png:
+ * platform/mac/fast/multicol/span/span-as-immediate-columns-child-expected.txt:
+
+2015-02-25 Dana Burkart <[email protected]>
+
Merged r180174. <rdar://problem/19947808>
2015-02-16 Zalan Bujtas <[email protected]>
Copied: branches/safari-600.5-branch/LayoutTests/fast/multicol/inline-table-dynamic-movement-expected.html (from rev 180364, trunk/LayoutTests/fast/multicol/inline-table-dynamic-movement-expected.html) (0 => 180658)
--- branches/safari-600.5-branch/LayoutTests/fast/multicol/inline-table-dynamic-movement-expected.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/multicol/inline-table-dynamic-movement-expected.html 2015-02-26 05:12:10 UTC (rev 180658)
@@ -0,0 +1,9 @@
+
+
+<div id='test' style="-webkit-columns:2; height:500px; border:3px solid black; -webkit-column-fill: auto"><div style="height:150px; background-color:lime"></div>
+
+<table style="display:inline-table; height:300px"><tr><td style="vertical-align:middle; height:100%">Hello world<br><img style="height:250px;width:175px; background-color:purple">
+<td style="vertical-align:middle; height:100%">Also world<br>
+<img style="height:250px;width:175px; background-color:purple">
+</table>
+
Copied: branches/safari-600.5-branch/LayoutTests/fast/multicol/inline-table-dynamic-movement.html (from rev 180364, trunk/LayoutTests/fast/multicol/inline-table-dynamic-movement.html) (0 => 180658)
--- branches/safari-600.5-branch/LayoutTests/fast/multicol/inline-table-dynamic-movement.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/multicol/inline-table-dynamic-movement.html 2015-02-26 05:12:10 UTC (rev 180658)
@@ -0,0 +1,21 @@
+
+<script>
+function doIt()
+{
+document.getElementById('test').offsetHeight
+document.getElementById('test').style.height = '500px';
+}
+</script>
+
+<div id='test' style="-webkit-columns:2; height:400px; border:3px solid black; -webkit-column-fill: auto"><div style="height:150px; background-color:lime"></div>
+
+<table style="display:inline-table; height:300px"><tr><td style="vertical-align:middle; height:100%">Hello world<br><img style="height:250px;width:175px; background-color:purple">
+<td style="vertical-align:middle; height:100%">Also world<br>
+<img style="height:250px;width:175px; background-color:purple">
+</table>
+
+</div>
+
+<script>
+doIt()
+</script>
Modified: branches/safari-600.5-branch/LayoutTests/platform/mac/fast/multicol/span/span-as-immediate-columns-child-expected.png
(Binary files differ)
Modified: branches/safari-600.5-branch/LayoutTests/platform/mac/fast/multicol/span/span-as-immediate-columns-child-expected.txt (180657 => 180658)
--- branches/safari-600.5-branch/LayoutTests/platform/mac/fast/multicol/span/span-as-immediate-columns-child-expected.txt 2015-02-26 05:05:32 UTC (rev 180657)
+++ branches/safari-600.5-branch/LayoutTests/platform/mac/fast/multicol/span/span-as-immediate-columns-child-expected.txt 2015-02-26 05:12:10 UTC (rev 180658)
@@ -1,10 +1,10 @@
-layer at (0,0) size 785x3403
+layer at (0,0) size 785x3430
RenderView at (0,0) size 785x600
-layer at (0,0) size 785x3403
- RenderBlock {HTML} at (0,0) size 785x3403
- RenderBody {BODY} at (8,16) size 769x3371
-layer at (8,16) size 760x384
- RenderBlock {DIV} at (0,0) size 760x384 [border: (5px solid #800000)]
+layer at (0,0) size 785x3430
+ RenderBlock {HTML} at (0,0) size 785x3430
+ RenderBody {BODY} at (8,16) size 769x3398
+layer at (8,16) size 760x402
+ RenderBlock {DIV} at (0,0) size 760x402 [border: (5px solid #800000)]
RenderBlock {H2} at (5,24) size 750x29 [bgcolor=#EEEEEE]
RenderText {#text} at (0,0) size 664x28
text run at (0,0) width 664: "This is a spanning element at the beginning of the columns block."
@@ -285,26 +285,26 @@
text run at (0,162) width 362: "nec felis. Sed varius turpis vitae pede. Lorem ipsum dolor"
text run at (0,180) width 229: "sit amet, consectetuer adipiscing elit."
RenderBlock {P} at (0,444) size 367x198
- RenderText {#text} at (0,0) size 362x198
- text run at (0,0) width 354: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit."
- text run at (0,18) width 351: "Nulla varius enim ac mi. Curabitur sollicitudin felis quis"
- text run at (0,36) width 325: "lectus. Quisque adipiscing rhoncus sem. Proin nulla"
- text run at (0,54) width 358: "purus, vulputate vel, varius ut, euismod et, nisi. Sed vitae"
- text run at (0,72) width 343: "felis vel orci sagittis aliquam. Cras convallis adipiscing"
- text run at (0,90) width 340: "sem. Nam nonummy enim. Nullam bibendum lobortis"
- text run at (0,108) width 344: "neque. Vestibulum velit orci, tempus euismod, pretium"
- text run at (0,126) width 343: "quis, interdum vitae, nulla. Phasellus eget ante et tortor"
- text run at (0,144) width 343: "condimentum vestibulum. Suspendisse hendrerit quam"
- text run at (0,162) width 362: "nec felis. Sed varius turpis vitae pede. Lorem ipsum dolor"
- text run at (0,180) width 229: "sit amet, consectetuer adipiscing elit."
-layer at (8,2475) size 760x444
- RenderBlock {DIV} at (0,2459) size 760x445 [border: (5px solid #800000)]
- RenderMultiColumnSet at (5,5) size 750x338
- RenderBlock {H2} at (5,362) size 750x57 [bgcolor=#EEEEEE]
+ RenderText {#text} at (0,0) size 367x198
+ text run at (0,0) width 364: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit."
+ text run at (0,18) width 362: "Nulla varius enim ac mi. Curabitur sollicitudin felis quis"
+ text run at (0,36) width 332: "lectus. Quisque adipiscing rhoncus sem. Proin nulla"
+ text run at (0,54) width 367: "purus, vulputate vel, varius ut, euismod et, nisi. Sed vitae"
+ text run at (0,72) width 354: "felis vel orci sagittis aliquam. Cras convallis adipiscing"
+ text run at (0,90) width 347: "sem. Nam nonummy enim. Nullam bibendum lobortis"
+ text run at (0,108) width 351: "neque. Vestibulum velit orci, tempus euismod, pretium"
+ text run at (0,126) width 353: "quis, interdum vitae, nulla. Phasellus eget ante et tortor"
+ text run at (0,144) width 351: "condimentum vestibulum. Suspendisse hendrerit quam"
+ text run at (0,162) width 333: "nec felis. Sed varius turpis vitae pede. Lorem ipsum"
+ text run at (0,180) width 275: "dolor sit amet, consectetuer adipiscing elit."
+layer at (8,2511) size 760x435
+ RenderBlock {DIV} at (0,2495) size 760x436 [border: (5px solid #800000)]
+ RenderMultiColumnSet at (5,5) size 750x329
+ RenderBlock {H2} at (5,353) size 750x57 [bgcolor=#EEEEEE]
RenderText {#text} at (0,0) size 707x56
text run at (0,0) width 707: "This is a spanning element at the end of the columns block with block"
text run at (0,28) width 83: "siblings."
- RenderMultiColumnSet at (5,438) size 750x0
+ RenderMultiColumnSet at (5,429) size 750x0
layer at (13,2480) size 367x658
RenderMultiColumnFlowThread at (5,5) size 367x658
RenderBlock {P} at (0,16) size 367x198
@@ -320,7 +320,20 @@
text run at (0,144) width 343: "condimentum vestibulum. Suspendisse hendrerit quam"
text run at (0,162) width 362: "nec felis. Sed varius turpis vitae pede. Lorem ipsum dolor"
text run at (0,180) width 229: "sit amet, consectetuer adipiscing elit."
- RenderBlock {P} at (0,230) size 367x198
+ RenderBlock {P} at (0,230) size 367x207
+ RenderText {#text} at (0,0) size 367x207
+ text run at (0,0) width 364: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit."
+ text run at (0,18) width 362: "Nulla varius enim ac mi. Curabitur sollicitudin felis quis"
+ text run at (0,36) width 332: "lectus. Quisque adipiscing rhoncus sem. Proin nulla"
+ text run at (0,54) width 367: "purus, vulputate vel, varius ut, euismod et, nisi. Sed vitae"
+ text run at (0,72) width 354: "felis vel orci sagittis aliquam. Cras convallis adipiscing"
+ text run at (0,99) width 347: "sem. Nam nonummy enim. Nullam bibendum lobortis"
+ text run at (0,117) width 351: "neque. Vestibulum velit orci, tempus euismod, pretium"
+ text run at (0,135) width 353: "quis, interdum vitae, nulla. Phasellus eget ante et tortor"
+ text run at (0,153) width 351: "condimentum vestibulum. Suspendisse hendrerit quam"
+ text run at (0,171) width 333: "nec felis. Sed varius turpis vitae pede. Lorem ipsum"
+ text run at (0,189) width 275: "dolor sit amet, consectetuer adipiscing elit."
+ RenderBlock {P} at (0,453) size 367x198
RenderText {#text} at (0,0) size 362x198
text run at (0,0) width 354: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit."
text run at (0,18) width 351: "Nulla varius enim ac mi. Curabitur sollicitudin felis quis"
@@ -333,29 +346,16 @@
text run at (0,144) width 343: "condimentum vestibulum. Suspendisse hendrerit quam"
text run at (0,162) width 362: "nec felis. Sed varius turpis vitae pede. Lorem ipsum dolor"
text run at (0,180) width 229: "sit amet, consectetuer adipiscing elit."
- RenderBlock {P} at (0,444) size 367x198
- RenderText {#text} at (0,0) size 362x198
- text run at (0,0) width 354: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit."
- text run at (0,18) width 351: "Nulla varius enim ac mi. Curabitur sollicitudin felis quis"
- text run at (0,36) width 325: "lectus. Quisque adipiscing rhoncus sem. Proin nulla"
- text run at (0,54) width 358: "purus, vulputate vel, varius ut, euismod et, nisi. Sed vitae"
- text run at (0,72) width 343: "felis vel orci sagittis aliquam. Cras convallis adipiscing"
- text run at (0,90) width 340: "sem. Nam nonummy enim. Nullam bibendum lobortis"
- text run at (0,108) width 344: "neque. Vestibulum velit orci, tempus euismod, pretium"
- text run at (0,126) width 343: "quis, interdum vitae, nulla. Phasellus eget ante et tortor"
- text run at (0,144) width 343: "condimentum vestibulum. Suspendisse hendrerit quam"
- text run at (0,162) width 362: "nec felis. Sed varius turpis vitae pede. Lorem ipsum dolor"
- text run at (0,180) width 229: "sit amet, consectetuer adipiscing elit."
RenderMultiColumnSpannerPlaceholder at (0,658) size 0x0
-layer at (8,2935) size 760x452
- RenderBlock {DIV} at (0,2919) size 760x452 [border: (5px solid #800000)]
+layer at (8,2962) size 760x452
+ RenderBlock {DIV} at (0,2946) size 760x452 [border: (5px solid #800000)]
RenderMultiColumnSet at (5,5) size 750x222
RenderBlock {H2} at (5,246) size 750x57 [bgcolor=#EEEEEE]
RenderText {#text} at (0,0) size 741x56
text run at (0,0) width 741: "This is a spanning element in the middle of the columns block with block"
text run at (0,28) width 83: "siblings."
RenderMultiColumnSet at (5,322) size 750x125
-layer at (13,2940) size 367x666 backgroundClip at (0,0) size 785x3403 clip at (0,0) size 785x3403 outlineClip at (0,0) size 785x3403
+layer at (13,2967) size 367x666 backgroundClip at (0,0) size 785x3430 clip at (0,0) size 785x3430 outlineClip at (0,0) size 785x3430
RenderMultiColumnFlowThread at (5,5) size 367x666
RenderBlock {P} at (0,16) size 367x198
RenderText {#text} at (0,0) size 362x198
Modified: branches/safari-600.5-branch/Source/WebCore/ChangeLog (180657 => 180658)
--- branches/safari-600.5-branch/Source/WebCore/ChangeLog 2015-02-26 05:05:32 UTC (rev 180657)
+++ branches/safari-600.5-branch/Source/WebCore/ChangeLog 2015-02-26 05:12:10 UTC (rev 180658)
@@ -1,5 +1,41 @@
2015-02-25 Dana Burkart <[email protected]>
+ Merged r180364. <rdar://problem/19720096>
+
+ 2015-02-19 David Hyatt <[email protected]>
+
+ Columns are splitting unsplittable content.
+ https://bugs.webkit.org/show_bug.cgi?id=141807
+ <rdar://problem/18387659>
+
+ Reviewed by Dean Jackson.
+
+ Added inline-table-dynamic-movement.html
+
+ * rendering/RenderBlockFlow.cpp:
+ (WebCore::RenderBlockFlow::pageLogicalTopForOffset):
+ (WebCore::RenderBlockFlow::pageLogicalHeightForOffset):
+ Patch these functions to always check the layout state for a zero
+ pageLogicalHeight, since that is actually our indicator that we're
+ doing column balancing and don't have a height set yet.
+
+ * rendering/RenderMultiColumnFlowThread.cpp:
+ (WebCore::RenderMultiColumnFlowThread::isPageLogicalHeightKnown):
+ * rendering/RenderMultiColumnSet.cpp:
+ (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
+ (WebCore::RenderMultiColumnSet::setAndConstrainColumnHeight):
+ (WebCore::RenderMultiColumnSet::prepareForLayout):
+ * rendering/RenderMultiColumnSet.h:
+ The function for deciding whether the logical height of the columns was
+ known was checking for a zero computedColumnHeight. However, a column set
+ can legitimately compute a zero column height, and with the fix to examine
+ the layout state, this bug was exposed.
+
+ The fix is to add a new variable that caches whether or not the column height
+ has been computed, so that even if it computes to zero, we aren't fooled.
+
+2015-02-25 Dana Burkart <[email protected]>
+
Merged r180174. <rdar://problem/19947808>
2015-02-16 Zalan Bujtas <[email protected]>
Modified: branches/safari-600.5-branch/Source/WebCore/rendering/RenderBlockFlow.cpp (180657 => 180658)
--- branches/safari-600.5-branch/Source/WebCore/rendering/RenderBlockFlow.cpp 2015-02-26 05:05:32 UTC (rev 180657)
+++ branches/safari-600.5-branch/Source/WebCore/rendering/RenderBlockFlow.cpp 2015-02-26 05:12:10 UTC (rev 180658)
@@ -1859,25 +1859,34 @@
LayoutUnit RenderBlockFlow::pageLogicalTopForOffset(LayoutUnit offset) const
{
+ // Unsplittable objects clear out the pageLogicalHeight in the layout state as a way of signaling that no
+ // pagination should occur. Therefore we have to check this first and bail if the value has been set to 0.
+ LayoutUnit pageLogicalHeight = view().layoutState()->m_pageLogicalHeight;
+ if (!pageLogicalHeight)
+ return 0;
+
LayoutUnit firstPageLogicalTop = isHorizontalWritingMode() ? view().layoutState()->m_pageOffset.height() : view().layoutState()->m_pageOffset.width();
LayoutUnit blockLogicalTop = isHorizontalWritingMode() ? view().layoutState()->m_layoutOffset.height() : view().layoutState()->m_layoutOffset.width();
LayoutUnit cumulativeOffset = offset + blockLogicalTop;
RenderFlowThread* flowThread = flowThreadContainingBlock();
- if (!flowThread) {
- LayoutUnit pageLogicalHeight = view().layoutState()->pageLogicalHeight();
- if (!pageLogicalHeight)
- return 0;
+ if (!flowThread)
return cumulativeOffset - roundToInt(cumulativeOffset - firstPageLogicalTop) % roundToInt(pageLogicalHeight);
- }
return firstPageLogicalTop + flowThread->pageLogicalTopForOffset(cumulativeOffset - firstPageLogicalTop);
}
LayoutUnit RenderBlockFlow::pageLogicalHeightForOffset(LayoutUnit offset) const
{
+ // Unsplittable objects clear out the pageLogicalHeight in the layout state as a way of signaling that no
+ // pagination should occur. Therefore we have to check this first and bail if the value has been set to 0.
+ LayoutUnit pageLogicalHeight = view().layoutState()->m_pageLogicalHeight;
+ if (!pageLogicalHeight)
+ return 0;
+
+ // Now check for a flow thread.
RenderFlowThread* flowThread = flowThreadContainingBlock();
if (!flowThread)
- return view().layoutState()->m_pageLogicalHeight;
+ return pageLogicalHeight;
return flowThread->pageLogicalHeightForOffset(offset + offsetFromLogicalTopOfFirstPage());
}
Modified: branches/safari-600.5-branch/Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp (180657 => 180658)
--- branches/safari-600.5-branch/Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp 2015-02-26 05:05:32 UTC (rev 180657)
+++ branches/safari-600.5-branch/Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp 2015-02-26 05:12:10 UTC (rev 180658)
@@ -766,7 +766,7 @@
bool RenderMultiColumnFlowThread::isPageLogicalHeightKnown() const
{
if (RenderMultiColumnSet* columnSet = lastMultiColumnSet())
- return columnSet->computedColumnHeight();
+ return columnSet->columnHeightComputed();
return false;
}
Modified: branches/safari-600.5-branch/Source/WebCore/rendering/RenderMultiColumnSet.cpp (180657 => 180658)
--- branches/safari-600.5-branch/Source/WebCore/rendering/RenderMultiColumnSet.cpp 2015-02-26 05:05:32 UTC (rev 180657)
+++ branches/safari-600.5-branch/Source/WebCore/rendering/RenderMultiColumnSet.cpp 2015-02-26 05:12:10 UTC (rev 180658)
@@ -42,6 +42,7 @@
, m_computedColumnWidth(0)
, m_computedColumnHeight(0)
, m_availableColumnHeight(0)
+ , m_columnHeightComputed(false)
, m_maxColumnHeight(RenderFlowThread::maxLogicalHeight())
, m_minSpaceShortage(RenderFlowThread::maxLogicalHeight())
, m_minimumColumnHeight(0)
@@ -168,6 +169,9 @@
if (pageLength)
m_computedColumnHeight = pageLength;
}
+
+ m_columnHeightComputed = true;
+
// FIXME: the height may also be affected by the enclosing pagination context, if any.
}
@@ -341,6 +345,7 @@
if (initial) {
m_computedColumnHeight = 0;
m_availableColumnHeight = 0;
+ m_columnHeightComputed = false;
}
} else
setAndConstrainColumnHeight(heightAdjustedForSetOffset(multiColumnFlowThread()->columnHeightAvailable()));
Modified: branches/safari-600.5-branch/Source/WebCore/rendering/RenderMultiColumnSet.h (180657 => 180658)
--- branches/safari-600.5-branch/Source/WebCore/rendering/RenderMultiColumnSet.h 2015-02-26 05:05:32 UTC (rev 180657)
+++ branches/safari-600.5-branch/Source/WebCore/rendering/RenderMultiColumnSet.h 2015-02-26 05:12:10 UTC (rev 180658)
@@ -72,6 +72,7 @@
unsigned computedColumnCount() const { return m_computedColumnCount; }
LayoutUnit computedColumnWidth() const { return m_computedColumnWidth; }
LayoutUnit computedColumnHeight() const { return m_computedColumnHeight; }
+ bool columnHeightComputed() const { return m_columnHeightComputed; }
void setComputedColumnWidthAndCount(LayoutUnit width, unsigned count)
{
@@ -191,7 +192,8 @@
LayoutUnit m_computedColumnWidth; // Used column width (the resulting 'W' from the pseudo-algorithm in the multicol spec)
LayoutUnit m_computedColumnHeight;
LayoutUnit m_availableColumnHeight;
-
+ bool m_columnHeightComputed;
+
// The following variables are used when balancing the column set.
LayoutUnit m_maxColumnHeight; // Maximum column height allowed.
LayoutUnit m_minSpaceShortage; // The smallest amout of space shortage that caused a column break.
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
