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 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1454 // See https://codereview.chromium.org/176633003/ for the tests that fail wi
thout this disabler. | 1454 // See https://codereview.chromium.org/176633003/ for the tests that fail wi
thout this disabler. |
1455 DisableCompositingQueryAsserts disabler; | 1455 DisableCompositingQueryAsserts disabler; |
1456 return layer()->hasCompositedLayerMapping() && layer()->compositedLayerMappi
ng()->scrollingLayer(); | 1456 return layer()->hasCompositedLayerMapping() && layer()->compositedLayerMappi
ng()->scrollingLayer(); |
1457 } | 1457 } |
1458 | 1458 |
1459 static bool layerNeedsCompositedScrolling(const RenderLayer* layer) | 1459 static bool layerNeedsCompositedScrolling(const RenderLayer* layer) |
1460 { | 1460 { |
1461 return layer->scrollsOverflow() | 1461 return layer->scrollsOverflow() |
1462 && layer->compositor()->preferCompositingToLCDTextEnabled() | 1462 && layer->compositor()->preferCompositingToLCDTextEnabled() |
1463 && !layer->hasDescendantWithClipPath() | 1463 && !layer->hasDescendantWithClipPath() |
1464 && !layer->hasAncestorWithClipPath(); | 1464 && !layer->hasAncestorWithClipPath() |
| 1465 && !layer->renderer()->style()->hasBorderRadius(); |
1465 } | 1466 } |
1466 | 1467 |
1467 void RenderLayerScrollableArea::updateNeedsCompositedScrolling() | 1468 void RenderLayerScrollableArea::updateNeedsCompositedScrolling() |
1468 { | 1469 { |
1469 const bool needsCompositedScrolling = layerNeedsCompositedScrolling(layer())
; | 1470 const bool needsCompositedScrolling = layerNeedsCompositedScrolling(layer())
; |
1470 if (static_cast<bool>(m_needsCompositedScrolling) != needsCompositedScrollin
g) { | 1471 if (static_cast<bool>(m_needsCompositedScrolling) != needsCompositedScrollin
g) { |
1471 m_needsCompositedScrolling = needsCompositedScrolling; | 1472 m_needsCompositedScrolling = needsCompositedScrolling; |
1472 layer()->didUpdateNeedsCompositedScrolling(); | 1473 layer()->didUpdateNeedsCompositedScrolling(); |
1473 } | 1474 } |
1474 } | 1475 } |
1475 | 1476 |
1476 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) | 1477 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) |
1477 { | 1478 { |
1478 // We only want to track the topmost scroll child for scrollable areas with | 1479 // We only want to track the topmost scroll child for scrollable areas with |
1479 // overlay scrollbars. | 1480 // overlay scrollbars. |
1480 if (!hasOverlayScrollbars()) | 1481 if (!hasOverlayScrollbars()) |
1481 return; | 1482 return; |
1482 m_nextTopmostScrollChild = scrollChild; | 1483 m_nextTopmostScrollChild = scrollChild; |
1483 } | 1484 } |
1484 | 1485 |
1485 } // namespace blink | 1486 } // namespace blink |
OLD | NEW |