Index: Source/WebCore/rendering/RenderFlowThread.cpp |
=================================================================== |
--- Source/WebCore/rendering/RenderFlowThread.cpp (revision 107302) |
+++ Source/WebCore/rendering/RenderFlowThread.cpp (working copy) |
@@ -204,6 +204,7 @@ |
void RenderFlowThread::removeRegionFromThread(RenderRegion* renderRegion) |
{ |
ASSERT(renderRegion); |
+ |
m_regionRangeMap.clear(); |
m_regionList.remove(renderRegion); |
@@ -628,7 +629,7 @@ |
RenderRegion* startRegion; |
RenderRegion* endRegion; |
getRegionRangeForBox(box, startRegion, endRegion); |
- |
+ |
for (RenderRegionList::iterator iter = m_regionList.find(startRegion); iter != m_regionList.end(); ++iter) { |
RenderRegion* region = *iter; |
if (!region->isValid()) |
@@ -637,7 +638,17 @@ |
if (region == endRegion) |
break; |
} |
- |
+ |
+#ifndef NDEBUG |
+ // We have to make sure we did not left any boxes with region info attached in regions. |
+ for (RenderRegionList::iterator iter = m_regionList.begin(); iter != m_regionList.end(); ++iter) { |
+ RenderRegion* region = *iter; |
+ if (!region->isValid()) |
+ continue; |
+ ASSERT(!region->renderBoxRegionInfo(box)); |
+ } |
+#endif |
+ |
m_regionRangeMap.remove(box); |
} |