Modified: trunk/Source/WebCore/ChangeLog (94876 => 94877)
--- trunk/Source/WebCore/ChangeLog 2011-09-09 22:06:03 UTC (rev 94876)
+++ trunk/Source/WebCore/ChangeLog 2011-09-09 22:08:52 UTC (rev 94877)
@@ -1,3 +1,19 @@
+2011-09-09 Dan Bernstein <m...@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 <antogno...@profusion.mobi>
Add replacement functions for gdk ones.
Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (94876 => 94877)
--- trunk/Source/WebCore/rendering/RenderBlock.cpp 2011-09-09 22:06:03 UTC (rev 94876)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp 2011-09-09 22:08:52 UTC (rev 94877)
@@ -1295,7 +1295,7 @@
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 @@
// 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 @@
}
}
-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 @@
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;
Modified: trunk/Source/WebCore/rendering/RenderBlock.h (94876 => 94877)
--- trunk/Source/WebCore/rendering/RenderBlock.h 2011-09-09 22:06:03 UTC (rev 94876)
+++ trunk/Source/WebCore/rendering/RenderBlock.h 2011-09-09 22:08:52 UTC (rev 94877)
@@ -631,7 +631,7 @@
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); }