Title: [97289] trunk/Source/WebCore
Revision
97289
Author
[email protected]
Date
2011-10-12 12:45:23 -0700 (Wed, 12 Oct 2011)

Log Message

https://bugs.webkit.org/show_bug.cgi?id=69950
        
REGRESSION: Printing broken because of the isWritingModeRoot addition for unsplittable
paginated content. Make sure not to include the RenderView when checking for writing mode
roots. We only care about children that differ from their parents.

Reviewed by Dimitri Glazkov.

* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::adjustForUnsplittableChild):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::isUnsplittableForPagination):
* rendering/RenderBox.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (97288 => 97289)


--- trunk/Source/WebCore/ChangeLog	2011-10-12 19:41:18 UTC (rev 97288)
+++ trunk/Source/WebCore/ChangeLog	2011-10-12 19:45:23 UTC (rev 97289)
@@ -1,3 +1,21 @@
+2011-10-12  David Hyatt  <[email protected]>
+
+        https://bugs.webkit.org/show_bug.cgi?id=69950
+        
+        REGRESSION: Printing broken because of the isWritingModeRoot addition for unsplittable
+        paginated content. Make sure not to include the RenderView when checking for writing mode
+        roots. We only care about children that differ from their parents.
+
+        Reviewed by Dimitri Glazkov.
+
+        * rendering/LayoutState.cpp:
+        (WebCore::LayoutState::LayoutState):
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::adjustForUnsplittableChild):
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::isUnsplittableForPagination):
+        * rendering/RenderBox.h:
+
 2011-10-12  Anna Cavender  <[email protected]>
 
         Moving ScriptExecutionContext to the front of the argument list for

Modified: trunk/Source/WebCore/rendering/LayoutState.cpp (97288 => 97289)


--- trunk/Source/WebCore/rendering/LayoutState.cpp	2011-10-12 19:41:18 UTC (rev 97288)
+++ trunk/Source/WebCore/rendering/LayoutState.cpp	2011-10-12 19:45:23 UTC (rev 97289)
@@ -96,7 +96,7 @@
         
         // Disable pagination for objects we don't support. For now this includes overflow:scroll/auto, inline blocks and
         // writing mode roots.
-        if (renderer->isReplaced() || renderer->hasUnsplittableScrollingOverflow() || renderer->isWritingModeRoot())
+        if (renderer->isUnsplittableForPagination())
             m_pageLogicalHeight = 0;
     }
     

Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (97288 => 97289)


--- trunk/Source/WebCore/rendering/RenderBlock.cpp	2011-10-12 19:41:18 UTC (rev 97288)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp	2011-10-12 19:45:23 UTC (rev 97289)
@@ -6270,8 +6270,8 @@
 
 LayoutUnit RenderBlock::adjustForUnsplittableChild(RenderBox* child, LayoutUnit logicalOffset, bool includeMargins)
 {
-    bool isUnsplittable = child->isReplaced() || child->hasUnsplittableScrollingOverflow() || child->isWritingModeRoot()
-        || child->style()->columnBreakInside() == PBAVOID || child->style()->regionBreakInside() == PBAVOID;
+    bool isUnsplittable = child->isUnsplittableForPagination() || child->style()->columnBreakInside() == PBAVOID
+        || child->style()->regionBreakInside() == PBAVOID;
     if (!isUnsplittable)
         return logicalOffset;
     LayoutUnit childLogicalHeight = logicalHeightForChild(child) + (includeMargins ? marginBeforeForChild(child) + marginAfterForChild(child) : 0);

Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (97288 => 97289)


--- trunk/Source/WebCore/rendering/RenderBox.cpp	2011-10-12 19:41:18 UTC (rev 97288)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp	2011-10-12 19:45:23 UTC (rev 97289)
@@ -3690,6 +3690,11 @@
         || (!style()->logicalMinHeight().isIntrinsicOrAuto() && style()->logicalMinHeight().isPositive() && (!style()->logicalMinHeight().isPercent() || percentageLogicalHeightIsResolvable(this)));
 }
 
+bool RenderBox::isUnsplittableForPagination() const
+{
+    return isReplaced() || hasUnsplittableScrollingOverflow() || (parent() && isWritingModeRoot());
+}
+
 LayoutUnit RenderBox::lineHeight(bool /*firstLine*/, LineDirectionMode direction, LinePositionMode /*linePositionMode*/) const
 {
     if (isReplaced())

Modified: trunk/Source/WebCore/rendering/RenderBox.h (97288 => 97289)


--- trunk/Source/WebCore/rendering/RenderBox.h	2011-10-12 19:41:18 UTC (rev 97288)
+++ trunk/Source/WebCore/rendering/RenderBox.h	2011-10-12 19:45:23 UTC (rev 97289)
@@ -355,7 +355,9 @@
     bool scrollsOverflow() const { return scrollsOverflowX() || scrollsOverflowY(); }
     bool scrollsOverflowX() const { return hasOverflowClip() && (style()->overflowX() == OSCROLL || hasAutoHorizontalScrollbar()); }
     bool scrollsOverflowY() const { return hasOverflowClip() && (style()->overflowY() == OSCROLL || hasAutoVerticalScrollbar()); }
+    
     bool hasUnsplittableScrollingOverflow() const;
+    bool isUnsplittableForPagination() const;
 
     virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* extraWidthToEndOfLine = 0);
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to