Index: Source/core/rendering/RenderBlock.cpp |
diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp |
index 7f910a1637cee7496dfa34452b8962f4fc2faac5..0abe722621cdc730fc12bbcbdf5da688ecdc52b0 100644 |
--- a/Source/core/rendering/RenderBlock.cpp |
+++ b/Source/core/rendering/RenderBlock.cpp |
@@ -52,8 +52,6 @@ |
#include "core/rendering/RenderInline.h" |
#include "core/rendering/RenderLayer.h" |
#include "core/rendering/RenderMarquee.h" |
-#include "core/rendering/RenderNamedFlowThread.h" |
-#include "core/rendering/RenderRegion.h" |
#include "core/rendering/RenderTableCell.h" |
#include "core/rendering/RenderTextControl.h" |
#include "core/rendering/RenderTextFragment.h" |
@@ -506,7 +504,6 @@ RenderBlock* RenderBlock::clone() const |
// generated content added yet. |
cloneBlock->setChildrenInline(cloneBlock->firstChild() ? cloneBlock->firstChild()->isInline() : childrenInline()); |
} |
- cloneBlock->setFlowThreadState(flowThreadState()); |
return cloneBlock; |
} |
@@ -766,7 +763,7 @@ void RenderBlock::addChildIgnoringAnonymousColumnBlocks(RenderObject* newChild, |
// We are placing a column-span element inside a block. |
RenderBlockFlow* newBox = createAnonymousColumnSpanBlock(); |
- if (columnsBlockAncestor != this && !isRenderFlowThread()) { |
+ if (columnsBlockAncestor != this) { |
// We are nested inside a multi-column element and are being split by the span. We have to break up |
// our block into continuations. |
RenderBoxModelObject* oldContinuation = continuation(); |
@@ -978,9 +975,6 @@ void RenderBlock::removeLeftoverAnonymousBlock(RenderBlock* child) |
child->children()->setFirstChild(0); |
child->m_next = 0; |
- // Remove all the information in the flow thread associated with the leftover anonymous block. |
- child->removeFromRenderFlowThread(); |
- |
child->setParent(0); |
child->setPreviousSibling(0); |
child->setNextSibling(0); |
@@ -1020,16 +1014,11 @@ void RenderBlock::collapseAnonymousBlockChild(RenderBlock* parent, RenderBlock* |
parent->setChildrenInline(child->childrenInline()); |
RenderObject* nextSibling = child->nextSibling(); |
- RenderFlowThread* childFlowThread = child->flowThreadContainingBlock(); |
- CurrentRenderFlowThreadMaintainer flowThreadMaintainer(childFlowThread); |
- |
parent->children()->removeChildNode(parent, child, child->hasLayer()); |
child->moveAllChildrenTo(parent, nextSibling, child->hasLayer()); |
// Explicitly delete the child's line box tree, or the special anonymous |
// block handling in willBeDestroyed will cause problems. |
child->deleteLineBoxTree(); |
- if (childFlowThread && childFlowThread->isRenderNamedFlowThread()) |
- toRenderNamedFlowThread(childFlowThread)->removeFlowChildInfo(child); |
child->destroy(); |
} |
@@ -1337,17 +1326,6 @@ ShapeInsideInfo* RenderBlock::layoutShapeInsideInfo() const |
{ |
if (ShapeInsideInfo* shapeInsideInfo = view()->layoutState()->shapeInsideInfo()) |
return shapeInsideInfo; |
- |
- RenderFlowThread* flowThread = flowThreadContainingBlock(); |
- if (allowsShapeInsideInfoSharing(flowThread)) { |
- LayoutUnit lineHeight = this->lineHeight(false, isHorizontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes); |
- // regionAtBlockOffset returns regions like an array first={0,N-1}, second={N,M-1}, ... |
- LayoutUnit offset = logicalHeight() + lineHeight - LayoutUnit(1); |
- RenderRegion* region = regionAtBlockOffset(offset); |
- if (region && region->logicalHeight()) |
- return region->shapeInsideInfo(); |
- } |
- |
return 0; |
} |
@@ -1355,7 +1333,7 @@ LayoutSize RenderBlock::logicalOffsetFromShapeAncestorContainer(const RenderBloc |
{ |
const RenderBlock* currentBlock = this; |
LayoutRect blockRect(currentBlock->borderBoxRect()); |
- while (currentBlock && !currentBlock->isRenderFlowThread() && currentBlock != container) { |
+ while (currentBlock && currentBlock != container) { |
RenderBlock* containerBlock = currentBlock->containingBlock(); |
ASSERT(containerBlock); |
if (!containerBlock) |
@@ -1417,71 +1395,14 @@ void RenderBlock::updateShapeInsideInfoAfterStyleChange(const ShapeValue* shapeI |
} |
} |
-static inline bool shapeInfoRequiresRelayout(const RenderBlock* block) |
-{ |
- ShapeInsideInfo* info = block->shapeInsideInfo(); |
- if (info) |
- info->setNeedsLayout(info->shapeSizeDirty()); |
- else |
- info = block->layoutShapeInsideInfo(); |
- return info && info->needsLayout(); |
-} |
- |
-bool RenderBlock::updateRegionsAndShapesLogicalSize(RenderFlowThread* flowThread) |
-{ |
- if (!flowThread && !shapeInsideInfo()) |
- return shapeInfoRequiresRelayout(this); |
- |
- LayoutUnit oldHeight = logicalHeight(); |
- LayoutUnit oldTop = logicalTop(); |
- |
- // Compute the maximum logical height content may cause this block to expand to |
- // FIXME: These should eventually use the const computeLogicalHeight rather than updateLogicalHeight |
- setLogicalHeight(RenderFlowThread::maxLogicalHeight()); |
- updateLogicalHeight(); |
- |
- computeShapeSize(); |
- |
- // Set our start and end regions. No regions above or below us will be considered by our children. They are |
- // effectively clamped to our region range. |
- computeRegionRangeForBlock(flowThread); |
- |
- setLogicalHeight(oldHeight); |
- setLogicalTop(oldTop); |
- |
- return shapeInfoRequiresRelayout(this); |
-} |
- |
void RenderBlock::computeShapeSize() |
{ |
ShapeInsideInfo* shapeInsideInfo = this->shapeInsideInfo(); |
if (!shapeInsideInfo) |
return; |
- if (isRenderNamedFlowFragment()) { |
- ShapeInsideInfo* parentShapeInsideInfo = toRenderBlock(parent())->shapeInsideInfo(); |
- ASSERT(parentShapeInsideInfo); |
- shapeInsideInfo->setShapeSize(parentShapeInsideInfo->shapeSize().width(), parentShapeInsideInfo->shapeSize().height()); |
- } else { |
- bool percentageLogicalHeightResolvable = percentageLogicalHeightIsResolvableFromBlock(this, false); |
- shapeInsideInfo->setShapeSize(logicalWidth(), percentageLogicalHeightResolvable ? logicalHeight() : LayoutUnit()); |
- } |
-} |
- |
-void RenderBlock::updateRegionsAndShapesAfterChildLayout(RenderFlowThread* flowThread, bool heightChanged) |
-{ |
- // A previous sibling has changed dimension, so we need to relayout the shape with the content |
- ShapeInsideInfo* shapeInsideInfo = layoutShapeInsideInfo(); |
- if (heightChanged && shapeInsideInfo) |
- shapeInsideInfo->dirtyShapeSize(); |
- |
- computeRegionRangeForBlock(flowThread); |
-} |
- |
-void RenderBlock::computeRegionRangeForBlock(RenderFlowThread* flowThread) |
-{ |
- if (flowThread) |
- flowThread->setRegionRangeForBox(this, offsetFromLogicalTopOfFirstPage()); |
+ bool percentageLogicalHeightResolvable = percentageLogicalHeightIsResolvableFromBlock(this, false); |
+ shapeInsideInfo->setShapeSize(logicalWidth(), percentageLogicalHeightResolvable ? logicalHeight() : LayoutUnit()); |
} |
bool RenderBlock::updateLogicalWidthAndColumnWidth() |
@@ -1524,9 +1445,6 @@ void RenderBlock::checkForPaginationLogicalHeightChange(LayoutUnit& pageLogicalH |
colInfo->clearForcedBreaks(); |
colInfo->setPaginationUnit(paginationUnit()); |
- } else if (isRenderFlowThread()) { |
- pageLogicalHeight = 1; // This is just a hack to always make sure we have a page logical height. |
- pageLogicalHeightChanged = toRenderFlowThread(this)->pageLogicalSizeChanged(); |
} |
} |
@@ -1583,9 +1501,6 @@ void RenderBlock::computeOverflow(LayoutUnit oldClientAfterEdge, bool) |
// Add visual overflow from theme. |
addVisualOverflowFromTheme(); |
- |
- if (isRenderNamedFlowThread()) |
- toRenderNamedFlowThread(this)->computeOversetStateForRegions(oldClientAfterEdge); |
} |
void RenderBlock::addOverflowFromBlockChildren() |
@@ -1642,7 +1557,7 @@ void RenderBlock::determineLogicalLeftPositionForChild(RenderBox* child, ApplyLa |
// Some objects (e.g., tables, horizontal rules, overflow:auto blocks) avoid floats. They need |
// to shift over as necessary to dodge any floats that might get in the way. |
- if (child->avoidsFloats() && containsFloats() && !flowThreadContainingBlock()) |
+ if (child->avoidsFloats() && containsFloats()) |
newPosition += toRenderBlockFlow(this)->computeStartPositionDeltaForChildAvoidingFloats(child, marginStartForChild(child)); |
setLogicalLeftForChild(child, style()->isLeftToRightDirection() ? newPosition : totalAvailableLogicalWidth - newPosition - logicalWidthForChild(child), applyDelta); |
@@ -1731,11 +1646,6 @@ bool RenderBlock::simplifiedLayout() |
if (needsSimplifiedNormalFlowLayout()) |
simplifiedNormalFlowLayout(); |
- // Make sure a forced break is applied after the content if we are a flow thread in a simplified layout. |
- // This ensures the size information is correctly computed for the last auto-height region receiving content. |
- if (isRenderFlowThread()) |
- toRenderFlowThread(this)->applyBreakAfterContent(clientLogicalBottom()); |
- |
// Lay out our positioned objects if our positioned child bit is set. |
// Also, if an absolute position element inside a relative positioned container moves, and the absolute element has a fixed position |
// child, neither the fixed element nor its container learn of the movement since posChildNeedsLayout() is only marked as far as the |
@@ -2363,8 +2273,7 @@ bool RenderBlock::isSelectionRoot() const |
if (isBody() || isRoot() || hasOverflowClip() |
|| isPositioned() || isFloating() |
|| isTableCell() || isInlineBlockOrInlineTable() |
- || hasTransform() || hasReflection() || hasMask() || isWritingModeRoot() |
- || isRenderFlowThread()) |
+ || hasTransform() || hasReflection() || hasMask() || isWritingModeRoot()) |
return true; |
if (view() && view()->selectionStart()) { |
@@ -2742,9 +2651,6 @@ void RenderBlock::insertPositionedObject(RenderBox* o) |
{ |
ASSERT(!isAnonymousBlock()); |
- if (o->isRenderFlowThread()) |
- return; |
- |
insertIntoTrackedRendererMaps(o, gPositionedDescendantsMap, gPositionedContainerMap); |
} |
@@ -2877,25 +2783,6 @@ LayoutUnit RenderBlock::textIndentOffset() const |
return minimumValueForLength(style()->textIndent(), cw); |
} |
-LayoutUnit RenderBlock::logicalLeftOffsetForContent(RenderRegion* region) const |
-{ |
- LayoutUnit logicalLeftOffset = style()->isHorizontalWritingMode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop(); |
- if (!region) |
- return logicalLeftOffset; |
- LayoutRect boxRect = borderBoxRectInRegion(region); |
- return logicalLeftOffset + (isHorizontalWritingMode() ? boxRect.x() : boxRect.y()); |
-} |
- |
-LayoutUnit RenderBlock::logicalRightOffsetForContent(RenderRegion* region) const |
-{ |
- LayoutUnit logicalRightOffset = style()->isHorizontalWritingMode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop(); |
- logicalRightOffset += availableLogicalWidth(); |
- if (!region) |
- return logicalRightOffset; |
- LayoutRect boxRect = borderBoxRectInRegion(region); |
- return logicalRightOffset - (logicalWidth() - (isHorizontalWritingMode() ? boxRect.maxX() : boxRect.maxY())); |
-} |
- |
void RenderBlock::markLinesDirtyInBlockRange(LayoutUnit logicalTop, LayoutUnit logicalBottom, RootInlineBox* highest) |
{ |
if (logicalTop >= logicalBottom) |
@@ -2978,7 +2865,7 @@ bool RenderBlock::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu |
// If we have clipping, then we can't have any spillout. |
bool useOverflowClip = hasOverflowClip() && !hasSelfPaintingLayer(); |
bool useClip = (hasControlClip() || useOverflowClip); |
- bool checkChildren = !useClip || (hasControlClip() ? locationInContainer.intersects(controlClipRect(adjustedLocation)) : locationInContainer.intersects(overflowClipRect(adjustedLocation, locationInContainer.region(), IncludeOverlayScrollbarSize))); |
+ bool checkChildren = !useClip || (hasControlClip() ? locationInContainer.intersects(controlClipRect(adjustedLocation)) : locationInContainer.intersects(overflowClipRect(adjustedLocation, IncludeOverlayScrollbarSize))); |
if (checkChildren) { |
// Hit test descendants first. |
LayoutSize scrolledOffset(localOffset); |
@@ -3119,9 +3006,6 @@ void RenderBlock::adjustForColumnRect(LayoutSize& offset, const LayoutPoint& loc |
bool RenderBlock::hitTestContents(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction hitTestAction) |
{ |
- if (isRenderRegion()) |
- return toRenderRegion(this)->hitTestFlowThreadContents(request, result, locationInContainer, accumulatedOffset, hitTestAction); |
- |
if (childrenInline() && !isTable()) { |
// We have to hit-test our line boxes. |
if (m_lineBoxes.hitTest(this, request, result, locationInContainer, accumulatedOffset, hitTestAction)) |
@@ -3376,9 +3260,6 @@ int RenderBlock::columnGap() const |
void RenderBlock::calcColumnWidth() |
{ |
- if (document().regionBasedColumnsEnabled()) |
- return; |
- |
// Calculate our column width and column count. |
// FIXME: Can overflow on fast/block/float/float-not-removed-from-next-sibling4.html, see https://bugs.webkit.org/show_bug.cgi?id=68744 |
unsigned desiredColumnCount = 1; |
@@ -3817,9 +3698,6 @@ void RenderBlock::computePreferredLogicalWidths() |
void RenderBlock::adjustIntrinsicLogicalWidthsForColumns(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const |
{ |
- // FIXME: make this method virtual and move the code to RenderMultiColumnBlock once the old |
- // multicol code is gone. |
- |
if (!style()->hasAutoColumnCount() || !style()->hasAutoColumnWidth()) { |
// The min/max intrinsic widths calculated really tell how much space elements need when |
// laid out inside the columns. In order to eventually end up with the desired column width, |
@@ -5199,20 +5077,7 @@ RenderBox* RenderBlock::createAnonymousBoxWithSameTypeAs(const RenderObject* par |
bool RenderBlock::hasNextPage(LayoutUnit logicalOffset, PageBoundaryRule pageBoundaryRule) const |
{ |
ASSERT(view()->layoutState() && view()->layoutState()->isPaginated()); |
- |
- RenderFlowThread* flowThread = flowThreadContainingBlock(); |
- if (!flowThread) |
- return true; // Printing and multi-column both make new pages to accommodate content. |
- |
- // See if we're in the last region. |
- LayoutUnit pageOffset = offsetFromLogicalTopOfFirstPage() + logicalOffset; |
- RenderRegion* region = flowThread->regionAtBlockOffset(pageOffset, this); |
- if (!region) |
- return false; |
- if (region->isLastRegion()) |
- return region->isRenderRegionSet() || region->style()->regionFragment() == BreakRegionFragment |
- || (pageBoundaryRule == IncludePageBoundary && pageOffset == region->logicalTopForFlowThreadContent()); |
- return true; |
+ return true; // Printing and multi-column both make new pages to accommodate content. |
} |
LayoutUnit RenderBlock::nextPageLogicalTop(LayoutUnit logicalOffset, PageBoundaryRule pageBoundaryRule) const |
@@ -5240,23 +5105,16 @@ LayoutUnit RenderBlock::pageLogicalTopForOffset(LayoutUnit offset) const |
LayoutUnit blockLogicalTop = isHorizontalWritingMode() ? renderView->layoutState()->m_layoutOffset.height() : renderView->layoutState()->m_layoutOffset.width(); |
LayoutUnit cumulativeOffset = offset + blockLogicalTop; |
- RenderFlowThread* flowThread = flowThreadContainingBlock(); |
- if (!flowThread) { |
- LayoutUnit pageLogicalHeight = renderView->layoutState()->pageLogicalHeight(); |
- if (!pageLogicalHeight) |
- return 0; |
- return cumulativeOffset - roundToInt(cumulativeOffset - firstPageLogicalTop) % roundToInt(pageLogicalHeight); |
- } |
- return flowThread->pageLogicalTopForOffset(cumulativeOffset); |
+ LayoutUnit pageLogicalHeight = renderView->layoutState()->pageLogicalHeight(); |
+ if (!pageLogicalHeight) |
+ return 0; |
+ return cumulativeOffset - roundToInt(cumulativeOffset - firstPageLogicalTop) % roundToInt(pageLogicalHeight); |
} |
LayoutUnit RenderBlock::pageLogicalHeightForOffset(LayoutUnit offset) const |
{ |
RenderView* renderView = view(); |
- RenderFlowThread* flowThread = flowThreadContainingBlock(); |
- if (!flowThread) |
- return renderView->layoutState()->m_pageLogicalHeight; |
- return flowThread->pageLogicalHeightForOffset(offset + offsetFromLogicalTopOfFirstPage()); |
+ return renderView->layoutState()->m_pageLogicalHeight; |
} |
LayoutUnit RenderBlock::pageRemainingLogicalHeightForOffset(LayoutUnit offset, PageBoundaryRule pageBoundaryRule) const |
@@ -5264,35 +5122,27 @@ LayoutUnit RenderBlock::pageRemainingLogicalHeightForOffset(LayoutUnit offset, P |
RenderView* renderView = view(); |
offset += offsetFromLogicalTopOfFirstPage(); |
- RenderFlowThread* flowThread = flowThreadContainingBlock(); |
- if (!flowThread) { |
- LayoutUnit pageLogicalHeight = renderView->layoutState()->m_pageLogicalHeight; |
- LayoutUnit remainingHeight = pageLogicalHeight - intMod(offset, pageLogicalHeight); |
- if (pageBoundaryRule == IncludePageBoundary) { |
- // If includeBoundaryPoint is true the line exactly on the top edge of a |
- // column will act as being part of the previous column. |
- remainingHeight = intMod(remainingHeight, pageLogicalHeight); |
- } |
- return remainingHeight; |
+ LayoutUnit pageLogicalHeight = renderView->layoutState()->m_pageLogicalHeight; |
+ LayoutUnit remainingHeight = pageLogicalHeight - intMod(offset, pageLogicalHeight); |
+ if (pageBoundaryRule == IncludePageBoundary) { |
+ // If includeBoundaryPoint is true the line exactly on the top edge of a |
+ // column will act as being part of the previous column. |
+ remainingHeight = intMod(remainingHeight, pageLogicalHeight); |
} |
- |
- return flowThread->pageRemainingLogicalHeightForOffset(offset, pageBoundaryRule); |
+ return remainingHeight; |
} |
LayoutUnit RenderBlock::adjustForUnsplittableChild(RenderBox* child, LayoutUnit logicalOffset, bool includeMargins) |
{ |
bool checkColumnBreaks = view()->layoutState()->isPaginatingColumns(); |
bool checkPageBreaks = !checkColumnBreaks && view()->layoutState()->m_pageLogicalHeight; |
- RenderFlowThread* flowThread = flowThreadContainingBlock(); |
- bool checkRegionBreaks = flowThread && flowThread->isRenderNamedFlowThread(); |
bool isUnsplittable = child->isUnsplittableForPagination() || (checkColumnBreaks && child->style()->columnBreakInside() == PBAVOID) |
- || (checkPageBreaks && child->style()->pageBreakInside() == PBAVOID) |
- || (checkRegionBreaks && child->style()->regionBreakInside() == PBAVOID); |
+ || (checkPageBreaks && child->style()->pageBreakInside() == PBAVOID); |
if (!isUnsplittable) |
return logicalOffset; |
LayoutUnit childLogicalHeight = logicalHeightForChild(child) + (includeMargins ? marginBeforeForChild(child) + marginAfterForChild(child) : LayoutUnit()); |
LayoutUnit pageLogicalHeight = pageLogicalHeightForOffset(logicalOffset); |
- bool hasUniformPageLogicalHeight = !flowThread || flowThread->regionsHaveUniformLogicalHeight(); |
+ bool hasUniformPageLogicalHeight = true; |
updateMinimumPageHeight(logicalOffset, childLogicalHeight); |
if (!pageLogicalHeight || (hasUniformPageLogicalHeight && childLogicalHeight > pageLogicalHeight) |
|| !hasNextPage(logicalOffset)) |
@@ -5323,15 +5173,11 @@ bool RenderBlock::pushToNextPageWithMinimumLogicalHeight(LayoutUnit& adjustment, |
void RenderBlock::setPageBreak(LayoutUnit offset, LayoutUnit spaceShortage) |
{ |
- if (RenderFlowThread* flowThread = flowThreadContainingBlock()) |
- flowThread->setPageBreak(offsetFromLogicalTopOfFirstPage() + offset, spaceShortage); |
} |
void RenderBlock::updateMinimumPageHeight(LayoutUnit offset, LayoutUnit minHeight) |
{ |
- if (RenderFlowThread* flowThread = flowThreadContainingBlock()) |
- flowThread->updateMinimumPageHeight(offsetFromLogicalTopOfFirstPage() + offset, minHeight); |
- else if (ColumnInfo* colInfo = view()->layoutState()->m_columnInfo) |
+ if (ColumnInfo* colInfo = view()->layoutState()->m_columnInfo) |
colInfo->updateMinimumColumnHeight(minHeight); |
} |
@@ -5353,7 +5199,7 @@ static inline LayoutUnit calculateMinimumPageHeight(RenderStyle* renderStyle, Ro |
return lineBottom - lineTop; |
} |
-void RenderBlock::adjustLinePositionForPagination(RootInlineBox* lineBox, LayoutUnit& delta, RenderFlowThread* flowThread) |
+void RenderBlock::adjustLinePositionForPagination(RootInlineBox* lineBox, LayoutUnit& delta) |
{ |
// FIXME: For now we paginate using line overflow. This ensures that lines don't overlap at all when we |
// put a strut between them for pagination purposes. However, this really isn't the desired rendering, since |
@@ -5383,7 +5229,7 @@ void RenderBlock::adjustLinePositionForPagination(RootInlineBox* lineBox, Layout |
lineBox->setPaginationStrut(0); |
lineBox->setIsFirstAfterPageBreak(false); |
LayoutUnit pageLogicalHeight = pageLogicalHeightForOffset(logicalOffset); |
- bool hasUniformPageLogicalHeight = !flowThread || flowThread->regionsHaveUniformLogicalHeight(); |
+ bool hasUniformPageLogicalHeight = true; |
// If lineHeight is greater than pageLogicalHeight, but logicalVisualOverflow.height() still fits, we are |
// still going to add a strut, so that the visible overflow fits on a single page. |
if (!pageLogicalHeight || (hasUniformPageLogicalHeight && logicalVisualOverflow.height() > pageLogicalHeight) |
@@ -5426,32 +5272,9 @@ void RenderBlock::adjustLinePositionForPagination(RootInlineBox* lineBox, Layout |
} |
} |
-void RenderBlock::updateRegionForLine(RootInlineBox* lineBox) const |
-{ |
- ASSERT(lineBox); |
- lineBox->setContainingRegion(regionAtBlockOffset(lineBox->lineTopWithLeading())); |
- |
- RootInlineBox* prevLineBox = lineBox->prevRootBox(); |
- if (!prevLineBox) |
- return; |
- |
- // This check is more accurate than the one in |adjustLinePositionForPagination| because it takes into |
- // account just the container changes between lines. The before mentioned function doesn't set the flag |
- // correctly if the line is positioned at the top of the last fragment container. |
- if (lineBox->containingRegion() != prevLineBox->containingRegion()) |
- lineBox->setIsFirstAfterPageBreak(true); |
-} |
- |
-bool RenderBlock::lineWidthForPaginatedLineChanged(RootInlineBox* rootBox, LayoutUnit lineDelta, RenderFlowThread* flowThread) const |
+bool RenderBlock::lineWidthForPaginatedLineChanged(RootInlineBox* rootBox, LayoutUnit lineDelta) const |
{ |
- if (!flowThread) |
- return false; |
- |
- RenderRegion* currentRegion = regionAtBlockOffset(rootBox->lineTopWithLeading() + lineDelta); |
- // Just bail if the region didn't change. |
- if (rootBox->containingRegion() == currentRegion) |
- return false; |
- return rootBox->paginatedLineWidth() != availableLogicalWidthForContent(currentRegion); |
+ return false; |
} |
LayoutUnit RenderBlock::offsetFromLogicalTopOfFirstPage() const |
@@ -5460,10 +5283,6 @@ LayoutUnit RenderBlock::offsetFromLogicalTopOfFirstPage() const |
if (layoutState && !layoutState->isPaginated()) |
return 0; |
- RenderFlowThread* flowThread = flowThreadContainingBlock(); |
- if (flowThread) |
- return flowThread->offsetFromLogicalTopOfFirstRegion(this); |
- |
if (layoutState) { |
ASSERT(layoutState->renderer() == this); |
@@ -5475,47 +5294,6 @@ LayoutUnit RenderBlock::offsetFromLogicalTopOfFirstPage() const |
return 0; |
} |
-RenderRegion* RenderBlock::regionAtBlockOffset(LayoutUnit blockOffset) const |
-{ |
- RenderFlowThread* flowThread = flowThreadContainingBlock(); |
- if (!flowThread || !flowThread->hasValidRegionInfo()) |
- return 0; |
- |
- return flowThread->regionAtBlockOffset(offsetFromLogicalTopOfFirstPage() + blockOffset, true); |
-} |
- |
-bool RenderBlock::logicalWidthChangedInRegions(RenderFlowThread* flowThread) const |
-{ |
- if (!flowThread || !flowThread->hasValidRegionInfo()) |
- return false; |
- |
- return flowThread->logicalWidthChangedInRegionsForBlock(this); |
-} |
- |
-RenderRegion* RenderBlock::clampToStartAndEndRegions(RenderRegion* region) const |
-{ |
- RenderFlowThread* flowThread = flowThreadContainingBlock(); |
- |
- ASSERT(isRenderView() || (region && flowThread)); |
- if (isRenderView()) |
- return region; |
- |
- // We need to clamp to the block, since we want any lines or blocks that overflow out of the |
- // logical top or logical bottom of the block to size as though the border box in the first and |
- // last regions extended infinitely. Otherwise the lines are going to size according to the regions |
- // they overflow into, which makes no sense when this block doesn't exist in |region| at all. |
- RenderRegion* startRegion; |
- RenderRegion* endRegion; |
- flowThread->getRegionRangeForBox(this, startRegion, endRegion); |
- |
- if (startRegion && region->logicalTopForFlowThreadContent() < startRegion->logicalTopForFlowThreadContent()) |
- return startRegion; |
- if (endRegion && region->logicalTopForFlowThreadContent() > endRegion->logicalTopForFlowThreadContent()) |
- return endRegion; |
- |
- return region; |
-} |
- |
LayoutUnit RenderBlock::collapsedMarginBeforeForChild(const RenderBox* child) const |
{ |
// If the child has the same directionality as we do, then we can just return its |