Chromium Code Reviews| 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 |