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

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

Issue 457773002: Unable to scroll in Chrome system URLs(history,settings,extension) pages (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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/platform/win/fast/repaint/repaint-during-scroll-with-zoom-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/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index d53870f5c9a144d26542dd4c8ae453bd4523c01c..c9222acd783a73a7b9575cb7c47b38489f9ddec6 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -1254,13 +1254,14 @@ void FrameView::scrollContentsIfNeeded()
bool FrameView::scrollContentsFastPath(const IntSize& scrollDelta, const IntRect& rectToScroll)
{
+ if (!contentsInCompositedLayer())
+ return false;
+
if (!m_viewportConstrainedObjects || m_viewportConstrainedObjects->isEmpty()) {
hostWindow()->scroll();
return true;
}
- const bool isCompositedContentLayer = contentsInCompositedLayer();
-
// Get the rects of the fixed objects visible in the rectToScroll
Region regionToUpdate;
ViewportConstrainedObjectSet::const_iterator end = m_viewportConstrainedObjects->end();
@@ -1289,29 +1290,24 @@ bool FrameView::scrollContentsFastPath(const IntSize& scrollDelta, const IntRect
const RenderLayerModelObject* repaintContainer = layer->renderer()->containerForPaintInvalidation();
if (repaintContainer && !repaintContainer->isRenderView()) {
- // If the fixed-position layer is contained by a composited layer that is not its containing block,
- // then we have to invalidate that enclosing layer, not the RenderView.
- // FIXME: Why do we need to issue this invalidation? Won't the fixed position element just scroll
- // with the enclosing layer.
+ // Invalidate the old and new locations of fixed position elements that are not drawn into the RenderView.
updateRect.moveBy(scrollPosition());
IntRect previousRect = updateRect;
previousRect.move(scrollDelta);
+ // FIXME: Rather than uniting the rects, we should just issue both invalidations.
updateRect.unite(previousRect);
layer->renderer()->invalidatePaintUsingContainer(repaintContainer, updateRect, InvalidationScroll);
} else {
// Coalesce the paint invalidations that will be issued to the renderView.
updateRect = contentsToRootView(updateRect);
- if (!isCompositedContentLayer && clipsPaintInvalidations())
- updateRect.intersect(rectToScroll);
if (!updateRect.isEmpty())
regionToUpdate.unite(updateRect);
}
}
- // 1) scroll
hostWindow()->scroll();
- // 2) update the area of fixed objects that has been invalidated
+ // Invalidate the old and new locations of fixed position elements that are drawn into the RenderView.
Vector<IntRect> subRectsToUpdate = regionToUpdate.rects();
size_t viewportConstrainedObjectsCount = subRectsToUpdate.size();
for (size_t i = 0; i < viewportConstrainedObjectsCount; ++i) {
@@ -1319,15 +1315,8 @@ bool FrameView::scrollContentsFastPath(const IntSize& scrollDelta, const IntRect
IntRect scrolledRect = updateRect;
scrolledRect.move(-scrollDelta);
updateRect.unite(scrolledRect);
- if (isCompositedContentLayer) {
- updateRect = rootViewToContents(updateRect);
- ASSERT(renderView());
- renderView()->layer()->repainter().setBackingNeedsRepaintInRect(updateRect);
- continue;
- }
- if (clipsPaintInvalidations())
- updateRect.intersect(rectToScroll);
- hostWindow()->invalidateContentsAndRootView(updateRect);
+ // FIXME: We should be able to issue these invalidations separately and before we actually scroll.
+ renderView()->layer()->repainter().setBackingNeedsRepaintInRect(rootViewToContents(updateRect));
}
return true;
« no previous file with comments | « LayoutTests/platform/win/fast/repaint/repaint-during-scroll-with-zoom-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698