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

Unified Diff: Source/core/rendering/RenderLayer.cpp

Issue 328533003: Fix RenderObject::repaintRectangle in situations when the render object is not a layer and is squas… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added test result. Created 6 years, 6 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/core/rendering/RenderLayer.h ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayer.cpp
diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp
index c6a82aebe0221fb132134d7469866d602cb45d23..c77bc4f9f1fb9cbfb35a6dc08191385f14678507 100644
--- a/Source/core/rendering/RenderLayer.cpp
+++ b/Source/core/rendering/RenderLayer.cpp
@@ -693,15 +693,15 @@ void RenderLayer::updatePagination()
}
}
-void RenderLayer::mapRectToRepaintBacking(const RenderLayerModelObject* repaintContainer, LayoutRect& rect) const
+void RenderLayer::mapRectToRepaintBacking(const RenderObject* renderObject, const RenderLayerModelObject* repaintContainer, LayoutRect& rect)
{
if (!repaintContainer->groupedMapping()) {
- m_renderer->mapRectToRepaintBacking(repaintContainer, rect);
+ renderObject->mapRectToRepaintBacking(repaintContainer, rect);
return;
}
- ASSERT(enclosingTransformedAncestor());
- ASSERT(enclosingTransformedAncestor()->renderer());
+ ASSERT(repaintContainer->layer()->enclosingTransformedAncestor());
+ ASSERT(repaintContainer->layer()->enclosingTransformedAncestor()->renderer());
// FIXME: this defensive code should not have to exist. None of these pointers should ever be 0. See crbug.com/370410.
RenderLayerModelObject* transformedAncestor = 0;
@@ -720,7 +720,7 @@ void RenderLayer::mapRectToRepaintBacking(const RenderLayerModelObject* repaintC
// layer. This is because all layers that squash together need to repaint w.r.t. a single container that is
// an ancestor of all of them, in order to properly take into account any local transforms etc.
// FIXME: remove this special-case code that works around the repainting code structure.
- m_renderer->mapRectToRepaintBacking(transformedAncestor, rect);
+ renderObject->mapRectToRepaintBacking(transformedAncestor, rect);
rect.moveBy(-repaintContainer->groupedMapping()->squashingOffsetFromTransformedAncestor());
return;
@@ -731,7 +731,7 @@ LayoutRect RenderLayer::computeRepaintRect(const RenderObject* renderObject, con
if (!repaintContainer->groupedMapping())
return renderObject->computeRepaintRect(repaintContainer->renderer());
LayoutRect rect = renderObject->clippedOverflowRectForRepaint(repaintContainer->renderer());
- repaintContainer->mapRectToRepaintBacking(repaintContainer->renderer(), rect);
+ mapRectToRepaintBacking(repaintContainer->renderer(), repaintContainer->renderer(), rect);
return rect;
}
« no previous file with comments | « Source/core/rendering/RenderLayer.h ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698