Changeset 74121 in webkit


Ignore:
Timestamp:
Dec 15, 2010 10:10:48 AM (13 years ago)
Author:
hyatt@apple.com
Message:

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):

Location:
trunk/WebCore
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r74119 r74121  
     12010-12-15  David Hyatt  <hyatt@apple.com>
     2
     3        Reviewed by Simon Fraser.
     4
     5        Rename pageY to pageLogicalOffset, since for vertical writing modes it is an x-position rather than a
     6        y-position.
     7
     8        * rendering/LayoutState.cpp:
     9        (WebCore::LayoutState::pageLogicalOffset):
     10        (WebCore::LayoutState::addForcedColumnBreak):
     11        * rendering/LayoutState.h:
     12        * rendering/RenderBlock.cpp:
     13        (WebCore::RenderBlock::layoutBlock):
     14        (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
     15        (WebCore::RenderBlock::layoutColumns):
     16        (WebCore::RenderBlock::setPageLogicalOffset):
     17        * rendering/RenderBlock.h:
     18        (WebCore::RenderBlock::pageLogicalOffset):
     19        (WebCore::RenderBlock::RenderBlockRareData::RenderBlockRareData):
     20        * rendering/RenderFlexibleBox.cpp:
     21        (WebCore::RenderFlexibleBox::layoutBlock):
     22        * rendering/RenderTable.cpp:
     23        (WebCore::RenderTable::layout):
     24        * rendering/RenderTableRow.cpp:
     25        (WebCore::RenderTableRow::layout):
     26        * rendering/RenderTableSection.cpp:
     27        (WebCore::RenderTableSection::layoutRows):
     28
    1292010-12-13  Pavel Podivilov  <podivilov@chromium.org>
    230
  • trunk/WebCore/rendering/LayoutState.cpp

    r74048 r74121  
    163163}
    164164
    165 int LayoutState::pageY(int childY) const
     165int LayoutState::pageLogicalOffset(int childLogicalOffset) const
    166166{
    167     return m_layoutOffset.height() + childY - m_pageOffset.height();
     167    return m_layoutOffset.height() + childLogicalOffset - m_pageOffset.height();
    168168}
    169169
     
    172172    if (!m_columnInfo || m_columnInfo->columnHeight())
    173173        return;
    174     m_columnInfo->addForcedBreak(pageY(childY));
     174    m_columnInfo->addForcedBreak(pageLogicalOffset(childY));
    175175}
    176176
  • trunk/WebCore/rendering/LayoutState.h

    r74048 r74121  
    6666    bool isPaginatingColumns() const { return m_columnInfo; }
    6767    bool isPaginated() const { return m_pageLogicalHeight || m_columnInfo; }
    68     int pageY(int childY) const;
     68   
     69    // The page logical offset is the object's offset from the top of the page in the page progression
     70    // direction (so an x-offset in vertical text and a y-offset for horizontal text).
     71    int pageLogicalOffset(int childLogicalOffset) const;
     72
    6973    void addForcedColumnBreak(int childY);
    7074   
  • trunk/WebCore/rendering/RenderBlock.cpp

    r74063 r74121  
    12451245
    12461246    if (view()->layoutState()->m_pageLogicalHeight)
    1247         setPageY(view()->layoutState()->pageY(y()));
     1247        setPageLogicalOffset(view()->layoutState()->pageLogicalOffset(y()));
    12481248
    12491249    updateLayerTransform();
     
    21372137        return;
    21382138
    2139     if (view()->layoutState()->pageLogicalHeightChanged() || (view()->layoutState()->pageLogicalHeight() && view()->layoutState()->pageY(y()) != pageY()))
     2139    if (view()->layoutState()->pageLogicalHeightChanged() || (view()->layoutState()->pageLogicalHeight() && view()->layoutState()->pageLogicalOffset(y()) != pageLogicalOffset()))
    21402140        setChildNeedsLayout(true, false);
    21412141}
     
    42394239            if (!pageLogicalHeight) {
    42404240                int distanceBetweenBreaks = max(colInfo->maximumDistanceBetweenForcedBreaks(),
    4241                                                 view()->layoutState()->pageY(borderTop() + paddingTop() + contentHeight()) - colInfo->forcedBreakOffset());
     4241                                                view()->layoutState()->pageLogicalOffset(borderTop() + paddingTop() + contentHeight()) - colInfo->forcedBreakOffset());
    42424242                columnHeight = max(colInfo->minimumColumnHeight(), distanceBetweenBreaks);
    42434243            }
     
    54515451}
    54525452
    5453 void RenderBlock::setPageY(int y)
     5453void RenderBlock::setPageLogicalOffset(int logicalOffset)
    54545454{
    54555455    if (!m_rareData) {
    5456         if (!y)
     5456        if (!logicalOffset)
    54575457            return;
    54585458        m_rareData = new RenderBlockRareData(this);
    54595459    }
    5460     m_rareData->m_pageY = y;
     5460    m_rareData->m_pageLogicalOffset = logicalOffset;
    54615461}
    54625462
  • trunk/WebCore/rendering/RenderBlock.h

    r74048 r74121  
    154154
    155155    int paginationStrut() const { return m_rareData ? m_rareData->m_paginationStrut : 0; }
    156     int pageY() const { return m_rareData ? m_rareData->m_pageY : 0; }
    157     void setPaginationStrut(int strut);
    158     void setPageY(int y);
     156    void setPaginationStrut(int);
     157   
     158    // The page logical offset is the object's offset from the top of the page in the page progression
     159    // direction (so an x-offset in vertical text and a y-offset for horizontal text).
     160    int pageLogicalOffset() const { return m_rareData ? m_rareData->m_pageLogicalOffset : 0; }
     161    void setPageLogicalOffset(int);
    159162
    160163    // Accessors for logical width/height and margins in the containing block's block-flow direction.
     
    683686            : m_margins(positiveMarginBeforeDefault(block), negativeMarginBeforeDefault(block), positiveMarginAfterDefault(block), negativeMarginAfterDefault(block))
    684687            , m_paginationStrut(0)
    685             , m_pageY(0)
     688            , m_pageLogicalOffset(0)
    686689        {
    687690        }
     
    707710        MarginValues m_margins;
    708711        int m_paginationStrut;
    709         int m_pageY;
     712        int m_pageLogicalOffset;
    710713     };
    711714
  • trunk/WebCore/rendering/RenderFlexibleBox.cpp

    r74048 r74121  
    280280
    281281    if (view()->layoutState()->pageLogicalHeight())
    282         setPageY(view()->layoutState()->pageY(y()));
     282        setPageLogicalOffset(view()->layoutState()->pageLogicalOffset(y()));
    283283
    284284    // Update our scrollbars if we're overflow:auto/scroll/hidden now that we know if
  • trunk/WebCore/rendering/RenderTable.cpp

    r74048 r74121  
    392392
    393393    if (view()->layoutState()->pageLogicalHeight())
    394         setPageY(view()->layoutState()->pageY(y()));
     394        setPageLogicalOffset(view()->layoutState()->pageLogicalOffset(y()));
    395395
    396396    bool didFullRepaint = repainter.repaintAfterLayout();
  • trunk/WebCore/rendering/RenderTableRow.cpp

    r74048 r74121  
    123123        if (child->isTableCell()) {
    124124            RenderTableCell* cell = toRenderTableCell(child);
    125             if (!cell->needsLayout() && paginated && view()->layoutState()->pageLogicalHeight() && view()->layoutState()->pageY(cell->y()) != cell->pageY())
     125            if (!cell->needsLayout() && paginated && view()->layoutState()->pageLogicalHeight() && view()->layoutState()->pageLogicalOffset(cell->y()) != cell->pageLogicalOffset())
    126126                cell->setChildNeedsLayout(true, false);
    127127
  • trunk/WebCore/rendering/RenderTableSection.cpp

    r74048 r74121  
    615615                cell->setNeedsLayout(true, false);
    616616
    617             if (!cell->needsLayout() && view()->layoutState()->pageLogicalHeight() && view()->layoutState()->pageY(cell->y()) != cell->pageY())
     617            if (!cell->needsLayout() && view()->layoutState()->pageLogicalHeight() && view()->layoutState()->pageLogicalOffset(cell->y()) != cell->pageLogicalOffset())
    618618                cell->setChildNeedsLayout(true, false);
    619619
Note: See TracChangeset for help on using the changeset viewer.