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

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: Fix comments. 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 8d33c3215fcc3431e5a6d7436c70f3586f3f4ebc..f60ccc46cb455902af56a65c234a4cfcd80894e0 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);
ojan 2014/06/03 18:41:11 Are there cases where we call this without a repai
chrishtr 2014/06/03 20:47:08 The computeRepaintRect() method is the wrong one t
+ 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;
Ian Vollick 2014/06/03 17:05:16 This seems reasonable to me, but I wonder if it wo
chrishtr 2014/06/03 17:14:52 Yes.
ojan 2014/06/03 18:41:11 This will be fixed when we stop doing repaints dur
chrishtr 2014/06/03 20:47:08 Yes, if that is actually the case. We would need t
for (RenderLayer* curr = m_renderer.layer()->firstChild(); curr; curr = curr->nextSibling()) {
- if (!curr->hasCompositedLayerMapping())
+ if (curr->compositingState() != PaintsIntoOwnBacking && curr->compositingState() != PaintsIntoGroupedBacking)
Ian Vollick 2014/06/03 17:05:16 Do we want to include HasOwnBackingButPaintsIntoAn
chrishtr 2014/06/03 17:14:52 Don't know for sure. I don't really understand Has
chrishtr 2014/06/03 18:14:32 Ok will leave it. if it paints into the ancestor,
Ian Vollick 2014/06/03 18:24:00 Yeah, I agree. The behavior change seems good. I'v
chrishtr 2014/06/03 20:47:07 Hmm. The case here I agree does not actually viol
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