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

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 1452 matching lines...) Expand 10 before | Expand all | Expand 10 after
1463 layer()->compositedLayerMapping()->setNeedsGraphicsLayerUpdate(Graph icsLayerUpdateSubtree); 1463 layer()->compositedLayerMapping()->setNeedsGraphicsLayerUpdate(Graph icsLayerUpdateSubtree);
1464 compositor->setNeedsCompositingUpdate(CompositingUpdateAfterGeometry Change); 1464 compositor->setNeedsCompositingUpdate(CompositingUpdateAfterGeometry Change);
1465 } else { 1465 } else {
1466 layer()->setNeedsCompositingInputsUpdate(); 1466 layer()->setNeedsCompositingInputsUpdate();
1467 } 1467 }
1468 } 1468 }
1469 } 1469 }
1470 1470
1471 bool PaintLayerScrollableArea::usesCompositedScrolling() const 1471 bool PaintLayerScrollableArea::usesCompositedScrolling() const
1472 { 1472 {
1473 // Scroll form controls on the main thread so they exhibit correct touch scr oll event bubbling
1474 if (box().isIntrinsicallyScrollable(VerticalScrollbar) || box().isIntrinsica llyScrollable(HorizontalScrollbar))
1475 return false;
1476
1477 // See https://codereview.chromium.org/176633003/ for the tests that fail wi thout this disabler. 1473 // See https://codereview.chromium.org/176633003/ for the tests that fail wi thout this disabler.
1478 DisableCompositingQueryAsserts disabler; 1474 DisableCompositingQueryAsserts disabler;
1479 return layer()->hasCompositedLayerMapping() && layer()->compositedLayerMappi ng()->scrollingLayer(); 1475 return layer()->hasCompositedLayerMapping() && layer()->compositedLayerMappi ng()->scrollingLayer();
1480 } 1476 }
1481 1477
1482 bool PaintLayerScrollableArea::shouldScrollOnMainThread() const 1478 bool PaintLayerScrollableArea::shouldScrollOnMainThread() const
1483 { 1479 {
1480 // Scroll form controls on the main thread so they exhibit correct touch scr oll event bubbling
bokan 2016/08/26 15:38:32 This comment is backwards now since we return "don
chrishtr 2016/08/26 15:42:36 Done.
1481 if (box().isIntrinsicallyScrollable(VerticalScrollbar) || box().isIntrinsica llyScrollable(HorizontalScrollbar))
1482 return false;
1483
1484 if (LocalFrame* frame = box().frame()) { 1484 if (LocalFrame* frame = box().frame()) {
1485 if (Page* page = frame->page()) { 1485 if (Page* page = frame->page()) {
1486 if (page->scrollingCoordinator()->shouldUpdateScrollLayerPositionOnM ainThread()) 1486 if (page->scrollingCoordinator()->shouldUpdateScrollLayerPositionOnM ainThread())
1487 return true; 1487 return true;
1488 } 1488 }
1489 } 1489 }
1490 return ScrollableArea::shouldScrollOnMainThread(); 1490 return ScrollableArea::shouldScrollOnMainThread();
1491 } 1491 }
1492 1492
1493 static bool layerNeedsCompositedScrolling(PaintLayerScrollableArea::LCDTextMode mode, const PaintLayer* layer) 1493 static bool layerNeedsCompositedScrolling(PaintLayerScrollableArea::LCDTextMode mode, const PaintLayer* layer)
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
1773 1773
1774 void PaintLayerScrollableArea::DelayScrollPositionClampScope::clampScrollableAre as() 1774 void PaintLayerScrollableArea::DelayScrollPositionClampScope::clampScrollableAre as()
1775 { 1775 {
1776 for (auto& scrollableArea : *s_needsClamp) 1776 for (auto& scrollableArea : *s_needsClamp)
1777 scrollableArea->clampScrollPositionsAfterLayout(); 1777 scrollableArea->clampScrollPositionsAfterLayout();
1778 delete s_needsClamp; 1778 delete s_needsClamp;
1779 s_needsClamp = nullptr; 1779 s_needsClamp = nullptr;
1780 } 1780 }
1781 1781
1782 } // namespace blink 1782 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698