Implement "page-break-inside: avoid" for non-floating block elements.

This patch is taken from https://bugs.webkit.org/show_bug.cgi?id=5097#c17

It was originally part of PR #211 but was possibly overlooked in PR #344
(when the other two patches got reapplied after the QT source import).
1.x
Ashish Kulkarni 2013-12-20 16:36:59 +05:30 committed by Ariya Hidayat
parent 6b45113cfe
commit 3ed2f68909
1 changed files with 2 additions and 1 deletions

View File

@ -6054,7 +6054,8 @@ int RenderBlock::applyAfterBreak(RenderBox* child, int logicalOffset, MarginInfo
int RenderBlock::adjustForUnsplittableChild(RenderBox* child, int logicalOffset, bool includeMargins)
{
bool isUnsplittable = child->isReplaced() || child->scrollsOverflow();
bool isUnsplittable = child->isReplaced() || child->scrollsOverflow() ||
child->style()->pageBreakInside() == PBAVOID;
if (!isUnsplittable)
return logicalOffset;
int childLogicalHeight = logicalHeightForChild(child) + (includeMargins ? marginBeforeForChild(child) + marginAfterForChild(child) : 0);