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 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1313 IntRect RenderLayer::scrollableAreaBoundingBox() const | 1313 IntRect RenderLayer::scrollableAreaBoundingBox() const |
1314 { | 1314 { |
1315 return renderer()->absoluteBoundingBoxRect(); | 1315 return renderer()->absoluteBoundingBoxRect(); |
1316 } | 1316 } |
1317 | 1317 |
1318 bool RenderLayer::userInputScrollable(ScrollbarOrientation orientation) const | 1318 bool RenderLayer::userInputScrollable(ScrollbarOrientation orientation) const |
1319 { | 1319 { |
1320 RenderBox* box = renderBox(); | 1320 RenderBox* box = renderBox(); |
1321 ASSERT(box); | 1321 ASSERT(box); |
1322 | 1322 |
| 1323 if (box->isIntristicallyScrollable(orientation)) |
| 1324 return true; |
| 1325 |
1323 EOverflow overflowStyle = (orientation == HorizontalScrollbar) ? | 1326 EOverflow overflowStyle = (orientation == HorizontalScrollbar) ? |
1324 renderer()->style()->overflowX() : renderer()->style()->overflowY(); | 1327 renderer()->style()->overflowX() : renderer()->style()->overflowY(); |
1325 return (overflowStyle == OSCROLL || overflowStyle == OAUTO || overflowStyle
== OOVERLAY); | 1328 return (overflowStyle == OSCROLL || overflowStyle == OAUTO || overflowStyle
== OOVERLAY); |
1326 } | 1329 } |
1327 | 1330 |
1328 int RenderLayer::pageStep(ScrollbarOrientation orientation) const | 1331 int RenderLayer::pageStep(ScrollbarOrientation orientation) const |
1329 { | 1332 { |
1330 RenderBox* box = renderBox(); | 1333 RenderBox* box = renderBox(); |
1331 ASSERT(box); | 1334 ASSERT(box); |
1332 | 1335 |
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1941 | 1944 |
1942 void RenderLayer::convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutR
ect& rect) const | 1945 void RenderLayer::convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutR
ect& rect) const |
1943 { | 1946 { |
1944 LayoutPoint delta; | 1947 LayoutPoint delta; |
1945 convertToLayerCoords(ancestorLayer, delta); | 1948 convertToLayerCoords(ancestorLayer, delta); |
1946 rect.move(-delta.x(), -delta.y()); | 1949 rect.move(-delta.x(), -delta.y()); |
1947 } | 1950 } |
1948 | 1951 |
1949 bool RenderLayer::usesCompositedScrolling() const | 1952 bool RenderLayer::usesCompositedScrolling() const |
1950 { | 1953 { |
| 1954 RenderBox* box = renderBox(); |
| 1955 |
| 1956 // Scroll form controls on the main thread so they exhibit correct touch scr
oll event bubbling |
| 1957 if (box && (box->isIntristicallyScrollable(VerticalScrollbar) || box->isIntr
isticallyScrollable(HorizontalScrollbar))) |
| 1958 return false; |
| 1959 |
1951 return isComposited() && backing()->scrollingLayer(); | 1960 return isComposited() && backing()->scrollingLayer(); |
1952 } | 1961 } |
1953 | 1962 |
1954 bool RenderLayer::needsCompositedScrolling() const | 1963 bool RenderLayer::needsCompositedScrolling() const |
1955 { | 1964 { |
1956 switch (m_forceNeedsCompositedScrolling) { | 1965 switch (m_forceNeedsCompositedScrolling) { |
1957 case DoNotForceCompositedScrolling: | 1966 case DoNotForceCompositedScrolling: |
1958 return m_needsCompositedScrolling; | 1967 return m_needsCompositedScrolling; |
1959 case CompositedScrollingAlwaysOn: | 1968 case CompositedScrollingAlwaysOn: |
1960 return true; | 1969 return true; |
(...skipping 4385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6346 } | 6355 } |
6347 } | 6356 } |
6348 | 6357 |
6349 void showLayerTree(const WebCore::RenderObject* renderer) | 6358 void showLayerTree(const WebCore::RenderObject* renderer) |
6350 { | 6359 { |
6351 if (!renderer) | 6360 if (!renderer) |
6352 return; | 6361 return; |
6353 showLayerTree(renderer->enclosingLayer()); | 6362 showLayerTree(renderer->enclosingLayer()); |
6354 } | 6363 } |
6355 #endif | 6364 #endif |
OLD | NEW |