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@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
| 10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
| (...skipping 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1393 | 1393 |
| 1394 if (needsToBeStackingContainerDidChange || needsCompositedScrollingDidChange ) { | 1394 if (needsToBeStackingContainerDidChange || needsCompositedScrollingDidChange ) { |
| 1395 // Note, the z-order lists may need to be rebuilt, but our code guarante es | 1395 // Note, the z-order lists may need to be rebuilt, but our code guarante es |
| 1396 // that we have not affected stacking, so we will not dirty | 1396 // that we have not affected stacking, so we will not dirty |
| 1397 // m_descendantsAreContiguousInStackingOrder for either us or our stacki ng | 1397 // m_descendantsAreContiguousInStackingOrder for either us or our stacki ng |
| 1398 // context or container. | 1398 // context or container. |
| 1399 layer()->didUpdateNeedsCompositedScrolling(); | 1399 layer()->didUpdateNeedsCompositedScrolling(); |
| 1400 } | 1400 } |
| 1401 } | 1401 } |
| 1402 | 1402 |
| 1403 bool RenderLayerScrollableArea::setNeedsCompositedScrolling(bool needsComposited Scrolling) | 1403 bool RenderLayerScrollableArea::setNeedsCompositedScrolling(bool needsComposited Scrolling) |
|
Nico
2013/11/06 05:03:14
same ugh, same comment about the next line
| |
| 1404 { | 1404 { |
| 1405 if (m_needsCompositedScrolling == needsCompositedScrolling) | 1405 if (static_cast<bool>(m_needsCompositedScrolling) == needsCompositedScrollin g) |
| 1406 return false; | 1406 return false; |
| 1407 | 1407 |
| 1408 // Count the total number of RenderLayers which need composited scrolling at | 1408 // Count the total number of RenderLayers which need composited scrolling at |
| 1409 // some point. This should be recorded at most once per RenderLayer, so we | 1409 // some point. This should be recorded at most once per RenderLayer, so we |
| 1410 // check m_willUseCompositedScrollingHasBeenRecorded. | 1410 // check m_willUseCompositedScrollingHasBeenRecorded. |
| 1411 if (layer()->acceleratedCompositingForOverflowScrollEnabled() && !m_willUseC ompositedScrollingHasBeenRecorded) { | 1411 if (layer()->acceleratedCompositingForOverflowScrollEnabled() && !m_willUseC ompositedScrollingHasBeenRecorded) { |
| 1412 WebKit::Platform::current()->histogramEnumeration("Renderer.CompositedSc rolling", RenderLayer::WillUseCompositedScrollingBucket, RenderLayer::Composited ScrollingHistogramMax); | 1412 WebKit::Platform::current()->histogramEnumeration("Renderer.CompositedSc rolling", RenderLayer::WillUseCompositedScrollingBucket, RenderLayer::Composited ScrollingHistogramMax); |
| 1413 m_willUseCompositedScrollingHasBeenRecorded = true; | 1413 m_willUseCompositedScrollingHasBeenRecorded = true; |
| 1414 } | 1414 } |
| 1415 | 1415 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1469 void RenderLayerScrollableArea::setForceNeedsCompositedScrolling(ForceNeedsCompo sitedScrollingMode mode) | 1469 void RenderLayerScrollableArea::setForceNeedsCompositedScrolling(ForceNeedsCompo sitedScrollingMode mode) |
| 1470 { | 1470 { |
| 1471 if (m_forceNeedsCompositedScrolling == mode) | 1471 if (m_forceNeedsCompositedScrolling == mode) |
| 1472 return; | 1472 return; |
| 1473 | 1473 |
| 1474 m_forceNeedsCompositedScrolling = mode; | 1474 m_forceNeedsCompositedScrolling = mode; |
| 1475 layer()->didUpdateNeedsCompositedScrolling(); | 1475 layer()->didUpdateNeedsCompositedScrolling(); |
| 1476 } | 1476 } |
| 1477 | 1477 |
| 1478 } // Namespace WebCore | 1478 } // Namespace WebCore |
| OLD | NEW |