Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |