Commit af6b8e17 authored by mitz@apple.com's avatar mitz@apple.com

RenderBlock::addOverhangingFloats() takes superfluous parameters

https://bugs.webkit.org/show_bug.cgi?id=67863

Reviewed by Dave Hyatt.

No new tests, because behavior is unchanged.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::layoutBlockChild):
(WebCore::RenderBlock::addOverhangingFloats): Removed the logical{Left, Top}Offset parameters,
since they were always the inverse of the logical{Left, Top}() of the child parameter.
* rendering/RenderBlock.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1cd9c170
2011-09-09 Dan Bernstein <mitz@apple.com>
RenderBlock::addOverhangingFloats() takes superfluous parameters
https://bugs.webkit.org/show_bug.cgi?id=67863
Reviewed by Dave Hyatt.
No new tests, because behavior is unchanged.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::layoutBlockChild):
(WebCore::RenderBlock::addOverhangingFloats): Removed the logical{Left, Top}Offset parameters,
since they were always the inverse of the logical{Left, Top}() of the child parameter.
* rendering/RenderBlock.h:
2011-09-09 Rafael Antognolli <antognolli@profusion.mobi>
Add replacement functions for gdk ones.
......@@ -1295,7 +1295,7 @@ void RenderBlock::layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeigh
if (child->isBlockFlow() && !child->isFloatingOrPositioned()) {
RenderBlock* block = toRenderBlock(child);
if (block->lowestFloatLogicalBottomIncludingPositionedFloats() + block->logicalTop() > newHeight)
addOverhangingFloats(block, -block->logicalLeft(), -block->logicalTop(), false);
addOverhangingFloats(block, false);
}
}
}
......@@ -2105,7 +2105,7 @@ void RenderBlock::layoutBlockChild(RenderBox* child, MarginInfo& marginInfo, Lay
// If the child has overhanging floats that intrude into following siblings (or possibly out
// of this block), then the parent gets notified of the floats now.
if (childRenderBlock && childRenderBlock->containsFloats())
maxFloatLogicalBottom = max(maxFloatLogicalBottom, addOverhangingFloats(toRenderBlock(child), -child->logicalLeft(), -child->logicalTop(), !childNeededLayout));
maxFloatLogicalBottom = max(maxFloatLogicalBottom, addOverhangingFloats(toRenderBlock(child), !childNeededLayout));
LayoutSize childOffset(child->x() - oldRect.x(), child->y() - oldRect.y());
if (childOffset.width() || childOffset.height()) {
......@@ -3809,13 +3809,14 @@ void RenderBlock::clearFloats(BlockLayoutPass layoutPass)
}
}
LayoutUnit RenderBlock::addOverhangingFloats(RenderBlock* child, LayoutUnit logicalLeftOffset, LayoutUnit logicalTopOffset, bool makeChildPaintOtherFloats)
LayoutUnit RenderBlock::addOverhangingFloats(RenderBlock* child, bool makeChildPaintOtherFloats)
{
// Prevent floats from being added to the canvas by the root element, e.g., <html>.
if (child->hasOverflowClip() || !child->containsFloats() || child->isRoot() || child->hasColumns() || child->isWritingModeRoot())
return 0;
LayoutUnit childLogicalTop = child->logicalTop();
LayoutUnit childLogicalLeft = child->logicalLeft();
LayoutUnit lowestFloatLogicalBottom = 0;
// Floats that will remain the child's responsibility to paint should factor into its
......@@ -3830,8 +3831,8 @@ LayoutUnit RenderBlock::addOverhangingFloats(RenderBlock* child, LayoutUnit logi
if (logicalBottom > logicalHeight()) {
// If the object is not in the list, we add it now.
if (!containsFloat(r->m_renderer)) {
LayoutUnit leftOffset = isHorizontalWritingMode() ? logicalLeftOffset : logicalTopOffset;
LayoutUnit topOffset = isHorizontalWritingMode() ? logicalTopOffset : logicalLeftOffset;
LayoutUnit leftOffset = isHorizontalWritingMode() ? -childLogicalLeft : -childLogicalTop;
LayoutUnit topOffset = isHorizontalWritingMode() ? -childLogicalTop : -childLogicalLeft;
FloatingObject* floatingObj = new FloatingObject(r->type(), LayoutRect(r->x() - leftOffset, r->y() - topOffset, r->width(), r->height()));
floatingObj->m_renderer = r->m_renderer;
......
......@@ -631,7 +631,7 @@ private:
bool hasOverhangingFloats() { return parent() && !hasColumns() && containsFloats() && lowestFloatLogicalBottomIncludingPositionedFloats() > logicalHeight(); }
bool hasOverhangingFloat(RenderBox*);
void addIntrudingFloats(RenderBlock* prev, LayoutUnit xoffset, LayoutUnit yoffset);
LayoutUnit addOverhangingFloats(RenderBlock* child, LayoutUnit xoffset, LayoutUnit yoffset, bool makeChildPaintOtherFloats);
LayoutUnit addOverhangingFloats(RenderBlock* child, bool makeChildPaintOtherFloats);
LayoutUnit lowestFloatLogicalBottom() const { return lowestFloatLogicalBottom(FloatingObject::FloatLeftRight); }
LayoutUnit lowestFloatLogicalBottomIncludingPositionedFloats() const { return lowestFloatLogicalBottom(FloatingObject::FloatAll); }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment