Title: [118808] trunk/Source/WebCore
Revision
118808
Author
[email protected]
Date
2012-05-29 11:15:03 -0700 (Tue, 29 May 2012)

Log Message

https://bugs.webkit.org/show_bug.cgi?id=87759
        
Pull the initial page logical height checking for columns into its own separate function. This
will allow the derived RenderMultiColumnBlock class to do its own setup there. It also has the
effect of cleaning up layoutBlock even for the existing code.

Reviewed by Anders Carlsson.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::checkForPaginationLogicalHeightChange):
(WebCore):
(WebCore::RenderBlock::layoutBlock):
* rendering/RenderBlock.h:
(RenderBlock):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (118807 => 118808)


--- trunk/Source/WebCore/ChangeLog	2012-05-29 18:13:07 UTC (rev 118807)
+++ trunk/Source/WebCore/ChangeLog	2012-05-29 18:15:03 UTC (rev 118808)
@@ -1,3 +1,20 @@
+2012-05-29  David Hyatt  <[email protected]>
+
+        https://bugs.webkit.org/show_bug.cgi?id=87759
+        
+        Pull the initial page logical height checking for columns into its own separate function. This
+        will allow the derived RenderMultiColumnBlock class to do its own setup there. It also has the
+        effect of cleaning up layoutBlock even for the existing code.
+
+        Reviewed by Anders Carlsson.
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::checkForPaginationLogicalHeightChange):
+        (WebCore):
+        (WebCore::RenderBlock::layoutBlock):
+        * rendering/RenderBlock.h:
+        (RenderBlock):
+
 2012-05-29  Victor Carbune  <[email protected]>
 
         Update cue event dispatching for zero and negative duration cues

Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (118807 => 118808)


--- trunk/Source/WebCore/rendering/RenderBlock.cpp	2012-05-29 18:13:07 UTC (rev 118807)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp	2012-05-29 18:15:03 UTC (rev 118808)
@@ -1364,29 +1364,8 @@
     return oldWidth != logicalWidth() || oldColumnWidth != desiredColumnWidth();
 }
 
-void RenderBlock::layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight)
+void RenderBlock::checkForPaginationLogicalHeightChange(LayoutUnit& pageLogicalHeight, bool& pageLogicalHeightChanged, bool& hasSpecifiedPageLogicalHeight)
 {
-    ASSERT(needsLayout());
-
-    if (isInline() && !isInlineBlockOrInlineTable()) // Inline <form>s inside various table elements can
-        return;                                      // cause us to come in here.  Just bail.
-
-    if (!relayoutChildren && simplifiedLayout())
-        return;
-
-    LayoutRepainter repainter(*this, everHadLayout() && checkForRepaintDuringLayout());
-
-    if (recomputeLogicalWidth())
-        relayoutChildren = true;
-
-    m_overflow.clear();
-
-    clearFloats();
-
-    LayoutUnit previousHeight = logicalHeight();
-    setLogicalHeight(ZERO_LAYOUT_UNIT);
-    bool hasSpecifiedPageLogicalHeight = false;
-    bool pageLogicalHeightChanged = false;
     ColumnInfo* colInfo = columnInfo();
     if (hasColumns()) {
         if (!pageLogicalHeight) {
@@ -1410,10 +1389,37 @@
 
         colInfo->setPaginationUnit(paginationUnit());
     }
+}
 
+void RenderBlock::layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight)
+{
+    ASSERT(needsLayout());
+
+    if (isInline() && !isInlineBlockOrInlineTable()) // Inline <form>s inside various table elements can
+        return;                                      // cause us to come in here.  Just bail.
+
+    if (!relayoutChildren && simplifiedLayout())
+        return;
+
+    LayoutRepainter repainter(*this, everHadLayout() && checkForRepaintDuringLayout());
+
+    if (recomputeLogicalWidth())
+        relayoutChildren = true;
+
+    m_overflow.clear();
+
+    clearFloats();
+
+    LayoutUnit previousHeight = logicalHeight();
+    setLogicalHeight(ZERO_LAYOUT_UNIT);
+
+    bool pageLogicalHeightChanged = false;
+    bool hasSpecifiedPageLogicalHeight = false;
+    checkForPaginationLogicalHeightChange(pageLogicalHeight, pageLogicalHeightChanged, hasSpecifiedPageLogicalHeight);
+
     RenderView* renderView = view();
     RenderStyle* styleToUse = style();
-    LayoutStateMaintainer statePusher(renderView, this, locationOffset(), hasColumns() || hasTransform() || hasReflection() || styleToUse->isFlippedBlocksWritingMode(), pageLogicalHeight, pageLogicalHeightChanged, colInfo);
+    LayoutStateMaintainer statePusher(renderView, this, locationOffset(), hasColumns() || hasTransform() || hasReflection() || styleToUse->isFlippedBlocksWritingMode(), pageLogicalHeight, pageLogicalHeightChanged, columnInfo());
 
     if (inRenderFlowThread()) {
         // Regions changing widths can force us to relayout our children.

Modified: trunk/Source/WebCore/rendering/RenderBlock.h (118807 => 118808)


--- trunk/Source/WebCore/rendering/RenderBlock.h	2012-05-29 18:13:07 UTC (rev 118807)
+++ trunk/Source/WebCore/rendering/RenderBlock.h	2012-05-29 18:15:03 UTC (rev 118808)
@@ -468,6 +468,9 @@
 
     void computeInitialRegionRangeForBlock();
     void computeRegionRangeForBlock();
+    
+    virtual void checkForPaginationLogicalHeightChange(LayoutUnit& pageLogicalHeight, bool& pageLogicalHeightChanged, bool& hasSpecifiedPageLogicalHeight);
+    
 private:
     virtual RenderObjectChildList* virtualChildren() { return children(); }
     virtual const RenderObjectChildList* virtualChildren() const { return children(); }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to