Chromium Code Reviews| Index: Source/WebCore/rendering/RenderBlock.cpp |
| =================================================================== |
| --- Source/WebCore/rendering/RenderBlock.cpp (revision 114853) |
| +++ Source/WebCore/rendering/RenderBlock.cpp (working copy) |
| @@ -4128,6 +4128,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()) |
|
Hironori Bono
2012/04/23 00:29:15
It seems the M19 branch does not have RenderBlock:
|
| + 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) { |
| @@ -4136,6 +4147,8 @@ |
| } |
| if (layoutPass == PositionedFloatLayoutPass) |
| addPositionedFloats(); |
| + if (!oldIntrudingFloatSet.isEmpty()) |
| + markAllDescendantsWithFloatsForLayout(); |
| return; |
| } |
| @@ -4246,6 +4259,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(); |
| } |
| } |