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

Side by Side Diff: Source/core/frame/FrameView.cpp

Issue 318793002: When performing a fast-path scroll, issue repaints for viewport-constrained layers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix. Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 1401 matching lines...) Expand 10 before | Expand all | Expand 10 after
1412 } 1412 }
1413 1413
1414 if (layer->hasAncestorWithFilterOutsets()) { 1414 if (layer->hasAncestorWithFilterOutsets()) {
1415 // If the fixed layer has a blur/drop-shadow filter applied on at le ast one of its parents, we cannot 1415 // If the fixed layer has a blur/drop-shadow filter applied on at le ast one of its parents, we cannot
1416 // scroll using the fast path, otherwise the outsets of the filter w ill be moved around the page. 1416 // scroll using the fast path, otherwise the outsets of the filter w ill be moved around the page.
1417 return false; 1417 return false;
1418 } 1418 }
1419 1419
1420 IntRect updateRect = pixelSnappedIntRect(layer->repainter().repaintRectI ncludingNonCompositingDescendants()); 1420 IntRect updateRect = pixelSnappedIntRect(layer->repainter().repaintRectI ncludingNonCompositingDescendants());
1421 1421
1422 RenderLayer* enclosingCompositingLayer = layer->enclosingCompositingLaye r(ExcludeSelf); 1422 const RenderLayerModelObject* repaintContainer = layer->renderer()->cont ainerForRepaint();
1423 if (enclosingCompositingLayer && !enclosingCompositingLayer->renderer()- >isRenderView()) { 1423 if (repaintContainer && !repaintContainer->isRenderView()) {
ojan 2014/06/04 20:07:29 Can we really get a null repaintContainer here? It
chrishtr 2014/06/04 20:11:41 Yes it can happen. crbug.com/380147
leviw_travelin_and_unemployed 2014/06/04 20:37:25 Do you have a test case? We shouldn't be getting a
chrishtr 2014/06/04 21:18:57 compositing/reflections/nested-reflection-transfor
ojan 2014/06/07 17:35:23 I don't see scrollContentsFastPath on that stack.
chrishtr 2014/06/09 16:40:17 Ok I see, I misinterpreted your question. It does
1424 // If the fixed-position layer is contained by a composited layer th at is not its containing block, 1424 // If the fixed-position layer is contained by a composited layer th at is not its containing block,
1425 // then we have to invalidate that enclosing layer, not the RenderVi ew. 1425 // then we have to invalidate that enclosing layer, not the RenderVi ew.
1426 // FIXME: Why do we need to issue this invalidation? Won't the fixed position element just scroll 1426 // FIXME: Why do we need to issue this invalidation? Won't the fixed position element just scroll
1427 // with the enclosing layer. 1427 // with the enclosing layer.
1428 updateRect.moveBy(scrollPosition()); 1428 updateRect.moveBy(scrollPosition());
1429 IntRect previousRect = updateRect; 1429 IntRect previousRect = updateRect;
1430 previousRect.move(scrollDelta); 1430 previousRect.move(scrollDelta);
1431 updateRect.unite(previousRect); 1431 updateRect.unite(previousRect);
1432 enclosingCompositingLayer->repainter().setBackingNeedsRepaintInRect( updateRect); 1432 layer->renderer()->repaintUsingContainer(repaintContainer, updateRec t, InvalidationScroll);
1433 } else { 1433 } else {
1434 // Coalesce the repaints that will be issued to the renderView. 1434 // Coalesce the repaints that will be issued to the renderView.
1435 updateRect = contentsToRootView(updateRect); 1435 updateRect = contentsToRootView(updateRect);
1436 if (!isCompositedContentLayer && clipsRepaints()) 1436 if (!isCompositedContentLayer && clipsRepaints())
1437 updateRect.intersect(rectToScroll); 1437 updateRect.intersect(rectToScroll);
1438 if (!updateRect.isEmpty()) 1438 if (!updateRect.isEmpty())
1439 regionToUpdate.unite(updateRect); 1439 regionToUpdate.unite(updateRect);
1440 } 1440 }
1441 } 1441 }
1442 1442
(...skipping 1830 matching lines...) Expand 10 before | Expand all | Expand 10 after
3273 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) 3273 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation)
3274 { 3274 {
3275 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); 3275 ScrollableArea::willRemoveScrollbar(scrollbar, orientation);
3276 if (AXObjectCache* cache = axObjectCache()) { 3276 if (AXObjectCache* cache = axObjectCache()) {
3277 cache->remove(scrollbar); 3277 cache->remove(scrollbar);
3278 cache->handleScrollbarUpdate(this); 3278 cache->handleScrollbarUpdate(this);
3279 } 3279 }
3280 } 3280 }
3281 3281
3282 } // namespace WebCore 3282 } // namespace WebCore
OLDNEW
« 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