Index: Source/core/rendering/RenderBlockFlow.cpp |
diff --git a/Source/core/rendering/RenderBlockFlow.cpp b/Source/core/rendering/RenderBlockFlow.cpp |
index 5ee2ccd0d47953db2e13d0d3835a93efee239b03..d4660e152511af74bca7fd1714608c347fb0c8bf 100644 |
--- a/Source/core/rendering/RenderBlockFlow.cpp |
+++ b/Source/core/rendering/RenderBlockFlow.cpp |
@@ -361,8 +361,6 @@ void RenderBlockFlow::layoutBlock(bool relayoutChildren) |
while (!done) |
done = layoutBlockFlow(relayoutChildren, pageLogicalHeight, layoutScope); |
- fitBorderToLinesIfNeeded(); |
- |
RenderView* renderView = view(); |
if (renderView->layoutState()->pageLogicalHeight()) |
setPageLogicalOffset(renderView->layoutState()->pageLogicalOffset(*this, logicalTop())); |
@@ -2646,76 +2644,6 @@ bool RenderBlockFlow::hitTestFloats(const HitTestRequest& request, HitTestResult |
return false; |
} |
-void RenderBlockFlow::adjustForBorderFit(LayoutUnit x, LayoutUnit& left, LayoutUnit& right) const |
-{ |
- if (style()->visibility() != VISIBLE) |
- return; |
- |
- // We don't deal with relative positioning. Our assumption is that you shrink to fit the lines without accounting |
- // for either overflow or translations via relative positioning. |
- if (childrenInline()) { |
- for (RootInlineBox* box = firstRootBox(); box; box = box->nextRootBox()) { |
- if (box->firstChild()) |
- left = std::min(left, x + static_cast<LayoutUnit>(box->firstChild()->x())); |
- if (box->lastChild()) |
- right = std::max(right, x + static_cast<LayoutUnit>(ceilf(box->lastChild()->logicalRight()))); |
- } |
- } else { |
- for (RenderBox* obj = firstChildBox(); obj; obj = obj->nextSiblingBox()) { |
- if (!obj->isFloatingOrOutOfFlowPositioned()) { |
- if (obj->isRenderBlockFlow() && !obj->hasOverflowClip()) { |
- toRenderBlockFlow(obj)->adjustForBorderFit(x + obj->x(), left, right); |
- } else if (obj->style()->visibility() == VISIBLE) { |
- // We are a replaced element or some kind of non-block-flow object. |
- left = std::min(left, x + obj->x()); |
- right = std::max(right, x + obj->x() + obj->width()); |
- } |
- } |
- } |
- } |
- |
- if (m_floatingObjects) { |
- const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set(); |
- FloatingObjectSetIterator end = floatingObjectSet.end(); |
- for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) { |
- FloatingObject* floatingObject = it->get(); |
- // Only examine the object if our m_shouldPaint flag is set. |
- if (floatingObject->shouldPaint()) { |
- LayoutUnit floatLeft = xPositionForFloatIncludingMargin(floatingObject) - floatingObject->renderer()->x(); |
- LayoutUnit floatRight = floatLeft + floatingObject->renderer()->width(); |
- left = std::min(left, floatLeft); |
- right = std::max(right, floatRight); |
- } |
- } |
- } |
-} |
- |
-void RenderBlockFlow::fitBorderToLinesIfNeeded() |
-{ |
- if (style()->borderFit() == BorderFitBorder || hasOverrideWidth()) |
- return; |
- |
- // Walk any normal flow lines to snugly fit. |
- LayoutUnit left = LayoutUnit::max(); |
- LayoutUnit right = LayoutUnit::min(); |
- LayoutUnit oldWidth = contentWidth(); |
- adjustForBorderFit(0, left, right); |
- |
- // Clamp to our existing edges. We can never grow. We only shrink. |
- LayoutUnit leftEdge = borderLeft() + paddingLeft(); |
- LayoutUnit rightEdge = leftEdge + oldWidth; |
- left = std::min(rightEdge, std::max(leftEdge, left)); |
- right = std::max(left, std::min(rightEdge, right)); |
- |
- LayoutUnit newContentWidth = right - left; |
- if (newContentWidth == oldWidth) |
- return; |
- |
- setOverrideLogicalContentWidth(newContentWidth); |
- layoutBlock(false); |
- clearOverrideLogicalContentWidth(); |
-} |
- |
LayoutUnit RenderBlockFlow::logicalLeftFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, LayoutUnit logicalHeight) const |
{ |
if (m_floatingObjects && m_floatingObjects->hasLeftObjects()) |