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

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

Issue 309093002: Issue repaints before and after changing the squashing assignment of a RenderLayer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Merged. Created 6 years, 7 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
Index: Source/core/rendering/RenderLayerRepainter.cpp
diff --git a/Source/core/rendering/RenderLayerRepainter.cpp b/Source/core/rendering/RenderLayerRepainter.cpp
index 9f09507868b01fad3686833e05591cb0f97a3a8a..eca0bbcfa870ad829bb4153c7dfb8114c0595493 100644
--- a/Source/core/rendering/RenderLayerRepainter.cpp
+++ b/Source/core/rendering/RenderLayerRepainter.cpp
@@ -152,10 +152,14 @@ void RenderLayerRepainter::repaintIncludingNonCompositingDescendants()
void RenderLayerRepainter::repaintIncludingNonCompositingDescendantsInternal(const RenderLayerModelObject* repaintContainer)
{
- m_renderer.repaintUsingContainer(repaintContainer, pixelSnappedIntRect(m_renderer.computeRepaintRect()), InvalidationLayer);
+ m_renderer.repaintUsingContainer(repaintContainer, pixelSnappedIntRect(m_renderer.boundsRectForRepaint(repaintContainer)), InvalidationLayer);
+
+ // FIXME: Repaints can be issued during style recalc at present, via RenderLayerModelObject::styleWillChange. This happens in scenarios when
+ // repaint is needed but not layout.
+ DisableCompositingQueryAsserts disabler;
for (RenderLayer* curr = m_renderer.layer()->firstChild(); curr; curr = curr->nextSibling()) {
- if (!curr->hasCompositedLayerMapping())
+ if (curr->compositingState() != PaintsIntoOwnBacking && curr->compositingState() != PaintsIntoGroupedBacking)
curr->repainter().repaintIncludingNonCompositingDescendantsInternal(repaintContainer);
}
}
@@ -170,7 +174,7 @@ LayoutRect RenderLayerRepainter::repaintRectIncludingNonCompositingDescendants()
for (RenderLayer* child = m_renderer.layer()->firstChild(); child; child = child->nextSibling()) {
// Don't include repaint rects for composited child layers; they will paint themselves and have a different origin.
- if (child->hasCompositedLayerMapping())
+ if (child->compositingState() == PaintsIntoOwnBacking || child->compositingState() == PaintsIntoGroupedBacking)
continue;
repaintRect.unite(child->repainter().repaintRectIncludingNonCompositingDescendants());

Powered by Google App Engine
This is Rietveld 408576698