| 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@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
| 10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
| (...skipping 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1434 return false; | 1434 return false; |
| 1435 | 1435 |
| 1436 // See https://codereview.chromium.org/176633003/ for the tests that fail wi
thout this disabler. | 1436 // See https://codereview.chromium.org/176633003/ for the tests that fail wi
thout this disabler. |
| 1437 DisableCompositingQueryAsserts disabler; | 1437 DisableCompositingQueryAsserts disabler; |
| 1438 return layer()->hasCompositedLayerMapping() && layer()->compositedLayerMappi
ng()->scrollingLayer(); | 1438 return layer()->hasCompositedLayerMapping() && layer()->compositedLayerMappi
ng()->scrollingLayer(); |
| 1439 } | 1439 } |
| 1440 | 1440 |
| 1441 static bool layerNeedsCompositedScrolling(const RenderLayer* layer) | 1441 static bool layerNeedsCompositedScrolling(const RenderLayer* layer) |
| 1442 { | 1442 { |
| 1443 return layer->scrollsOverflow() | 1443 return layer->scrollsOverflow() |
| 1444 && layer->compositor()->acceleratedCompositingForOverflowScrollEnabled() | 1444 && layer->compositor()->preferCompositingToLCDTextEnabled() |
| 1445 && !layer->hasDescendantWithClipPath() | 1445 && !layer->hasDescendantWithClipPath() |
| 1446 && !layer->hasAncestorWithClipPath(); | 1446 && !layer->hasAncestorWithClipPath(); |
| 1447 } | 1447 } |
| 1448 | 1448 |
| 1449 void RenderLayerScrollableArea::updateNeedsCompositedScrolling() | 1449 void RenderLayerScrollableArea::updateNeedsCompositedScrolling() |
| 1450 { | 1450 { |
| 1451 const bool needsCompositedScrolling = layerNeedsCompositedScrolling(layer())
; | 1451 const bool needsCompositedScrolling = layerNeedsCompositedScrolling(layer())
; |
| 1452 if (static_cast<bool>(m_needsCompositedScrolling) != needsCompositedScrollin
g) { | 1452 if (static_cast<bool>(m_needsCompositedScrolling) != needsCompositedScrollin
g) { |
| 1453 m_needsCompositedScrolling = needsCompositedScrolling; | 1453 m_needsCompositedScrolling = needsCompositedScrolling; |
| 1454 layer()->didUpdateNeedsCompositedScrolling(); | 1454 layer()->didUpdateNeedsCompositedScrolling(); |
| 1455 } | 1455 } |
| 1456 } | 1456 } |
| 1457 | 1457 |
| 1458 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) | 1458 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) |
| 1459 { | 1459 { |
| 1460 // We only want to track the topmost scroll child for scrollable areas with | 1460 // We only want to track the topmost scroll child for scrollable areas with |
| 1461 // overlay scrollbars. | 1461 // overlay scrollbars. |
| 1462 if (!hasOverlayScrollbars()) | 1462 if (!hasOverlayScrollbars()) |
| 1463 return; | 1463 return; |
| 1464 m_nextTopmostScrollChild = scrollChild; | 1464 m_nextTopmostScrollChild = scrollChild; |
| 1465 } | 1465 } |
| 1466 | 1466 |
| 1467 } // namespace blink | 1467 } // namespace blink |
| OLD | NEW |