[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

hyatt at apple.com hyatt at apple.com
Wed Dec 22 18:37:22 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 9285815d81c096bda5804182a0ce17d22bf3aeba
Author: hyatt at apple.com <hyatt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Dec 14 19:58:38 2010 +0000

    https://bugs.webkit.org/show_bug.cgi?id=46422
    
    Reviewed by Tim Hatcher.
    
    Rename pageHeight variables and members in WebCore to pageLogicalHeight in preparation for
    making printing and pagination work with vertical writing modes.
    
    * page/FrameView.cpp:
    (WebCore::FrameView::forceLayoutForPagination):
    * rendering/LayoutState.cpp:
    (WebCore::LayoutState::LayoutState):
    (WebCore::LayoutState::clearPaginationInformation):
    * rendering/LayoutState.h:
    (WebCore::LayoutState::LayoutState):
    (WebCore::LayoutState::isPaginated):
    (WebCore::LayoutState::pageLogicalHeight):
    (WebCore::LayoutState::pageLogicalHeightChanged):
    * rendering/RenderBlock.cpp:
    (WebCore::RenderBlock::layoutBlock):
    (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
    (WebCore::RenderBlock::insertFloatingObject):
    (WebCore::RenderBlock::layoutColumns):
    (WebCore::RenderBlock::nextPageTop):
    (WebCore::RenderBlock::applyBeforeBreak):
    (WebCore::RenderBlock::applyAfterBreak):
    (WebCore::RenderBlock::adjustForUnsplittableChild):
    (WebCore::RenderBlock::adjustLinePositionForPagination):
    * rendering/RenderBlock.h:
    * rendering/RenderBox.cpp:
    (WebCore::RenderBox::computeLogicalHeight):
    * rendering/RenderFlexibleBox.cpp:
    (WebCore::RenderFlexibleBox::layoutBlock):
    * rendering/RenderTable.cpp:
    (WebCore::RenderTable::layout):
    * rendering/RenderTableRow.cpp:
    (WebCore::RenderTableRow::layout):
    * rendering/RenderTableSection.cpp:
    (WebCore::RenderTableSection::layoutRows):
    * rendering/RenderView.cpp:
    (WebCore::RenderView::RenderView):
    (WebCore::RenderView::layout):
    * rendering/RenderView.h:
    (WebCore::RenderView::pageLogicalHeight):
    (WebCore::RenderView::setPageLogicalHeight):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74048 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 74b9c5e..bf78f27 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,50 @@
+2010-12-14  David Hyatt  <hyatt at apple.com>
+
+        Reviewed by Tim Hatcher.
+
+        https://bugs.webkit.org/show_bug.cgi?id=46422
+
+        Rename pageHeight variables and members in WebCore to pageLogicalHeight in preparation for
+        making printing and pagination work with vertical writing modes.
+
+        * page/FrameView.cpp:
+        (WebCore::FrameView::forceLayoutForPagination):
+        * rendering/LayoutState.cpp:
+        (WebCore::LayoutState::LayoutState):
+        (WebCore::LayoutState::clearPaginationInformation):
+        * rendering/LayoutState.h:
+        (WebCore::LayoutState::LayoutState):
+        (WebCore::LayoutState::isPaginated):
+        (WebCore::LayoutState::pageLogicalHeight):
+        (WebCore::LayoutState::pageLogicalHeightChanged):
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::layoutBlock):
+        (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
+        (WebCore::RenderBlock::insertFloatingObject):
+        (WebCore::RenderBlock::layoutColumns):
+        (WebCore::RenderBlock::nextPageTop):
+        (WebCore::RenderBlock::applyBeforeBreak):
+        (WebCore::RenderBlock::applyAfterBreak):
+        (WebCore::RenderBlock::adjustForUnsplittableChild):
+        (WebCore::RenderBlock::adjustLinePositionForPagination):
+        * rendering/RenderBlock.h:
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::computeLogicalHeight):
+        * rendering/RenderFlexibleBox.cpp:
+        (WebCore::RenderFlexibleBox::layoutBlock):
+        * rendering/RenderTable.cpp:
+        (WebCore::RenderTable::layout):
+        * rendering/RenderTableRow.cpp:
+        (WebCore::RenderTableRow::layout):
+        * rendering/RenderTableSection.cpp:
+        (WebCore::RenderTableSection::layoutRows):
+        * rendering/RenderView.cpp:
+        (WebCore::RenderView::RenderView):
+        (WebCore::RenderView::layout):
+        * rendering/RenderView.h:
+        (WebCore::RenderView::pageLogicalHeight):
+        (WebCore::RenderView::setPageLogicalHeight):
+
 2010-12-14  Dimitri Glazkov  <dglazkov at chromium.org>
 
         Fix GTK build by adding source files that were accidentally skipped in
diff --git a/WebCore/page/FrameView.cpp b/WebCore/page/FrameView.cpp
index 37049b8..2484860 100644
--- a/WebCore/page/FrameView.cpp
+++ b/WebCore/page/FrameView.cpp
@@ -2231,7 +2231,7 @@ void FrameView::forceLayoutForPagination(const FloatSize& pageSize, float maximu
     if (root) {
         int pageW = ceilf(pageSize.width());
         root->setWidth(pageW);
-        root->setPageHeight(pageSize.height());
+        root->setPageLogicalHeight(pageSize.height());
         root->setNeedsLayoutAndPrefWidthsRecalc();
         forceLayout();
 
@@ -2243,7 +2243,7 @@ void FrameView::forceLayoutForPagination(const FloatSize& pageSize, float maximu
         if (docWidth > pageSize.width()) {
             pageW = std::min<int>(docWidth, ceilf(pageSize.width() * maximumShrinkFactor));
             if (pageSize.height())
-                root->setPageHeight(pageW / pageSize.width() * pageSize.height());
+                root->setPageLogicalHeight(pageW / pageSize.width() * pageSize.height());
             root->setWidth(pageW);
             root->setNeedsLayoutAndPrefWidthsRecalc();
             forceLayout();
diff --git a/WebCore/rendering/LayoutState.cpp b/WebCore/rendering/LayoutState.cpp
index 3eea51f..4091cb9 100644
--- a/WebCore/rendering/LayoutState.cpp
+++ b/WebCore/rendering/LayoutState.cpp
@@ -34,7 +34,7 @@
 
 namespace WebCore {
 
-LayoutState::LayoutState(LayoutState* prev, RenderBox* renderer, const IntSize& offset, int pageHeight, bool pageHeightChanged, ColumnInfo* columnInfo)
+LayoutState::LayoutState(LayoutState* prev, RenderBox* renderer, const IntSize& offset, int pageLogicalHeight, bool pageLogicalHeightChanged, ColumnInfo* columnInfo)
     : m_columnInfo(columnInfo)
     , m_next(prev)
 #ifndef NDEBUG
@@ -82,20 +82,20 @@ LayoutState::LayoutState(LayoutState* prev, RenderBox* renderer, const IntSize&
 
     // If we establish a new page height, then cache the offset to the top of the first page.
     // We can compare this later on to figure out what part of the page we're actually on,
-    if (pageHeight || m_columnInfo) {
-        m_pageHeight = pageHeight;
+    if (pageLogicalHeight || m_columnInfo) {
+        m_pageLogicalHeight = pageLogicalHeight;
         m_pageOffset = IntSize(m_layoutOffset.width() + renderer->borderLeft() + renderer->paddingLeft(),
                                m_layoutOffset.height() + renderer->borderTop() + renderer->paddingTop());
-        m_pageHeightChanged = pageHeightChanged;
+        m_pageLogicalHeightChanged = pageLogicalHeightChanged;
     } else {
         // If we don't establish a new page height, then propagate the old page height and offset down.
-        m_pageHeight = m_next->m_pageHeight;
-        m_pageHeightChanged = m_next->m_pageHeightChanged;
+        m_pageLogicalHeight = m_next->m_pageLogicalHeight;
+        m_pageLogicalHeightChanged = m_next->m_pageLogicalHeightChanged;
         m_pageOffset = m_next->m_pageOffset;
         
         // Disable pagination for objects we don't support.  For now this includes overflow:scroll/auto and inline blocks.
         if (renderer->isReplaced() || renderer->scrollsOverflow())
-            m_pageHeight = 0;
+            m_pageLogicalHeight = 0;
     }
     
     if (!m_columnInfo)
@@ -108,8 +108,8 @@ LayoutState::LayoutState(LayoutState* prev, RenderBox* renderer, const IntSize&
 
 LayoutState::LayoutState(RenderObject* root)
     : m_clipped(false)
-    , m_pageHeight(0)
-    , m_pageHeightChanged(false)
+    , m_pageLogicalHeight(0)
+    , m_pageLogicalHeightChanged(false)
     , m_columnInfo(0)
     , m_next(0)
 #ifndef NDEBUG
@@ -157,7 +157,7 @@ void LayoutState::operator delete(void* ptr, size_t sz)
 
 void LayoutState::clearPaginationInformation()
 {
-    m_pageHeight = m_next->m_pageHeight;
+    m_pageLogicalHeight = m_next->m_pageLogicalHeight;
     m_pageOffset = m_next->m_pageOffset;
     m_columnInfo = m_next->m_columnInfo;
 }
diff --git a/WebCore/rendering/LayoutState.h b/WebCore/rendering/LayoutState.h
index cca3e42..65ce37c 100644
--- a/WebCore/rendering/LayoutState.h
+++ b/WebCore/rendering/LayoutState.h
@@ -41,8 +41,8 @@ class LayoutState : public Noncopyable {
 public:
     LayoutState()
         : m_clipped(false)
-        , m_pageHeight(0)
-        , m_pageHeightChanged(false)
+        , m_pageLogicalHeight(0)
+        , m_pageLogicalHeightChanged(false)
         , m_columnInfo(0)
         , m_next(0)
 #ifndef NDEBUG
@@ -64,12 +64,12 @@ public:
 
     void clearPaginationInformation();
     bool isPaginatingColumns() const { return m_columnInfo; }
-    bool isPaginated() const { return m_pageHeight || m_columnInfo; }
+    bool isPaginated() const { return m_pageLogicalHeight || m_columnInfo; }
     int pageY(int childY) const;
     void addForcedColumnBreak(int childY);
     
-    bool pageHeight() const { return m_pageHeight; }
-    bool pageHeightChanged() const { return m_pageHeightChanged; }
+    bool pageLogicalHeight() const { return m_pageLogicalHeight; }
+    bool pageLogicalHeightChanged() const { return m_pageLogicalHeightChanged; }
 
 private:
     // The normal operator new is disallowed.
@@ -84,8 +84,8 @@ public:
                            // used to ensure that repaints happen in the correct place.
                            // This is a total delta accumulated from the root.
 
-    int m_pageHeight; // The current page height for the pagination model that encloses us.
-    bool m_pageHeightChanged; // If our page height has changed, this will force all blocks to relayout.
+    int m_pageLogicalHeight; // The current page height for the pagination model that encloses us.
+    bool m_pageLogicalHeightChanged; // If our page height has changed, this will force all blocks to relayout.
     IntSize m_pageOffset; // The offset of the start of the first page in the nearest enclosing pagination model.
     ColumnInfo* m_columnInfo; // If the enclosing pagination model is a column model, then this will store column information for easy retrieval/manipulation.
 
diff --git a/WebCore/rendering/RenderBlock.cpp b/WebCore/rendering/RenderBlock.cpp
index 436def9..78a92a8 100644
--- a/WebCore/rendering/RenderBlock.cpp
+++ b/WebCore/rendering/RenderBlock.cpp
@@ -1109,7 +1109,7 @@ void RenderBlock::layout()
         clearLayoutOverflow();
 }
 
-void RenderBlock::layoutBlock(bool relayoutChildren, int pageHeight)
+void RenderBlock::layoutBlock(bool relayoutChildren, int pageLogicalHeight)
 {
     ASSERT(needsLayout());
 
@@ -1136,31 +1136,31 @@ void RenderBlock::layoutBlock(bool relayoutChildren, int pageHeight)
 
     int previousHeight = logicalHeight();
     setLogicalHeight(0);
-    bool hasSpecifiedPageHeight = false;
-    bool pageHeightChanged = false;
+    bool hasSpecifiedPageLogicalHeight = false;
+    bool pageLogicalHeightChanged = false;
     ColumnInfo* colInfo = columnInfo();
     if (hasColumns()) {
-        if (!pageHeight) {
+        if (!pageLogicalHeight) {
             // We need to go ahead and set our explicit page height if one exists, so that we can
             // avoid doing two layout passes.
             computeLogicalHeight();
             int columnHeight = contentLogicalHeight();
             if (columnHeight > 0) {
-                pageHeight = columnHeight;
-                hasSpecifiedPageHeight = true;
+                pageLogicalHeight = columnHeight;
+                hasSpecifiedPageLogicalHeight = true;
             }
             setLogicalHeight(0);
         }
-        if (colInfo->columnHeight() != pageHeight && m_everHadLayout) {
-            colInfo->setColumnHeight(pageHeight);
-            pageHeightChanged = true;
+        if (colInfo->columnHeight() != pageLogicalHeight && m_everHadLayout) {
+            colInfo->setColumnHeight(pageLogicalHeight);
+            pageLogicalHeightChanged = true;
         }
         
-        if (!hasSpecifiedPageHeight && !pageHeight)
+        if (!hasSpecifiedPageLogicalHeight && !pageLogicalHeight)
             colInfo->clearForcedBreaks();
     }
 
-    LayoutStateMaintainer statePusher(view(), this, IntSize(x(), y()), hasColumns() || hasTransform() || hasReflection() || style()->isFlippedBlocksWritingMode(), pageHeight, pageHeightChanged, colInfo);
+    LayoutStateMaintainer statePusher(view(), this, IntSize(x(), y()), hasColumns() || hasTransform() || hasReflection() || style()->isFlippedBlocksWritingMode(), pageLogicalHeight, pageLogicalHeightChanged, colInfo);
 
     // We use four values, maxTopPos, maxTopNeg, maxBottomPos, and maxBottomNeg, to track
     // our current maximal positive and negative margins.  These values are used when we
@@ -1212,7 +1212,7 @@ void RenderBlock::layoutBlock(bool relayoutChildren, int pageHeight)
     if (lowestFloatLogicalBottom() > (logicalHeight() - toAdd) && expandsToEncloseOverhangingFloats())
         setLogicalHeight(lowestFloatLogicalBottom() + toAdd);
     
-    if (layoutColumns(hasSpecifiedPageHeight, pageHeight, statePusher))
+    if (layoutColumns(hasSpecifiedPageLogicalHeight, pageLogicalHeight, statePusher))
         return;
  
     // Calculate our new height.
@@ -1243,7 +1243,7 @@ void RenderBlock::layoutBlock(bool relayoutChildren, int pageHeight)
     
     statePusher.pop();
 
-    if (view()->layoutState()->m_pageHeight)
+    if (view()->layoutState()->m_pageLogicalHeight)
         setPageY(view()->layoutState()->pageY(y()));
 
     updateLayerTransform();
@@ -2136,7 +2136,7 @@ void RenderBlock::markForPaginationRelayoutIfNeeded()
     if (needsLayout())
         return;
 
-    if (view()->layoutState()->pageHeightChanged() || (view()->layoutState()->pageHeight() && view()->layoutState()->pageY(y()) != pageY()))
+    if (view()->layoutState()->pageLogicalHeightChanged() || (view()->layoutState()->pageLogicalHeight() && view()->layoutState()->pageY(y()) != pageY()))
         setChildNeedsLayout(true, false);
 }
 
@@ -3032,10 +3032,10 @@ RenderBlock::FloatingObject* RenderBlock::insertFloatingObject(RenderBox* o)
     // Our location is irrelevant if we're unsplittable or no pagination is in effect.
     // Just go ahead and lay out the float.
     bool isChildRenderBlock = o->isRenderBlock();
-    if (isChildRenderBlock && !o->needsLayout() && view()->layoutState()->pageHeightChanged())
+    if (isChildRenderBlock && !o->needsLayout() && view()->layoutState()->pageLogicalHeightChanged())
         o->setChildNeedsLayout(true, false);
         
-    bool affectedByPagination = isChildRenderBlock && view()->layoutState()->m_pageHeight;
+    bool affectedByPagination = isChildRenderBlock && view()->layoutState()->m_pageLogicalHeight;
     if (!affectedByPagination || isWritingModeRoot()) // We are unsplittable if we're a block flow root.
         o->layoutIfNeeded();
     else {
@@ -4221,7 +4221,7 @@ IntRect RenderBlock::columnRectAt(ColumnInfo* colInfo, unsigned index) const
     return IntRect(colLeft, colTop, colWidth, colHeight);
 }
 
-bool RenderBlock::layoutColumns(bool hasSpecifiedPageHeight, int pageHeight, LayoutStateMaintainer& statePusher)
+bool RenderBlock::layoutColumns(bool hasSpecifiedPageLogicalHeight, int pageLogicalHeight, LayoutStateMaintainer& statePusher)
 {
     if (!hasColumns())
         return false;
@@ -4230,23 +4230,23 @@ bool RenderBlock::layoutColumns(bool hasSpecifiedPageHeight, int pageHeight, Lay
     // the distance between forced page breaks is so that we can avoid making the minimum column height too tall.
     ColumnInfo* colInfo = columnInfo();
     int desiredColumnCount = colInfo->desiredColumnCount();
-    if (!hasSpecifiedPageHeight) {
-        int columnHeight = pageHeight;
+    if (!hasSpecifiedPageLogicalHeight) {
+        int columnHeight = pageLogicalHeight;
         int minColumnCount = colInfo->forcedBreaks() + 1;
         if (minColumnCount >= desiredColumnCount) {
             // The forced page breaks are in control of the balancing.  Just set the column height to the
             // maximum page break distance.
-            if (!pageHeight) {
+            if (!pageLogicalHeight) {
                 int distanceBetweenBreaks = max(colInfo->maximumDistanceBetweenForcedBreaks(),
                                                 view()->layoutState()->pageY(borderTop() + paddingTop() + contentHeight()) - colInfo->forcedBreakOffset());
                 columnHeight = max(colInfo->minimumColumnHeight(), distanceBetweenBreaks);
             }
-        } else if (contentHeight() > pageHeight * desiredColumnCount) {
+        } else if (contentHeight() > pageLogicalHeight * desiredColumnCount) {
             // Now that we know the intrinsic height of the columns, we have to rebalance them.
             columnHeight = max(colInfo->minimumColumnHeight(), (int)ceilf((float)contentHeight() / desiredColumnCount));
         }
         
-        if (columnHeight && columnHeight != pageHeight) {
+        if (columnHeight && columnHeight != pageLogicalHeight) {
             statePusher.pop();
             m_everHadLayout = true;
             layoutBlock(false, columnHeight);
@@ -4254,8 +4254,8 @@ bool RenderBlock::layoutColumns(bool hasSpecifiedPageHeight, int pageHeight, Lay
         }
     } 
     
-    if (pageHeight) // FIXME: Should we use lowestPosition (excluding our positioned objects) instead of contentHeight()?
-        colInfo->setColumnCountAndHeight(ceilf((float)contentHeight() / pageHeight), pageHeight);
+    if (pageLogicalHeight)
+        colInfo->setColumnCountAndHeight(ceilf((float)contentHeight() / pageLogicalHeight), pageLogicalHeight);
 
     if (columnCount(colInfo)) {
         setLogicalHeight(borderTop() + paddingTop() + colInfo->columnHeight() + borderBottom() + paddingBottom() + horizontalScrollbarHeight());
@@ -5727,12 +5727,12 @@ RenderBlock* RenderBlock::createAnonymousColumnSpanBlock() const
 int RenderBlock::nextPageTop(int yPos) const
 {
     LayoutState* layoutState = view()->layoutState();
-    if (!layoutState->m_pageHeight)
+    if (!layoutState->m_pageLogicalHeight)
         return yPos;
     
     // The yPos is in our coordinate space.  We can add in our pushed offset.
-    int pageHeight = layoutState->m_pageHeight;
-    int remainingHeight = (pageHeight - ((layoutState->m_layoutOffset - layoutState->m_pageOffset).height() + yPos) % pageHeight) % pageHeight;
+    int pageLogicalHeight = layoutState->m_pageLogicalHeight;
+    int remainingHeight = (pageLogicalHeight - ((layoutState->m_layoutOffset - layoutState->m_pageOffset).height() + yPos) % pageLogicalHeight) % pageLogicalHeight;
     return yPos + remainingHeight;
 }
 
@@ -5754,7 +5754,7 @@ int RenderBlock::applyBeforeBreak(RenderBox* child, int yPos)
 {
     // FIXME: Add page break checking here when we support printing.
     bool checkColumnBreaks = view()->layoutState()->isPaginatingColumns();
-    bool checkPageBreaks = !checkColumnBreaks && view()->layoutState()->m_pageHeight; // FIXME: Once columns can print we have to check this.
+    bool checkPageBreaks = !checkColumnBreaks && view()->layoutState()->m_pageLogicalHeight; // FIXME: Once columns can print we have to check this.
     bool checkBeforeAlways = (checkColumnBreaks && child->style()->columnBreakBefore() == PBALWAYS) || (checkPageBreaks && child->style()->pageBreakBefore() == PBALWAYS);
     if (checkBeforeAlways && inNormalFlow(child)) {
         if (checkColumnBreaks)
@@ -5768,7 +5768,7 @@ int RenderBlock::applyAfterBreak(RenderBox* child, int yPos, MarginInfo& marginI
 {
     // FIXME: Add page break checking here when we support printing.
     bool checkColumnBreaks = view()->layoutState()->isPaginatingColumns();
-    bool checkPageBreaks = !checkColumnBreaks && view()->layoutState()->m_pageHeight; // FIXME: Once columns can print we have to check this.
+    bool checkPageBreaks = !checkColumnBreaks && view()->layoutState()->m_pageLogicalHeight; // FIXME: Once columns can print we have to check this.
     bool checkAfterAlways = (checkColumnBreaks && child->style()->columnBreakAfter() == PBALWAYS) || (checkPageBreaks && child->style()->pageBreakAfter() == PBALWAYS);
     if (checkAfterAlways && inNormalFlow(child)) {
         marginInfo.setMarginAfterQuirk(true); // Cause margins to be discarded for any following content.
@@ -5788,10 +5788,10 @@ int RenderBlock::adjustForUnsplittableChild(RenderBox* child, int yPos, bool inc
     LayoutState* layoutState = view()->layoutState();
     if (layoutState->m_columnInfo)
         layoutState->m_columnInfo->updateMinimumColumnHeight(childHeight);
-    int pageHeight = layoutState->m_pageHeight;
-    if (!pageHeight || childHeight > pageHeight)
+    int pageLogicalHeight = layoutState->m_pageLogicalHeight;
+    if (!pageLogicalHeight || childHeight > pageLogicalHeight)
         return yPos;
-    int remainingHeight = (pageHeight - ((layoutState->m_layoutOffset - layoutState->m_pageOffset).height() + yPos) % pageHeight) % pageHeight;
+    int remainingHeight = (pageLogicalHeight - ((layoutState->m_layoutOffset - layoutState->m_pageOffset).height() + yPos) % pageLogicalHeight) % pageLogicalHeight;
     if (remainingHeight < childHeight)
         return yPos + remainingHeight;
     return yPos;
@@ -5816,19 +5816,19 @@ void RenderBlock::adjustLinePositionForPagination(RootInlineBox* lineBox, int& d
     // Technically if the location we move the line to has a different line width than our old position, then we need to dirty the
     // line and all following lines.
     LayoutState* layoutState = view()->layoutState();
-    int pageHeight = layoutState->m_pageHeight;
+    int pageLogicalHeight = layoutState->m_pageLogicalHeight;
     int yPos = lineBox->topVisualOverflow();
     int lineHeight = lineBox->bottomVisualOverflow() - yPos;
     if (layoutState->m_columnInfo)
         layoutState->m_columnInfo->updateMinimumColumnHeight(lineHeight);
     yPos += delta;
     lineBox->setPaginationStrut(0);
-    if (!pageHeight || lineHeight > pageHeight)
+    if (!pageLogicalHeight || lineHeight > pageLogicalHeight)
         return;
-    int remainingHeight = pageHeight - ((layoutState->m_layoutOffset - layoutState->m_pageOffset).height() + yPos) % pageHeight;
+    int remainingHeight = pageLogicalHeight - ((layoutState->m_layoutOffset - layoutState->m_pageOffset).height() + yPos) % pageLogicalHeight;
     if (remainingHeight < lineHeight) {
         int totalHeight = lineHeight + max(0, yPos);
-        if (lineBox == firstRootBox() && totalHeight < pageHeight && !isPositioned() && !isTableCell())
+        if (lineBox == firstRootBox() && totalHeight < pageLogicalHeight && !isPositioned() && !isTableCell())
             setPaginationStrut(remainingHeight + max(0, yPos));
         else {
             delta += remainingHeight;
diff --git a/WebCore/rendering/RenderBlock.h b/WebCore/rendering/RenderBlock.h
index 94d6980..a406c60 100644
--- a/WebCore/rendering/RenderBlock.h
+++ b/WebCore/rendering/RenderBlock.h
@@ -71,7 +71,7 @@ public:
     virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0);
     virtual void removeChild(RenderObject*);
 
-    virtual void layoutBlock(bool relayoutChildren, int pageHeight = 0);
+    virtual void layoutBlock(bool relayoutChildren, int pageLogicalHeight = 0);
 
     void insertPositionedObject(RenderBox*);
     void removePositionedObject(RenderBox*);
@@ -567,7 +567,7 @@ private:
     void offsetForContents(int& tx, int& ty) const;
 
     void calcColumnWidth();
-    bool layoutColumns(bool hasSpecifiedPageHeight, int pageHeight, LayoutStateMaintainer&);
+    bool layoutColumns(bool hasSpecifiedPageLogicalHeight, int pageLogicalHeight, LayoutStateMaintainer&);
     void makeChildrenAnonymousColumnBlocks(RenderObject* beforeChild, RenderBlock* newBlockBox, RenderObject* newChild);
 
     bool expandsToEncloseOverhangingFloats() const;
diff --git a/WebCore/rendering/RenderBox.cpp b/WebCore/rendering/RenderBox.cpp
index b932a33..0f3926b 100644
--- a/WebCore/rendering/RenderBox.cpp
+++ b/WebCore/rendering/RenderBox.cpp
@@ -1752,7 +1752,7 @@ void RenderBox::computeLogicalHeight()
         int margins = collapsedMarginBefore() + collapsedMarginAfter();
         int visHeight;
         if (document()->printing())
-            visHeight = static_cast<int>(view()->pageHeight());
+            visHeight = static_cast<int>(view()->pageLogicalHeight());
         else  {
             if (style()->isHorizontalWritingMode())
                 visHeight = view()->viewHeight();
diff --git a/WebCore/rendering/RenderFlexibleBox.cpp b/WebCore/rendering/RenderFlexibleBox.cpp
index b132366..31c9e0b 100644
--- a/WebCore/rendering/RenderFlexibleBox.cpp
+++ b/WebCore/rendering/RenderFlexibleBox.cpp
@@ -278,7 +278,7 @@ void RenderFlexibleBox::layoutBlock(bool relayoutChildren, int /*pageHeight FIXM
 
     updateLayerTransform();
 
-    if (view()->layoutState()->m_pageHeight)
+    if (view()->layoutState()->pageLogicalHeight())
         setPageY(view()->layoutState()->pageY(y()));
 
     // Update our scrollbars if we're overflow:auto/scroll/hidden now that we know if
diff --git a/WebCore/rendering/RenderTable.cpp b/WebCore/rendering/RenderTable.cpp
index 57efb33..a6b54bc 100644
--- a/WebCore/rendering/RenderTable.cpp
+++ b/WebCore/rendering/RenderTable.cpp
@@ -390,7 +390,7 @@ void RenderTable::layout()
 
     statePusher.pop();
 
-    if (view()->layoutState()->m_pageHeight)
+    if (view()->layoutState()->pageLogicalHeight())
         setPageY(view()->layoutState()->pageY(y()));
 
     bool didFullRepaint = repainter.repaintAfterLayout();
diff --git a/WebCore/rendering/RenderTableRow.cpp b/WebCore/rendering/RenderTableRow.cpp
index 3dd4017..4811296 100644
--- a/WebCore/rendering/RenderTableRow.cpp
+++ b/WebCore/rendering/RenderTableRow.cpp
@@ -122,7 +122,7 @@ void RenderTableRow::layout()
     for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
         if (child->isTableCell()) {
             RenderTableCell* cell = toRenderTableCell(child);
-            if (!cell->needsLayout() && paginated && view()->layoutState()->m_pageHeight && view()->layoutState()->pageY(cell->y()) != cell->pageY())
+            if (!cell->needsLayout() && paginated && view()->layoutState()->pageLogicalHeight() && view()->layoutState()->pageY(cell->y()) != cell->pageY())
                 cell->setChildNeedsLayout(true, false);
 
             if (child->needsLayout()) {
diff --git a/WebCore/rendering/RenderTableSection.cpp b/WebCore/rendering/RenderTableSection.cpp
index 19ad56b..519a15c 100644
--- a/WebCore/rendering/RenderTableSection.cpp
+++ b/WebCore/rendering/RenderTableSection.cpp
@@ -614,13 +614,13 @@ int RenderTableSection::layoutRows(int toAdd)
             if (intrinsicPaddingBefore != oldIntrinsicPaddingBefore || intrinsicPaddingAfter != oldIntrinsicPaddingAfter)
                 cell->setNeedsLayout(true, false);
 
-            if (!cell->needsLayout() && view()->layoutState()->m_pageHeight && view()->layoutState()->pageY(cell->y()) != cell->pageY())
+            if (!cell->needsLayout() && view()->layoutState()->pageLogicalHeight() && view()->layoutState()->pageY(cell->y()) != cell->pageY())
                 cell->setChildNeedsLayout(true, false);
 
             cell->layoutIfNeeded();
 
             // FIXME: Make pagination work with vertical tables.
-            if (style()->isHorizontalWritingMode() && view()->layoutState()->m_pageHeight && cell->height() != rHeight)
+            if (style()->isHorizontalWritingMode() && view()->layoutState()->pageLogicalHeight() && cell->height() != rHeight)
                 cell->setHeight(rHeight); // FIXME: Pagination might have made us change size.  For now just shrink or grow the cell to fit without doing a relayout.
 
             IntSize childOffset(cell->x() - oldCellRect.x(), cell->y() - oldCellRect.y());
diff --git a/WebCore/rendering/RenderView.cpp b/WebCore/rendering/RenderView.cpp
index 520664d..2992c2c 100644
--- a/WebCore/rendering/RenderView.cpp
+++ b/WebCore/rendering/RenderView.cpp
@@ -49,8 +49,8 @@ RenderView::RenderView(Node* node, FrameView* view)
     , m_selectionStartPos(-1)
     , m_selectionEndPos(-1)
     , m_maximalOutlineSize(0)
-    , m_pageHeight(0)
-    , m_pageHeightChanged(false)
+    , m_pageLogicalHeight(0)
+    , m_pageLogicalHeightChanged(false)
     , m_layoutState(0)
     , m_layoutStateDisableCount(0)
 {
@@ -102,7 +102,7 @@ bool RenderView::isChildAllowed(RenderObject* child, RenderStyle*) const
 void RenderView::layout()
 {
     if (!document()->paginated())
-        setPageHeight(0);
+        setPageLogicalHeight(0);
 
     if (printing())
         m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = width();
@@ -121,9 +121,9 @@ void RenderView::layout()
     LayoutState state;
     // FIXME: May be better to push a clip and avoid issuing offscreen repaints.
     state.m_clipped = false;
-    state.m_pageHeight = m_pageHeight;
-    state.m_pageHeightChanged = m_pageHeightChanged;
-    m_pageHeightChanged = false;
+    state.m_pageLogicalHeight = m_pageLogicalHeight;
+    state.m_pageLogicalHeightChanged = m_pageLogicalHeightChanged;
+    m_pageLogicalHeightChanged = false;
     m_layoutState = &state;
 
     if (needsLayout())
diff --git a/WebCore/rendering/RenderView.h b/WebCore/rendering/RenderView.h
index d289af9..9341e62 100644
--- a/WebCore/rendering/RenderView.h
+++ b/WebCore/rendering/RenderView.h
@@ -132,12 +132,12 @@ public:
 
     virtual void updateHitTestResult(HitTestResult&, const IntPoint&);
 
-    unsigned pageHeight() const { return m_pageHeight; }
-    void setPageHeight(unsigned height)
+    unsigned pageLogicalHeight() const { return m_pageLogicalHeight; }
+    void setPageLogicalHeight(unsigned height)
     {
-        if (m_pageHeight != height) {
-            m_pageHeight = height;
-            m_pageHeightChanged = true;
+        if (m_pageLogicalHeight != height) {
+            m_pageLogicalHeight = height;
+            m_pageLogicalHeightChanged = true;
         }
     }
 
@@ -233,8 +233,8 @@ protected:
     RenderWidgetSet m_widgets;
     
 private:
-    unsigned m_pageHeight;
-    bool m_pageHeightChanged;
+    unsigned m_pageLogicalHeight;
+    bool m_pageLogicalHeightChanged;
     LayoutState* m_layoutState;
     unsigned m_layoutStateDisableCount;
 #if USE(ACCELERATED_COMPOSITING)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list