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

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

Issue 9129033: Merge 104121 - Source/WebCore: Crash in RenderRegion::getRegionRangeForBox. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 8 years, 11 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 | « Source/WebCore/rendering/RenderFlowThread.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/RenderFlowThread.cpp
===================================================================
--- Source/WebCore/rendering/RenderFlowThread.cpp (revision 105783)
+++ Source/WebCore/rendering/RenderFlowThread.cpp (working copy)
@@ -209,7 +209,9 @@
void RenderFlowThread::removeRegionFromThread(RenderRegion* renderRegion)
{
ASSERT(renderRegion);
+ clearRenderRegionRangeMap();
m_regionList.remove(renderRegion);
+
if (renderRegion->parentFlowThread()) {
if (!renderRegion->isValid()) {
renderRegion->parentFlowThread()->m_observerThreadsSet.remove(this);
@@ -499,7 +501,7 @@
void RenderFlowThread::repaintRectangleInRegions(const LayoutRect& repaintRect, bool immediate)
{
- if (!shouldRepaint(repaintRect))
+ if (!shouldRepaint(repaintRect) || !hasValidRegionInfo())
return;
for (RenderRegionList::iterator iter = m_regionList.begin(); iter != m_regionList.end(); ++iter) {
@@ -593,7 +595,7 @@
RenderRegion* RenderFlowThread::mapFromFlowToRegion(TransformState& transformState) const
{
- if (!hasValidRegions())
+ if (!hasValidRegionInfo())
return 0;
LayoutRect boxRect = transformState.mappedQuad().enclosingBoundingBox();
@@ -674,7 +676,7 @@
LayoutUnit RenderFlowThread::contentLogicalWidthOfFirstRegion() const
{
- if (!hasValidRegions())
+ if (!hasValidRegionInfo())
return 0;
for (RenderRegionList::const_iterator iter = m_regionList.begin(); iter != m_regionList.end(); ++iter) {
RenderRegion* region = *iter;
@@ -688,7 +690,7 @@
LayoutUnit RenderFlowThread::contentLogicalHeightOfFirstRegion() const
{
- if (!hasValidRegions())
+ if (!hasValidRegionInfo())
return 0;
for (RenderRegionList::const_iterator iter = m_regionList.begin(); iter != m_regionList.end(); ++iter) {
RenderRegion* region = *iter;
@@ -702,7 +704,7 @@
LayoutUnit RenderFlowThread::contentLogicalLeftOfFirstRegion() const
{
- if (!hasValidRegions())
+ if (!hasValidRegionInfo())
return 0;
for (RenderRegionList::const_iterator iter = m_regionList.begin(); iter != m_regionList.end(); ++iter) {
RenderRegion* region = *iter;
@@ -716,7 +718,7 @@
RenderRegion* RenderFlowThread::firstRegion() const
{
- if (!hasValidRegions())
+ if (!hasValidRegionInfo())
return 0;
for (RenderRegionList::const_iterator iter = m_regionList.begin(); iter != m_regionList.end(); ++iter) {
RenderRegion* region = *iter;
@@ -729,7 +731,7 @@
RenderRegion* RenderFlowThread::lastRegion() const
{
- if (!hasValidRegions())
+ if (!hasValidRegionInfo())
return 0;
for (RenderRegionList::const_reverse_iterator iter = m_regionList.rbegin(); iter != m_regionList.rend(); ++iter) {
RenderRegion* region = *iter;
@@ -779,8 +781,10 @@
RenderRegionRange* range = m_regionRangeMap.get(box);
if (!range)
return;
+
startRegion = range->startRegion();
endRegion = range->endRegion();
+ ASSERT(m_regionList.contains(startRegion) && m_regionList.contains(endRegion));
}
} // namespace WebCore
« no previous file with comments | « Source/WebCore/rendering/RenderFlowThread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698