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 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1315 IntRect RenderLayer::scrollableAreaBoundingBox() const | 1315 IntRect RenderLayer::scrollableAreaBoundingBox() const |
| 1316 { | 1316 { |
| 1317 return renderer()->absoluteBoundingBoxRect(); | 1317 return renderer()->absoluteBoundingBoxRect(); |
| 1318 } | 1318 } |
| 1319 | 1319 |
| 1320 bool RenderLayer::userInputScrollable(ScrollbarOrientation orientation) const | 1320 bool RenderLayer::userInputScrollable(ScrollbarOrientation orientation) const |
| 1321 { | 1321 { |
| 1322 RenderBox* box = renderBox(); | 1322 RenderBox* box = renderBox(); |
| 1323 ASSERT(box); | 1323 ASSERT(box); |
| 1324 | 1324 |
| 1325 if (box->isTextField()) | |
| 1326 return orientation == HorizontalScrollbar; | |
|
esprehn
2013/08/12 23:38:06
This doesn't seem writing mode aware.
bokan
2013/08/13 01:13:48
I've changed this to defer the decision to the con
| |
| 1327 | |
| 1325 EOverflow overflowStyle = (orientation == HorizontalScrollbar) ? | 1328 EOverflow overflowStyle = (orientation == HorizontalScrollbar) ? |
| 1326 renderer()->style()->overflowX() : renderer()->style()->overflowY(); | 1329 renderer()->style()->overflowX() : renderer()->style()->overflowY(); |
| 1327 return (overflowStyle == OSCROLL || overflowStyle == OAUTO || overflowStyle == OOVERLAY); | 1330 return (overflowStyle == OSCROLL || overflowStyle == OAUTO || overflowStyle == OOVERLAY); |
| 1328 } | 1331 } |
| 1329 | 1332 |
| 1330 int RenderLayer::pageStep(ScrollbarOrientation orientation) const | 1333 int RenderLayer::pageStep(ScrollbarOrientation orientation) const |
| 1331 { | 1334 { |
| 1332 RenderBox* box = renderBox(); | 1335 RenderBox* box = renderBox(); |
| 1333 ASSERT(box); | 1336 ASSERT(box); |
| 1334 | 1337 |
| (...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1943 | 1946 |
| 1944 void RenderLayer::convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutR ect& rect) const | 1947 void RenderLayer::convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutR ect& rect) const |
| 1945 { | 1948 { |
| 1946 LayoutPoint delta; | 1949 LayoutPoint delta; |
| 1947 convertToLayerCoords(ancestorLayer, delta); | 1950 convertToLayerCoords(ancestorLayer, delta); |
| 1948 rect.move(-delta.x(), -delta.y()); | 1951 rect.move(-delta.x(), -delta.y()); |
| 1949 } | 1952 } |
| 1950 | 1953 |
| 1951 bool RenderLayer::usesCompositedScrolling() const | 1954 bool RenderLayer::usesCompositedScrolling() const |
| 1952 { | 1955 { |
| 1956 // Scroll textfields on the main thread so we get appropriate touch gesture propagation. | |
| 1957 if (renderBox() && renderBox()->isTextField()) | |
| 1958 return false; | |
| 1959 | |
| 1953 return isComposited() && backing()->scrollingLayer(); | 1960 return isComposited() && backing()->scrollingLayer(); |
| 1954 } | 1961 } |
| 1955 | 1962 |
| 1956 bool RenderLayer::needsCompositedScrolling() const | 1963 bool RenderLayer::needsCompositedScrolling() const |
| 1957 { | 1964 { |
| 1958 switch (m_forceNeedsCompositedScrolling) { | 1965 switch (m_forceNeedsCompositedScrolling) { |
| 1959 case DoNotForceCompositedScrolling: | 1966 case DoNotForceCompositedScrolling: |
| 1960 return m_needsCompositedScrolling; | 1967 return m_needsCompositedScrolling; |
| 1961 case CompositedScrollingAlwaysOn: | 1968 case CompositedScrollingAlwaysOn: |
| 1962 return true; | 1969 return true; |
| (...skipping 4388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6351 } | 6358 } |
| 6352 } | 6359 } |
| 6353 | 6360 |
| 6354 void showLayerTree(const WebCore::RenderObject* renderer) | 6361 void showLayerTree(const WebCore::RenderObject* renderer) |
| 6355 { | 6362 { |
| 6356 if (!renderer) | 6363 if (!renderer) |
| 6357 return; | 6364 return; |
| 6358 showLayerTree(renderer->enclosingLayer()); | 6365 showLayerTree(renderer->enclosingLayer()); |
| 6359 } | 6366 } |
| 6360 #endif | 6367 #endif |
| OLD | NEW |