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

Unified Diff: Source/core/page/FrameView.cpp

Issue 23523046: Fixed-position repaint invalidations should be sent to the correct composited layer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed null pointer check Created 7 years, 3 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 | « LayoutTests/compositing/repaint/fixed-pos-inside-composited-intermediate-layer-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/FrameView.cpp
diff --git a/Source/core/page/FrameView.cpp b/Source/core/page/FrameView.cpp
index 027028cb28c45cdb403d2cf2052e7b6e8053b669..907316d3135a77f77b2b18736991618676b11a1d 100644
--- a/Source/core/page/FrameView.cpp
+++ b/Source/core/page/FrameView.cpp
@@ -1363,12 +1363,26 @@ bool FrameView::scrollContentsFastPath(const IntSize& scrollDelta, const IntRect
// scroll using the fast path, otherwise the outsets of the filter will be moved around the page.
return false;
}
+
IntRect updateRect = pixelSnappedIntRect(layer->repaintRectIncludingNonCompositingDescendants());
- updateRect = contentsToRootView(updateRect);
- if (!isCompositedContentLayer && clipsRepaints())
- updateRect.intersect(rectToScroll);
- if (!updateRect.isEmpty())
- regionToUpdate.unite(updateRect);
+
+ RenderLayer* enclosingCompositingLayer = layer->enclosingCompositingLayer(false);
+ if (enclosingCompositingLayer && !enclosingCompositingLayer->renderer()->isRenderView()) {
+ // If the fixed-position layer is contained by a composited layer that is not its containing block,
+ // then we have to invlidate that enclosing layer, not the RenderView.
enne (OOO) 2013/09/11 21:09:39 typo: invalidate
+ updateRect.moveBy(scrollPosition());
enne (OOO) 2013/09/11 21:09:39 Can you convince me that the scrollPosition is the
shawnsingh 2013/09/11 23:10:38 The function that computes the update rect 8 lines
enne (OOO) 2013/09/12 00:07:53 Hrm. In that case, why do you need to add scrollPo
+ IntRect previousRect = updateRect;
+ previousRect.move(scrollDelta);
+ updateRect.unite(previousRect);
+ enclosingCompositingLayer->setBackingNeedsRepaintInRect(updateRect);
+ } else {
+ // Coalesce the repaints that will be issued to the renderView.
+ updateRect = contentsToRootView(updateRect);
+ if (!isCompositedContentLayer && clipsRepaints())
+ updateRect.intersect(rectToScroll);
+ if (!updateRect.isEmpty())
+ regionToUpdate.unite(updateRect);
+ }
}
// 1) scroll
« no previous file with comments | « LayoutTests/compositing/repaint/fixed-pos-inside-composited-intermediate-layer-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698