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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp

Issue 2107903002: Repaint non-stacking-context composited children when they scroll. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test. Created 4 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@gmail.com> 9 * Christian Biesinger <cbiesinger@gmail.com>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 376
377 FloatQuad quadForFakeMouseMoveEvent = FloatQuad(FloatRect(layer()->layoutObj ect()->previousPaintInvalidationRectIncludingCompositedScrolling(paintInvalidati onContainer))); 377 FloatQuad quadForFakeMouseMoveEvent = FloatQuad(FloatRect(layer()->layoutObj ect()->previousPaintInvalidationRectIncludingCompositedScrolling(paintInvalidati onContainer)));
378 378
379 quadForFakeMouseMoveEvent = paintInvalidationContainer.localToAbsoluteQuad(q uadForFakeMouseMoveEvent); 379 quadForFakeMouseMoveEvent = paintInvalidationContainer.localToAbsoluteQuad(q uadForFakeMouseMoveEvent);
380 frame->eventHandler().dispatchFakeMouseMoveEventSoonInQuad(quadForFakeMouseM oveEvent); 380 frame->eventHandler().dispatchFakeMouseMoveEventSoonInQuad(quadForFakeMouseM oveEvent);
381 381
382 bool requiresPaintInvalidation = true; 382 bool requiresPaintInvalidation = true;
383 383
384 if (box().view()->compositor()->inCompositingMode()) { 384 if (box().view()->compositor()->inCompositingMode()) {
385 bool onlyScrolledCompositedLayers = scrollsOverflow() 385 bool onlyScrolledCompositedLayers = scrollsOverflow()
386 && !layer()->hasVisibleNonLayerContent() 386 && layer()->isAllScrollingContentComposited()
387 && !layer()->hasNonCompositedChild()
388 && box().style()->backgroundLayers().attachment() != LocalBackground Attachment; 387 && box().style()->backgroundLayers().attachment() != LocalBackground Attachment;
389 388
390 if (usesCompositedScrolling() || onlyScrolledCompositedLayers) 389 if (usesCompositedScrolling() || onlyScrolledCompositedLayers)
391 requiresPaintInvalidation = false; 390 requiresPaintInvalidation = false;
392 } 391 }
393 392
394 // Only the root layer can overlap non-composited fixed-position elements. 393 // Only the root layer can overlap non-composited fixed-position elements.
395 if (!requiresPaintInvalidation && layer()->isRootLayer() && frameView->hasVi ewportConstrainedObjects()) { 394 if (!requiresPaintInvalidation && layer()->isRootLayer() && frameView->hasVi ewportConstrainedObjects()) {
396 if (!frameView->invalidateViewportConstrainedObjects()) 395 if (!frameView->invalidateViewportConstrainedObjects())
397 requiresPaintInvalidation = true; 396 requiresPaintInvalidation = true;
(...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1737 1736
1738 void PaintLayerScrollableArea::DelayScrollPositionClampScope::clampScrollableAre as() 1737 void PaintLayerScrollableArea::DelayScrollPositionClampScope::clampScrollableAre as()
1739 { 1738 {
1740 for (auto& scrollableArea : *s_needsClamp) 1739 for (auto& scrollableArea : *s_needsClamp)
1741 scrollableArea->clampScrollPositionsAfterLayout(); 1740 scrollableArea->clampScrollPositionsAfterLayout();
1742 delete s_needsClamp; 1741 delete s_needsClamp;
1743 s_needsClamp = nullptr; 1742 s_needsClamp = nullptr;
1744 } 1743 }
1745 1744
1746 } // namespace blink 1745 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698