Index: Source/WebCore/rendering/RenderBlock.cpp |
=================================================================== |
--- Source/WebCore/rendering/RenderBlock.cpp (revision 114852) |
+++ Source/WebCore/rendering/RenderBlock.cpp (working copy) |
@@ -3987,6 +3987,17 @@ |
// Clear our positioned floats boolean. |
m_hasPositionedFloats = false; |
+ HashSet<RenderBox*> oldIntrudingFloatSet; |
+ if (!childrenInline() && m_floatingObjects) { |
+ const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set(); |
+ FloatingObjectSetIterator end = floatingObjectSet.end(); |
+ for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) { |
+ FloatingObject* floatingObject = *it; |
+ if (!floatingObject->isDescendant()) |
+ oldIntrudingFloatSet.add(floatingObject->m_renderer); |
+ } |
+ } |
+ |
// Inline blocks are covered by the isReplaced() check in the avoidFloats method. |
if (avoidsFloats() || isRoot() || isRenderView() || isFloatingOrPositioned() || isTableCell()) { |
if (m_floatingObjects) { |
@@ -3995,6 +4006,8 @@ |
} |
if (layoutPass == PositionedFloatLayoutPass) |
addPositionedFloats(); |
+ if (!oldIntrudingFloatSet.isEmpty()) |
+ markAllDescendantsWithFloatsForLayout(); |
return; |
} |
@@ -4097,6 +4110,15 @@ |
deleteAllValues(floatMap); |
markLinesDirtyInBlockRange(changeLogicalTop, changeLogicalBottom); |
+ } else if (!oldIntrudingFloatSet.isEmpty()) { |
+ // If there are previously intruding floats that no longer intrude, then children with floats |
+ // should also get layout because they might need their floating object lists cleared. |
+ const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set(); |
+ FloatingObjectSetIterator end = floatingObjectSet.end(); |
+ for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) |
+ oldIntrudingFloatSet.remove((*it)->m_renderer); |
+ if (!oldIntrudingFloatSet.isEmpty()) |
+ markAllDescendantsWithFloatsForLayout(); |
} |
} |