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 1947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1958 return false; | 1958 return false; |
1959 } | 1959 } |
1960 | 1960 |
1961 ASSERT_NOT_REACHED(); | 1961 ASSERT_NOT_REACHED(); |
1962 return m_needsCompositedScrolling; | 1962 return m_needsCompositedScrolling; |
1963 } | 1963 } |
1964 | 1964 |
1965 void RenderLayer::updateNeedsCompositedScrolling() | 1965 void RenderLayer::updateNeedsCompositedScrolling() |
1966 { | 1966 { |
1967 updateCanBeStackingContainer(); | 1967 updateCanBeStackingContainer(); |
1968 | |
1969 bool needsCompositedScrolling = false; | |
1970 updateDescendantDependentFlags(); | 1968 updateDescendantDependentFlags(); |
1971 | 1969 |
1972 ASSERT(renderer()->view()->frameView() && renderer()->view()->frameView()->c
ontainsScrollableArea(this)); | 1970 ASSERT(renderer()->view()->frameView() && renderer()->view()->frameView()->c
ontainsScrollableArea(this)); |
1973 bool forceUseCompositedScrolling = acceleratedCompositingForOverflowScrollEn
abled() | 1971 bool needsCompositedScrolling = acceleratedCompositingForOverflowScrollEnabl
ed() |
1974 && canBeStackingContainer() | 1972 && canBeStackingContainer() |
1975 && !hasUnclippedDescendant(); | 1973 && !hasUnclippedDescendant(); |
1976 | 1974 |
1977 #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING) | |
1978 needsCompositedScrolling = forceUseCompositedScrolling || renderer()->style(
)->useTouchOverflowScrolling(); | |
1979 #else | |
1980 needsCompositedScrolling = forceUseCompositedScrolling; | |
1981 #endif | |
1982 // We gather a boolean value for use with Google UMA histograms to | 1975 // We gather a boolean value for use with Google UMA histograms to |
1983 // quantify the actual effects of a set of patches attempting to | 1976 // quantify the actual effects of a set of patches attempting to |
1984 // relax composited scrolling requirements, thereby increasing the | 1977 // relax composited scrolling requirements, thereby increasing the |
1985 // number of composited overflow divs. | 1978 // number of composited overflow divs. |
1986 if (acceleratedCompositingForOverflowScrollEnabled()) | 1979 if (acceleratedCompositingForOverflowScrollEnabled()) |
1987 HistogramSupport::histogramEnumeration("Renderer.NeedsCompositedScrollin
g", needsCompositedScrolling, 2); | 1980 HistogramSupport::histogramEnumeration("Renderer.NeedsCompositedScrollin
g", needsCompositedScrolling, 2); |
1988 | 1981 |
1989 setNeedsCompositedScrolling(needsCompositedScrolling); | 1982 setNeedsCompositedScrolling(needsCompositedScrolling); |
1990 } | 1983 } |
1991 | 1984 |
(...skipping 4421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6413 } | 6406 } |
6414 } | 6407 } |
6415 | 6408 |
6416 void showLayerTree(const WebCore::RenderObject* renderer) | 6409 void showLayerTree(const WebCore::RenderObject* renderer) |
6417 { | 6410 { |
6418 if (!renderer) | 6411 if (!renderer) |
6419 return; | 6412 return; |
6420 showLayerTree(renderer->enclosingLayer()); | 6413 showLayerTree(renderer->enclosingLayer()); |
6421 } | 6414 } |
6422 #endif | 6415 #endif |
OLD | NEW |