Index: Source/WebCore/rendering/RenderBlockLineLayout.cpp |
=================================================================== |
--- Source/WebCore/rendering/RenderBlockLineLayout.cpp (revision 86001) |
+++ Source/WebCore/rendering/RenderBlockLineLayout.cpp (working copy) |
@@ -716,12 +716,8 @@ |
void RenderBlock::appendFloatingObjectToLastLine(FloatingObject* floatingObject) |
{ |
- // Ensure that the float touches the line. |
- if (RootInlineBox* previousLine = lastRootBox()->prevRootBox()) { |
- if (logicalBottomForFloat(floatingObject) < previousLine->blockLogicalHeight()) |
- setLogicalHeightForFloat(floatingObject, previousLine->blockLogicalHeight() - logicalTopForFloat(floatingObject)); |
- } |
- |
+ ASSERT(!floatingObject->m_originatingLine); |
+ floatingObject->m_originatingLine = lastRootBox(); |
lastRootBox()->appendFloat(floatingObject->renderer()); |
} |
@@ -1041,7 +1037,9 @@ |
if (Vector<RenderBox*>* cleanLineFloats = line->floatsPtr()) { |
Vector<RenderBox*>::iterator end = cleanLineFloats->end(); |
for (Vector<RenderBox*>::iterator f = cleanLineFloats->begin(); f != end; ++f) { |
- insertFloatingObject(*f); |
+ FloatingObject* floatingObject = insertFloatingObject(*f); |
+ ASSERT(!floatingObject->m_originatingLine); |
+ floatingObject->m_originatingLine = line; |
setLogicalHeight(logicalTopForChild(*f) - marginBeforeForChild(*f) + delta); |
positionNewFloats(); |
} |
@@ -1244,7 +1242,9 @@ |
if (Vector<RenderBox*>* cleanLineFloats = line->floatsPtr()) { |
Vector<RenderBox*>::iterator end = cleanLineFloats->end(); |
for (Vector<RenderBox*>::iterator f = cleanLineFloats->begin(); f != end; ++f) { |
- insertFloatingObject(*f); |
+ FloatingObject* floatingObject = insertFloatingObject(*f); |
+ ASSERT(!floatingObject->m_originatingLine); |
+ floatingObject->m_originatingLine = line; |
setLogicalHeight(logicalTopForChild(*f) - marginBeforeForChild(*f)); |
positionNewFloats(); |
ASSERT(floats[numCleanFloats].object == *f); |