Changeset 74121 in webkit
- Timestamp:
- Dec 15, 2010 10:10:48 AM (13 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r74119 r74121 1 2010-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 1 29 2010-12-13 Pavel Podivilov <podivilov@chromium.org> 2 30 -
trunk/WebCore/rendering/LayoutState.cpp
r74048 r74121 163 163 } 164 164 165 int LayoutState::page Y(int childY) const165 int LayoutState::pageLogicalOffset(int childLogicalOffset) const 166 166 { 167 return m_layoutOffset.height() + child Y- m_pageOffset.height();167 return m_layoutOffset.height() + childLogicalOffset - m_pageOffset.height(); 168 168 } 169 169 … … 172 172 if (!m_columnInfo || m_columnInfo->columnHeight()) 173 173 return; 174 m_columnInfo->addForcedBreak(page Y(childY));174 m_columnInfo->addForcedBreak(pageLogicalOffset(childY)); 175 175 } 176 176 -
trunk/WebCore/rendering/LayoutState.h
r74048 r74121 66 66 bool isPaginatingColumns() const { return m_columnInfo; } 67 67 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 69 73 void addForcedColumnBreak(int childY); 70 74 -
trunk/WebCore/rendering/RenderBlock.cpp
r74063 r74121 1245 1245 1246 1246 if (view()->layoutState()->m_pageLogicalHeight) 1247 setPage Y(view()->layoutState()->pageY(y()));1247 setPageLogicalOffset(view()->layoutState()->pageLogicalOffset(y())); 1248 1248 1249 1249 updateLayerTransform(); … … 2137 2137 return; 2138 2138 2139 if (view()->layoutState()->pageLogicalHeightChanged() || (view()->layoutState()->pageLogicalHeight() && view()->layoutState()->page Y(y()) != pageY()))2139 if (view()->layoutState()->pageLogicalHeightChanged() || (view()->layoutState()->pageLogicalHeight() && view()->layoutState()->pageLogicalOffset(y()) != pageLogicalOffset())) 2140 2140 setChildNeedsLayout(true, false); 2141 2141 } … … 4239 4239 if (!pageLogicalHeight) { 4240 4240 int distanceBetweenBreaks = max(colInfo->maximumDistanceBetweenForcedBreaks(), 4241 view()->layoutState()->page Y(borderTop() + paddingTop() + contentHeight()) - colInfo->forcedBreakOffset());4241 view()->layoutState()->pageLogicalOffset(borderTop() + paddingTop() + contentHeight()) - colInfo->forcedBreakOffset()); 4242 4242 columnHeight = max(colInfo->minimumColumnHeight(), distanceBetweenBreaks); 4243 4243 } … … 5451 5451 } 5452 5452 5453 void RenderBlock::setPage Y(int y)5453 void RenderBlock::setPageLogicalOffset(int logicalOffset) 5454 5454 { 5455 5455 if (!m_rareData) { 5456 if (! y)5456 if (!logicalOffset) 5457 5457 return; 5458 5458 m_rareData = new RenderBlockRareData(this); 5459 5459 } 5460 m_rareData->m_page Y = y;5460 m_rareData->m_pageLogicalOffset = logicalOffset; 5461 5461 } 5462 5462 -
trunk/WebCore/rendering/RenderBlock.h
r74048 r74121 154 154 155 155 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); 159 162 160 163 // Accessors for logical width/height and margins in the containing block's block-flow direction. … … 683 686 : m_margins(positiveMarginBeforeDefault(block), negativeMarginBeforeDefault(block), positiveMarginAfterDefault(block), negativeMarginAfterDefault(block)) 684 687 , m_paginationStrut(0) 685 , m_page Y(0)688 , m_pageLogicalOffset(0) 686 689 { 687 690 } … … 707 710 MarginValues m_margins; 708 711 int m_paginationStrut; 709 int m_page Y;712 int m_pageLogicalOffset; 710 713 }; 711 714 -
trunk/WebCore/rendering/RenderFlexibleBox.cpp
r74048 r74121 280 280 281 281 if (view()->layoutState()->pageLogicalHeight()) 282 setPage Y(view()->layoutState()->pageY(y()));282 setPageLogicalOffset(view()->layoutState()->pageLogicalOffset(y())); 283 283 284 284 // Update our scrollbars if we're overflow:auto/scroll/hidden now that we know if -
trunk/WebCore/rendering/RenderTable.cpp
r74048 r74121 392 392 393 393 if (view()->layoutState()->pageLogicalHeight()) 394 setPage Y(view()->layoutState()->pageY(y()));394 setPageLogicalOffset(view()->layoutState()->pageLogicalOffset(y())); 395 395 396 396 bool didFullRepaint = repainter.repaintAfterLayout(); -
trunk/WebCore/rendering/RenderTableRow.cpp
r74048 r74121 123 123 if (child->isTableCell()) { 124 124 RenderTableCell* cell = toRenderTableCell(child); 125 if (!cell->needsLayout() && paginated && view()->layoutState()->pageLogicalHeight() && view()->layoutState()->page Y(cell->y()) != cell->pageY())125 if (!cell->needsLayout() && paginated && view()->layoutState()->pageLogicalHeight() && view()->layoutState()->pageLogicalOffset(cell->y()) != cell->pageLogicalOffset()) 126 126 cell->setChildNeedsLayout(true, false); 127 127 -
trunk/WebCore/rendering/RenderTableSection.cpp
r74048 r74121 615 615 cell->setNeedsLayout(true, false); 616 616 617 if (!cell->needsLayout() && view()->layoutState()->pageLogicalHeight() && view()->layoutState()->page Y(cell->y()) != cell->pageY())617 if (!cell->needsLayout() && view()->layoutState()->pageLogicalHeight() && view()->layoutState()->pageLogicalOffset(cell->y()) != cell->pageLogicalOffset()) 618 618 cell->setChildNeedsLayout(true, false); 619 619
Note: See TracChangeset
for help on using the changeset viewer.