[Webkit-unassigned] [Bug 5097] CSS2: page-break-after does not work

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 27 04:38:21 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=5097


Christophe Saout <christophe at saout.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |christophe at saout.de




--- Comment #17 from Christophe Saout <christophe at saout.de>  2011-04-27 04:38:21 PST ---
"Trivial" to fix in the new printing code:

--- a/Source/WebCore/rendering/RenderBlock.cpp
+++ b/Source/WebCore/rendering/RenderBlock.cpp
@@ -5952,7 +5952,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);

(at least that works fore me, might need some more sanity checks)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list