Title: [164649] trunk
- Revision
- 164649
- Author
- [email protected]
- Date
- 2014-02-25 08:10:08 -0800 (Tue, 25 Feb 2014)
Log Message
[New Multicolumn] -webkit-column-break-inside:avoid doesn't work
https://bugs.webkit.org/show_bug.cgi?id=129299
Patch by Morten Stenshorne <[email protected]> on 2014-02-25
Reviewed by Andrei Bucur.
Source/WebCore:
adjustForUnsplittableChild() simply forgot to check whether we
were inside flow thread based multicol.
Test: fast/multicol/newmulticol/avoid-column-break-inside.html
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustForUnsplittableChild):
LayoutTests:
* fast/multicol/newmulticol/avoid-column-break-inside-expected.html: Added.
* fast/multicol/newmulticol/avoid-column-break-inside.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (164648 => 164649)
--- trunk/LayoutTests/ChangeLog 2014-02-25 15:08:18 UTC (rev 164648)
+++ trunk/LayoutTests/ChangeLog 2014-02-25 16:10:08 UTC (rev 164649)
@@ -1,3 +1,13 @@
+2014-02-25 Morten Stenshorne <[email protected]>
+
+ [New Multicolumn] -webkit-column-break-inside:avoid doesn't work
+ https://bugs.webkit.org/show_bug.cgi?id=129299
+
+ Reviewed by Andrei Bucur.
+
+ * fast/multicol/newmulticol/avoid-column-break-inside-expected.html: Added.
+ * fast/multicol/newmulticol/avoid-column-break-inside.html: Added.
+
2014-02-25 Grzegorz Czajkowski <[email protected]>
Refactoring inline_spelling_markers.html to use asynchronous spellchecking
Added: trunk/LayoutTests/fast/multicol/newmulticol/avoid-column-break-inside-expected.html (0 => 164649)
--- trunk/LayoutTests/fast/multicol/newmulticol/avoid-column-break-inside-expected.html (rev 0)
+++ trunk/LayoutTests/fast/multicol/newmulticol/avoid-column-break-inside-expected.html 2014-02-25 16:10:08 UTC (rev 164649)
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Avoid column break inside block</title>
+ </head>
+ <body>
+ <p>There should be a blue square below.</p>
+ <div style="width:100px; height:100px; background:blue;"></div>
+ </body>
+</html>
Added: trunk/LayoutTests/fast/multicol/newmulticol/avoid-column-break-inside.html (0 => 164649)
--- trunk/LayoutTests/fast/multicol/newmulticol/avoid-column-break-inside.html (rev 0)
+++ trunk/LayoutTests/fast/multicol/newmulticol/avoid-column-break-inside.html 2014-02-25 16:10:08 UTC (rev 164649)
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Avoid column break inside block</title>
+ <script>
+ if (window.internals)
+ internals.settings.setRegionBasedColumnsEnabled(true);
+ </script>
+ </head>
+ <body>
+ <p>There should be a blue square below.</p>
+ <div style="-webkit-columns:4; columns:4;">
+ <div style="width:100px; height:100px; -webkit-column-break-inside:avoid; break-inside:avoid; background:blue;"></div>
+ </div>
+ </body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (164648 => 164649)
--- trunk/Source/WebCore/ChangeLog 2014-02-25 15:08:18 UTC (rev 164648)
+++ trunk/Source/WebCore/ChangeLog 2014-02-25 16:10:08 UTC (rev 164649)
@@ -1,3 +1,18 @@
+2014-02-25 Morten Stenshorne <[email protected]>
+
+ [New Multicolumn] -webkit-column-break-inside:avoid doesn't work
+ https://bugs.webkit.org/show_bug.cgi?id=129299
+
+ Reviewed by Andrei Bucur.
+
+ adjustForUnsplittableChild() simply forgot to check whether we
+ were inside flow thread based multicol.
+
+ Test: fast/multicol/newmulticol/avoid-column-break-inside.html
+
+ * rendering/RenderBlockFlow.cpp:
+ (WebCore::RenderBlockFlow::adjustForUnsplittableChild):
+
2014-02-25 Mihnea Ovidenie <[email protected]>
[CSSRegions] Remove unused function RenderFlowThread::regionForCompositedLayer
Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (164648 => 164649)
--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2014-02-25 15:08:18 UTC (rev 164648)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2014-02-25 16:10:08 UTC (rev 164649)
@@ -1692,9 +1692,10 @@
LayoutUnit RenderBlockFlow::adjustForUnsplittableChild(RenderBox& child, LayoutUnit logicalOffset, bool includeMargins)
{
- bool checkColumnBreaks = view().layoutState()->isPaginatingColumns();
+ RenderFlowThread* flowThread = flowThreadContainingBlock();
+ bool isInsideMulticolFlowThread = flowThread && !flowThread->isRenderNamedFlowThread();
+ bool checkColumnBreaks = isInsideMulticolFlowThread || view().layoutState()->isPaginatingColumns();
bool checkPageBreaks = !checkColumnBreaks && view().layoutState()->m_pageLogicalHeight;
- RenderFlowThread* flowThread = flowThreadContainingBlock();
bool checkRegionBreaks = flowThread && flowThread->isRenderNamedFlowThread();
bool isUnsplittable = child.isUnsplittableForPagination() || (checkColumnBreaks && child.style().columnBreakInside() == PBAVOID)
|| (checkPageBreaks && child.style().pageBreakInside() == PBAVOID)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes