[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:40:22 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 2e47dc8b8db96bcec4b5d8d3a1c67111d29afb42
Author: hyatt at apple.com <hyatt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Dec 15 18:10:48 2010 +0000

    Rename pageY to pageLogicalOffset, since for vertical writing modes it is an x-position rather than a
    y-position.
    
    Reviewed by Simon Fraser.
    
    * rendering/LayoutState.cpp:
    (WebCore::LayoutState::pageLogicalOffset):
    (WebCore::LayoutState::addForcedColumnBreak):
    * rendering/LayoutState.h:
    * rendering/RenderBlock.cpp:
    (WebCore::RenderBlock::layoutBlock):
    (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
    (WebCore::RenderBlock::layoutColumns):
    (WebCore::RenderBlock::setPageLogicalOffset):
    * rendering/RenderBlock.h:
    (WebCore::RenderBlock::pageLogicalOffset):
    (WebCore::RenderBlock::RenderBlockRareData::RenderBlockRareData):
    * rendering/RenderFlexibleBox.cpp:
    (WebCore::RenderFlexibleBox::layoutBlock):
    * rendering/RenderTable.cpp:
    (WebCore::RenderTable::layout):
    * rendering/RenderTableRow.cpp:
    (WebCore::RenderTableRow::layout):
    * rendering/RenderTableSection.cpp:
    (WebCore::RenderTableSection::layoutRows):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74121 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 5c1a1af..591fb78 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,31 @@
+2010-12-15  David Hyatt  <hyatt at apple.com>
+
+        Reviewed by Simon Fraser.
+
+        Rename pageY to pageLogicalOffset, since for vertical writing modes it is an x-position rather than a
+        y-position.
+
+        * rendering/LayoutState.cpp:
+        (WebCore::LayoutState::pageLogicalOffset):
+        (WebCore::LayoutState::addForcedColumnBreak):
+        * rendering/LayoutState.h:
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::layoutBlock):
+        (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
+        (WebCore::RenderBlock::layoutColumns):
+        (WebCore::RenderBlock::setPageLogicalOffset):
+        * rendering/RenderBlock.h:
+        (WebCore::RenderBlock::pageLogicalOffset):
+        (WebCore::RenderBlock::RenderBlockRareData::RenderBlockRareData):
+        * rendering/RenderFlexibleBox.cpp:
+        (WebCore::RenderFlexibleBox::layoutBlock):
+        * rendering/RenderTable.cpp:
+        (WebCore::RenderTable::layout):
+        * rendering/RenderTableRow.cpp:
+        (WebCore::RenderTableRow::layout):
+        * rendering/RenderTableSection.cpp:
+        (WebCore::RenderTableSection::layoutRows):
+
 2010-12-13  Pavel Podivilov  <podivilov at chromium.org>
 
         Reviewed by Pavel Feldman.
diff --git a/WebCore/rendering/LayoutState.cpp b/WebCore/rendering/LayoutState.cpp
index 4091cb9..aeba416 100644
--- a/WebCore/rendering/LayoutState.cpp
+++ b/WebCore/rendering/LayoutState.cpp
@@ -162,16 +162,16 @@ void LayoutState::clearPaginationInformation()
     m_columnInfo = m_next->m_columnInfo;
 }
 
-int LayoutState::pageY(int childY) const
+int LayoutState::pageLogicalOffset(int childLogicalOffset) const
 {
-    return m_layoutOffset.height() + childY - m_pageOffset.height();
+    return m_layoutOffset.height() + childLogicalOffset - m_pageOffset.height();
 }
 
 void LayoutState::addForcedColumnBreak(int childY)
 {
     if (!m_columnInfo || m_columnInfo->columnHeight())
         return;
-    m_columnInfo->addForcedBreak(pageY(childY));
+    m_columnInfo->addForcedBreak(pageLogicalOffset(childY));
 }
 
 } // namespace WebCore
diff --git a/WebCore/rendering/LayoutState.h b/WebCore/rendering/LayoutState.h
index 65ce37c..0d06cb1 100644
--- a/WebCore/rendering/LayoutState.h
+++ b/WebCore/rendering/LayoutState.h
@@ -65,7 +65,11 @@ public:
     void clearPaginationInformation();
     bool isPaginatingColumns() const { return m_columnInfo; }
     bool isPaginated() const { return m_pageLogicalHeight || m_columnInfo; }
-    int pageY(int childY) const;
+    
+    // The page logical offset is the object's offset from the top of the page in the page progression
+    // direction (so an x-offset in vertical text and a y-offset for horizontal text).
+    int pageLogicalOffset(int childLogicalOffset) const;
+
     void addForcedColumnBreak(int childY);
     
     bool pageLogicalHeight() const { return m_pageLogicalHeight; }
diff --git a/WebCore/rendering/RenderBlock.cpp b/WebCore/rendering/RenderBlock.cpp
index cdfdf73..146f427 100644
--- a/WebCore/rendering/RenderBlock.cpp
+++ b/WebCore/rendering/RenderBlock.cpp
@@ -1244,7 +1244,7 @@ void RenderBlock::layoutBlock(bool relayoutChildren, int pageLogicalHeight)
     statePusher.pop();
 
     if (view()->layoutState()->m_pageLogicalHeight)
-        setPageY(view()->layoutState()->pageY(y()));
+        setPageLogicalOffset(view()->layoutState()->pageLogicalOffset(y()));
 
     updateLayerTransform();
 
@@ -2136,7 +2136,7 @@ void RenderBlock::markForPaginationRelayoutIfNeeded()
     if (needsLayout())
         return;
 
-    if (view()->layoutState()->pageLogicalHeightChanged() || (view()->layoutState()->pageLogicalHeight() && view()->layoutState()->pageY(y()) != pageY()))
+    if (view()->layoutState()->pageLogicalHeightChanged() || (view()->layoutState()->pageLogicalHeight() && view()->layoutState()->pageLogicalOffset(y()) != pageLogicalOffset()))
         setChildNeedsLayout(true, false);
 }
 
@@ -4238,7 +4238,7 @@ bool RenderBlock::layoutColumns(bool hasSpecifiedPageLogicalHeight, int pageLogi
             // maximum page break distance.
             if (!pageLogicalHeight) {
                 int distanceBetweenBreaks = max(colInfo->maximumDistanceBetweenForcedBreaks(),
-                                                view()->layoutState()->pageY(borderTop() + paddingTop() + contentHeight()) - colInfo->forcedBreakOffset());
+                                                view()->layoutState()->pageLogicalOffset(borderTop() + paddingTop() + contentHeight()) - colInfo->forcedBreakOffset());
                 columnHeight = max(colInfo->minimumColumnHeight(), distanceBetweenBreaks);
             }
         } else if (contentHeight() > pageLogicalHeight * desiredColumnCount) {
@@ -5450,14 +5450,14 @@ void RenderBlock::setPaginationStrut(int strut)
     m_rareData->m_paginationStrut = strut;
 }
 
-void RenderBlock::setPageY(int y)
+void RenderBlock::setPageLogicalOffset(int logicalOffset)
 {
     if (!m_rareData) {
-        if (!y)
+        if (!logicalOffset)
             return;
         m_rareData = new RenderBlockRareData(this);
     }
-    m_rareData->m_pageY = y;
+    m_rareData->m_pageLogicalOffset = logicalOffset;
 }
 
 void RenderBlock::absoluteRects(Vector<IntRect>& rects, int tx, int ty)
diff --git a/WebCore/rendering/RenderBlock.h b/WebCore/rendering/RenderBlock.h
index a406c60..5294ad4 100644
--- a/WebCore/rendering/RenderBlock.h
+++ b/WebCore/rendering/RenderBlock.h
@@ -153,9 +153,12 @@ public:
     IntRect columnRectAt(ColumnInfo*, unsigned) const;
 
     int paginationStrut() const { return m_rareData ? m_rareData->m_paginationStrut : 0; }
