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

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

Issue 264713015: iPhone 5c marketing site repaints incorrectly with layer squashing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Now with fix 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 36e156d86028cdd2107256600f5b3dc61a8cc691..ad8c16b306c2926dc3ef3ecb53adda788dc144cc 100644
--- a/Source/core/rendering/RenderLayerRepainter.cpp
+++ b/Source/core/rendering/RenderLayerRepainter.cpp
@@ -203,11 +203,19 @@ void RenderLayerRepainter::setBackingNeedsRepaintInRect(const LayoutRect& r)
if (m_renderer.compositingState() == PaintsIntoGroupedBacking) {
LayoutRect updatedRect(r);
+ RenderLayerModelObject* transformedAncestor = m_renderer.layer()->enclosingTransformedAncestor()->renderer();
+
+ // If the transformedAncestor is actually the RenderView, we might get
+ // confused and think that we can use LayoutState. Ideally, we'd made
+ // LayoutState work for all composited layers as well, but until then
+ // we need to disable LayoutState for squashed layers.
+ LayoutStateDisabler layoutStateDisabler(*transformedAncestor);
+
// This code adjusts the repaint rectangle to be in the space of the transformed ancestor of the grouped (i.e. squashed)
// 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.computeRectForRepaint(m_renderer.layer()->enclosingTransformedAncestor()->renderer(), updatedRect);
+ m_renderer.computeRectForRepaint(transformedAncestor, updatedRect);
updatedRect.moveBy(-m_renderer.layer()->groupedMapping()->squashingOffsetFromTransformedAncestor());
IntRect repaintRect = pixelSnappedIntRect(updatedRect);

Powered by Google App Engine
This is Rietveld 408576698