Index: Source/core/rendering/RenderObject.cpp |
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp |
index 0ef0b5d75a682024a5ce7755584c99deb26c84d9..c96442c6ef24a23a24a1ac54fdc46b79de92b380 100644 |
--- a/Source/core/rendering/RenderObject.cpp |
+++ b/Source/core/rendering/RenderObject.cpp |
@@ -1331,7 +1331,6 @@ RenderLayerModelObject* RenderObject::containerForRepaint() const |
if (!isRooted()) |
return 0; |
- // FIXME: Repaint container should never be null when we're rooted. crbug.com/363699 |
RenderLayerModelObject* repaintContainer = 0; |
RenderView* v = view(); |
ojan
2014/04/23 02:07:31
Mind renaming this to renderView while you're in t
|
@@ -1357,7 +1356,7 @@ RenderLayerModelObject* RenderObject::containerForRepaint() const |
if (!repaintContainer || repaintContainer->flowThreadContainingBlock() != parentRenderFlowThread) |
repaintContainer = parentRenderFlowThread; |
} |
- return repaintContainer; |
+ return repaintContainer ? repaintContainer : v; |
} |
void RenderObject::repaintUsingContainer(const RenderLayerModelObject* repaintContainer, const IntRect& r, InvalidationReason invalidationReason) const |
@@ -1368,11 +1367,8 @@ void RenderObject::repaintUsingContainer(const RenderLayerModelObject* repaintCo |
"info", TRACE_STR_COPY(String::format("rect: %d,%d %dx%d, invalidation_reason: %s", |
r.x(), r.y(), r.width(), r.height(), invalidationReasonToString(invalidationReason)).ascii().data())); |
- // FIXME: Repaint container should never be null. crbug.com/363699 |
- if (!repaintContainer) { |
- view()->repaintViewRectangle(r); |
+ if (!repaintContainer) |
ojan
2014/04/23 02:07:31
Can we ASSERT(!isRooted()) here?
|
return; |
- } |
// FIXME: Don't read compositing state here since we do this in the middle of recalc/layout. |
DisableCompositingQueryAsserts disabler; |
@@ -1443,7 +1439,7 @@ void RenderObject::repaint() const |
// Until those states are fully fledged, I'll just disable the ASSERTS. |
DisableCompositingQueryAsserts disabler; |
RenderLayerModelObject* repaintContainer = containerForRepaint(); |
- repaintUsingContainer(repaintContainer ? repaintContainer : view(), pixelSnappedIntRect(clippedOverflowRectForRepaint(repaintContainer)), InvalidationRepaint); |
+ repaintUsingContainer(repaintContainer, pixelSnappedIntRect(clippedOverflowRectForRepaint(repaintContainer)), InvalidationRepaint); |
} |
void RenderObject::repaintRectangle(const LayoutRect& r) const |
@@ -1464,7 +1460,7 @@ void RenderObject::repaintRectangle(const LayoutRect& r) const |
RenderLayerModelObject* repaintContainer = containerForRepaint(); |
computeRectForRepaint(repaintContainer, dirtyRect); |
- repaintUsingContainer(repaintContainer ? repaintContainer : view(), pixelSnappedIntRect(dirtyRect), InvalidationRepaintRectangle); |
+ repaintUsingContainer(repaintContainer, pixelSnappedIntRect(dirtyRect), InvalidationRepaintRectangle); |
} |
IntRect RenderObject::pixelSnappedAbsoluteClippedOverflowRect() const |
@@ -1558,9 +1554,7 @@ bool RenderObject::repaintAfterLayoutIfNeeded(const RenderLayerModelObject* repa |
if (invalidationReason == InvalidationIncremental && (oldBounds.size().isZero() || newBounds.size().isZero())) |
invalidationReason = InvalidationBoundsChange; |
- // FIXME: Repaint container should never be null. crbug.com/363699 |
- if (!repaintContainer) |
- repaintContainer = v; |
+ ASSERT(repaintContainer); |
if (invalidationReason != InvalidationIncremental) { |
repaintUsingContainer(repaintContainer, pixelSnappedIntRect(oldBounds), invalidationReason); |