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

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

Issue 2271883002: Fix paint invalidation and painting for composited-scrolling input elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: none Created 4 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 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 1450 matching lines...) Expand 10 before | Expand all | Expand 10 after
1461 layer()->compositedLayerMapping()->setNeedsGraphicsLayerUpdate(Graph icsLayerUpdateSubtree); 1461 layer()->compositedLayerMapping()->setNeedsGraphicsLayerUpdate(Graph icsLayerUpdateSubtree);
1462 compositor->setNeedsCompositingUpdate(CompositingUpdateAfterGeometry Change); 1462 compositor->setNeedsCompositingUpdate(CompositingUpdateAfterGeometry Change);
1463 } else { 1463 } else {
1464 layer()->setNeedsCompositingInputsUpdate(); 1464 layer()->setNeedsCompositingInputsUpdate();
1465 } 1465 }
1466 } 1466 }
1467 } 1467 }
1468 1468
1469 bool PaintLayerScrollableArea::usesCompositedScrolling() const 1469 bool PaintLayerScrollableArea::usesCompositedScrolling() const
1470 { 1470 {
1471 // Scroll form controls on the main thread so they exhibit correct touch scr oll event bubbling
1472 if (box().isIntrinsicallyScrollable(VerticalScrollbar) || box().isIntrinsica llyScrollable(HorizontalScrollbar))
1473 return false;
1474
1475 // See https://codereview.chromium.org/176633003/ for the tests that fail wi thout this disabler. 1471 // See https://codereview.chromium.org/176633003/ for the tests that fail wi thout this disabler.
1476 DisableCompositingQueryAsserts disabler; 1472 DisableCompositingQueryAsserts disabler;
1477 return layer()->hasCompositedLayerMapping() && layer()->compositedLayerMappi ng()->scrollingLayer(); 1473 return layer()->hasCompositedLayerMapping() && layer()->compositedLayerMappi ng()->scrollingLayer();
1478 } 1474 }
1479 1475
1480 bool PaintLayerScrollableArea::shouldScrollOnMainThread() const 1476 bool PaintLayerScrollableArea::shouldScrollOnMainThread() const
1481 { 1477 {
1482 if (LocalFrame* frame = box().frame()) { 1478 if (LocalFrame* frame = box().frame()) {
1483 if (Page* page = frame->page()) { 1479 if (Page* page = frame->page()) {
1484 if (page->scrollingCoordinator()->shouldUpdateScrollLayerPositionOnM ainThread()) 1480 if (page->scrollingCoordinator()->shouldUpdateScrollLayerPositionOnM ainThread())
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
1771 1767
1772 void PaintLayerScrollableArea::DelayScrollPositionClampScope::clampScrollableAre as() 1768 void PaintLayerScrollableArea::DelayScrollPositionClampScope::clampScrollableAre as()
1773 { 1769 {
1774 for (auto& scrollableArea : *s_needsClamp) 1770 for (auto& scrollableArea : *s_needsClamp)
1775 scrollableArea->clampScrollPositionsAfterLayout(); 1771 scrollableArea->clampScrollPositionsAfterLayout();
1776 delete s_needsClamp; 1772 delete s_needsClamp;
1777 s_needsClamp = nullptr; 1773 s_needsClamp = nullptr;
1778 } 1774 }
1779 1775
1780 } // namespace blink 1776 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698