-    int pageY() const { return m_rareData ? m_rareData->m_pageY : 0; }
-    void setPaginationStrut(int strut);
-    void setPageY(int y);
+    void setPaginationStrut(int);
+    
+    // The page logical offset is the object's offset from the top of the page in the page progression
+    // direction (so an x-offset in vertical text and a y-offset for horizontal text).
+    int pageLogicalOffset() const { return m_rareData ? m_rareData->m_pageLogicalOffset : 0; }
+    void setPageLogicalOffset(int);
 
     // Accessors for logical width/height and margins in the containing block's block-flow direction.
     enum ApplyLayoutDeltaMode { ApplyLayoutDelta, DoNotApplyLayoutDelta };
@@ -682,7 +685,7 @@ private:
         RenderBlockRareData(const RenderBlock* block) 
             : m_margins(positiveMarginBeforeDefault(block), negativeMarginBeforeDefault(block), positiveMarginAfterDefault(block), negativeMarginAfterDefault(block))
             , m_paginationStrut(0)
-            , m_pageY(0)
+            , m_pageLogicalOffset(0)
         { 
         }
 
@@ -706,7 +709,7 @@ private:
         
         MarginValues m_margins;
         int m_paginationStrut;
-        int m_pageY;
+        int m_pageLogicalOffset;
      };
 
     OwnPtr<RenderBlockRareData> m_rareData;
diff --git a/WebCore/rendering/RenderFlexibleBox.cpp b/WebCore/rendering/RenderFlexibleBox.cpp
index 31c9e0b..63c9dbb 100644
--- a/WebCore/rendering/RenderFlexibleBox.cpp
+++ b/WebCore/rendering/RenderFlexibleBox.cpp
@@ -279,7 +279,7 @@ void RenderFlexibleBox::layoutBlock(bool relayoutChildren, int /*pageHeight FIXM
     updateLayerTransform();
 
     if (view()->layoutState()->pageLogicalHeight())
-        setPageY(view()->layoutState()->pageY(y()));
+        setPageLogicalOffset(view()->layoutState()->pageLogicalOffset(y()));
 
     // Update our scrollbars if we're overflow:auto/scroll/hidden now that we know if
     // we overflow or not.
diff --git a/WebCore/rendering/RenderTable.cpp b/WebCore/rendering/RenderTable.cpp
index a6b54bc..bdf0ebb 100644
--- a/WebCore/rendering/RenderTable.cpp
+++ b/WebCore/rendering/RenderTable.cpp
@@ -391,7 +391,7 @@ void RenderTable::layout()
     statePusher.pop();
 
     if (view()->layoutState()->pageLogicalHeight())
-        setPageY(view()->layoutState()->pageY(y()));
+        setPageLogicalOffset(view()->layoutState()->pageLogicalOffset(y()));
 
     bool didFullRepaint = repainter.repaintAfterLayout();
     // Repaint with our new bounds if they are different from our old bounds.
diff --git a/WebCore/rendering/RenderTableRow.cpp b/WebCore/rendering/RenderTableRow.cpp
index 4811296..f0e222d 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()->pageLogicalHeight() && view()->layoutState()->pageY(cell->y()) != cell->pageY())
+            if (!cell->needsLayout() && paginated && view()->layoutState()->pageLogicalHeight() && view()->layoutState()->pageLogicalOffset(cell->y()) != cell->pageLogicalOffset())
                 cell->setChildNeedsLayout(true, false);
 
             if (child->needsLayout()) {
diff --git a/WebCore/rendering/RenderTableSection.cpp b/WebCore/rendering/RenderTableSection.cpp
index 519a15c..9acd9ce 100644
--- a/WebCore/rendering/RenderTableSection.cpp
+++ b/WebCore/rendering/RenderTableSection.cpp
@@ -614,7 +614,7 @@ int RenderTableSection::layoutRows(int toAdd)
             if (intrinsicPaddingBefore != oldIntrinsicPaddingBefore || intrinsicPaddingAfter != oldIntrinsicPaddingAfter)
                 cell->setNeedsLayout(true, false);
 
-            if (!cell->needsLayout() && view()->layoutState()->pageLogicalHeight() && view()->layoutState()->pageY(cell->y()) != cell->pageY())
+            if (!cell->needsLayout() && view()->layoutState()->pageLogicalHeight() && view()->layoutState()->pageLogicalOffset(cell->y()) != cell->pageLogicalOffset())
                 cell->setChildNeedsLayout(true, false);
 
             cell->layoutIfNeeded();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list