Created attachment 230892 [details] Repro See the attachment. The green background should not have been painted in the second region.
Further findings: - if the child element is display:inline-block, the second region contains a part of the element's parent with a height equal to the height of the child element that is overflowing the first region. If the parent contains another child after the first one, this second child will NOT be painted at the top of the second region - INCORRECT BEHAVIOR - if the child element is display:block, the parent is not painted in the second region unless it has another child, after the first one. If it does, the second child is painted started at the top of the second region - CORRECT BEHAVIOR
Created attachment 231573 [details] Patch
Comment on attachment 231573 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=231573&action=review > Source/WebCore/rendering/RenderBlockLineLayout.cpp:723 > + if (view().layoutState() && view().layoutState()->isPaginated()) { It should probably be best if this was a helper method on RenderBlockFlow with the line box as a parameter. > Source/WebCore/rendering/RenderBlockLineLayout.cpp:726 > + if (firstRun && firstRun->renderer().isBox() && toRenderBox(firstRun->renderer()).isUnsplittableForPagination()) { What about cases when the line is really big (e.g. there's a span on the line with a large font-size)? Anything placed on a line is unsplittable because the line is unsplittable. I don't think having a box on the line is necessary to trigger this "pull up" condition. > Source/WebCore/rendering/RenderBlockLineLayout.cpp:727 > + LayoutUnit lineLogicalTop = logicalTopForChild(toRenderBox(firstRun->renderer())); Here you should use the information computed by the RootInlineBox::alignBoxesInBlockDirection function. That function places the line inside the RenderBlockFlow so after it is called you can use lineBox->logicalTop().
Created attachment 231726 [details] Patch v2
Created attachment 231757 [details] Patch v2 with slight improvement
Comment on attachment 231757 [details] Patch v2 with slight improvement r=me
Comment on attachment 231757 [details] Patch v2 with slight improvement Clearing flags on attachment: 231757 Committed r169110: <http://trac.webkit.org/changeset/169110>
All reviewed patches have been landed. Closing bug.