Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(202)

Unified Diff: Source/WebCore/rendering/RenderBlock.cpp

Issue 10170019: Merge 112935 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/block/float/intruding-float-not-removed-from-descendant-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
}
« no previous file with comments | « LayoutTests/fast/block/float/intruding-float-not-removed-from-descendant-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698