Title: [108528] trunk
Revision
108528
Author
[email protected]
Date
2012-02-22 11:37:26 -0800 (Wed, 22 Feb 2012)

Log Message

REGRESSION (r62632): page-break-inside: avoid is ignored
https://bugs.webkit.org/show_bug.cgi?id=79262

Reviewed by Adele Peterson.

Source/WebCore: 

This was disabled in r62632 because of <http://webkit.org/b/41532>. Changes to the
pagination code since then have invalidated that bug, so enabling the feature again does not
re-introduce the bug.

Updated expected results for printing/page-break-inside-avoid.html.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::adjustForUnsplittableChild):

LayoutTests: 

* printing/page-break-inside-avoid-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (108527 => 108528)


--- trunk/LayoutTests/ChangeLog	2012-02-22 19:20:33 UTC (rev 108527)
+++ trunk/LayoutTests/ChangeLog	2012-02-22 19:37:26 UTC (rev 108528)
@@ -1,3 +1,12 @@
+2012-02-22  Dan Bernstein  <[email protected]>
+
+        REGRESSION (r62632): page-break-inside: avoid is ignored
+        https://bugs.webkit.org/show_bug.cgi?id=79262
+
+        Reviewed by Adele Peterson.
+
+        * printing/page-break-inside-avoid-expected.txt:
+
 2012-02-22  Adrienne Walker  <[email protected]>
 
         [chromium] Unreviewed gardening. Mark some XHR tests as asserting.

Modified: trunk/LayoutTests/printing/page-break-inside-avoid-expected.txt (108527 => 108528)


--- trunk/LayoutTests/printing/page-break-inside-avoid-expected.txt	2012-02-22 19:20:33 UTC (rev 108527)
+++ trunk/LayoutTests/printing/page-break-inside-avoid-expected.txt	2012-02-22 19:37:26 UTC (rev 108528)
@@ -8,12 +8,13 @@
 PASS: page number of "page1-2" is 1
 PASS: page number of "page2" is 2
 PASS: page number of "page3" is 3
-FAIL: expected page number of "page4" is 4. Was 3
+PASS: page number of "page4" is 4
 PASS: page number of "page5" is 5
 PASS: page number of "page8" is 8
 PASS: page number of "page9-1" is 9
 PASS: page number of "page9-2" is 9
 PASS: page number of "page10" is 10
+All tests passed
 
 PASS successfullyParsed is true
 

Modified: trunk/Source/WebCore/ChangeLog (108527 => 108528)


--- trunk/Source/WebCore/ChangeLog	2012-02-22 19:20:33 UTC (rev 108527)
+++ trunk/Source/WebCore/ChangeLog	2012-02-22 19:37:26 UTC (rev 108528)
@@ -1,3 +1,19 @@
+2012-02-22  Dan Bernstein  <[email protected]>
+
+        REGRESSION (r62632): page-break-inside: avoid is ignored
+        https://bugs.webkit.org/show_bug.cgi?id=79262
+
+        Reviewed by Adele Peterson.
+
+        This was disabled in r62632 because of <http://webkit.org/b/41532>. Changes to the
+        pagination code since then have invalidated that bug, so enabling the feature again does not
+        re-introduce the bug.
+
+        Updated expected results for printing/page-break-inside-avoid.html.
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::adjustForUnsplittableChild):
+
 2012-02-22  Philippe Normand  <[email protected]>
 
         [GStreamer] webkitwebsrc: use HTTP referer provided by MediaPlayer
@@ -4262,7 +4278,7 @@
 
 2012-02-19  James Robinson  <[email protected]>
 
-        Sort WebCore XCode project files with sort-Xcode-project-files script. Unreviewed.
+        Sort WebCore Xcode project files with sort-Xcode-project-files script. Unreviewed.
 
         * WebCore.xcodeproj/project.pbxproj:
 

Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (108527 => 108528)


--- trunk/Source/WebCore/rendering/RenderBlock.cpp	2012-02-22 19:20:33 UTC (rev 108527)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp	2012-02-22 19:37:26 UTC (rev 108528)
@@ -6584,8 +6584,12 @@
 
 LayoutUnit RenderBlock::adjustForUnsplittableChild(RenderBox* child, LayoutUnit logicalOffset, bool includeMargins)
 {
-    bool isUnsplittable = child->isUnsplittableForPagination() || child->style()->columnBreakInside() == PBAVOID
-        || child->style()->regionBreakInside() == PBAVOID;
+    bool checkColumnBreaks = view()->layoutState()->isPaginatingColumns();
+    bool checkPageBreaks = !checkColumnBreaks && view()->layoutState()->m_pageLogicalHeight;
+    bool checkRegionBreaks = inRenderFlowThread();
+    bool isUnsplittable = child->isUnsplittableForPagination() || (checkColumnBreaks && child->style()->columnBreakInside() == PBAVOID)
+        || (checkPageBreaks && child->style()->pageBreakInside() == PBAVOID)
+        || (checkRegionBreaks && child->style()->regionBreakInside() == PBAVOID);
     if (!isUnsplittable)
         return logicalOffset;
     LayoutUnit childLogicalHeight = logicalHeightForChild(child) + (includeMargins ? marginBeforeForChild(child) + marginAfterForChild(child) : zeroLayoutUnit);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to