Created attachment 295088 [details] A simple file with long content and 'columns: 10em' on the <body> The 'columns' property works differently on the <body> element than on other elements. In particular, it makes short columns and causes overflow to the right, as if a small 'height' was set on the body.
Created attachment 295089 [details] A similar file, but with the content in a <div> and the 'columns: 10em' on the <div>
*** Bug 165667 has been marked as a duplicate of this bug. ***
->working case with <div> (B)lock/(I)nline/I(N)line-block, (A)bsolute/Fi(X)ed/(R)elative/Stic(K)y, (F)loating, (O)verflow clip, Anon(Y)mous, (G)enerated, has(L)ayer, (C)omposited, (+)Dirty style, (+)Dirty layout B---YGL- --* RenderView (0.00, 0.00) (252.00, 584.00) renderer->(0x1107809c0) B-----L- -- HTML RenderBlock (0.00, 0.00) (252.00, 880.00) renderer->(0x122fe1000) node->(0x12316d888) B------- -- BODY RenderBody (8.00, 8.00) (236.00, 864.00) renderer->(0x122fe1e38) node->(0x12316d958) B-----L- -- DIV RenderBlock (0.00, 0.00) (236.00, 864.00) renderer->(0x122fe1af0) node->(0x12316d9c0) B---YGL- -- RenderMultiColumnFlowThread (0.00, 0.00) (236.00, 864.00) renderer->(0x11076adc0) [Rs:0x123160000 Re:0x123160000] B---YG-- -- RenderMultiColumnSet (0.00, 0.00) (236.00, 864.00) renderer->(0x123160000) ->failing case with <body> (B)lock/(I)nline/I(N)line-block, (A)bsolute/Fi(X)ed/(R)elative/Stic(K)y, (F)loating, (O)verflow clip, Anon(Y)mous, (G)enerated, has(L)ayer, (C)omposited, (+)Dirty style, (+)Dirty layout B---YGL- --* RenderView (0.00, 0.00) (252.00, 584.00) renderer->(0x110763a00) B-----L- -- HTML RenderBlock (0.00, 0.00) (252.00, 584.00) renderer->(0x10e2dac08) node->(0x12316d208) B-----L- -- BODY RenderBody (8.00, 8.00) (236.00, 568.00) renderer->(0x10e2da7a8) node->(0x12316d2d8) B---YGL- -- RenderMultiColumnFlowThread (0.00, 0.00) (236.00, 874.00) renderer->(0x11076b600) [Rs:0x1231601a0 Re:0x1231601a0] B---YG-- -- RenderMultiColumnSet (0.00, 0.00) (236.00, 568.00) renderer->(0x1231601a0) The column set's height is incorrect when the body owns the flowthread -> horizontal scrolling.
When the <div> owns the flowthread, no height constraint is set (setColumnHeightAvailable) while in case of <body> we set the viewport as the height constraint -> column split. When the height constraint is not set, the <body> cases works fine. -it also fixes the https://www.w3.org/Style/CSS/Planet/ case; bug 165666.
*** Bug 165666 has been marked as a duplicate of this bug. ***
Created attachment 296853 [details] Patch
Comment on attachment 296853 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=296853&action=review > Source/WebCore/rendering/RenderBlockFlow.cpp:3934 > + std::optional<LayoutUnit> newColumnHeight; The code below uses 0 when this is not set. So I think this can just be LayoutUnit and initialized to 0. The code isn’t better using an optional. > Source/WebCore/rendering/RenderBlockFlow.cpp:3937 > + LogicalExtentComputedValues computedValues; > + computeLogicalHeight(LayoutUnit(), logicalTop(), computedValues); Not new, but seems like this we should change this function to use a return value instead of an out argument.
Created attachment 296926 [details] Patch
(In reply to comment #7) > Comment on attachment 296853 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=296853&action=review > > > Source/WebCore/rendering/RenderBlockFlow.cpp:3934 > > + std::optional<LayoutUnit> newColumnHeight; > > The code below uses 0 when this is not set. So I think this can just be > LayoutUnit and initialized to 0. The code isn’t better using an optional. Done. > > > Source/WebCore/rendering/RenderBlockFlow.cpp:3937 > > + LogicalExtentComputedValues computedValues; > > + computeLogicalHeight(LayoutUnit(), logicalTop(), computedValues); > > Not new, but seems like this we should change this function to use a return > value instead of an out argument. Good point. I'll address it in a separate patch.
Comment on attachment 296926 [details] Patch Clearing flags on attachment: 296926 Committed r209719: <http://trac.webkit.org/changeset/209719>
All reviewed patches have been landed. Closing bug.
Thanks!