| 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 2066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2077 restrictedByLineClamp = !renderer()->parent()->style()->lineClamp().isNo
ne(); | 2077 restrictedByLineClamp = !renderer()->parent()->style()->lineClamp().isNo
ne(); |
| 2078 | 2078 |
| 2079 if (renderer()->hasOverflowClip() && !restrictedByLineClamp) { | 2079 if (renderer()->hasOverflowClip() && !restrictedByLineClamp) { |
| 2080 IntSize newScrollOffset = adjustedScrollOffset() + delta; | 2080 IntSize newScrollOffset = adjustedScrollOffset() + delta; |
| 2081 scrollToOffset(newScrollOffset, clamp); | 2081 scrollToOffset(newScrollOffset, clamp); |
| 2082 | 2082 |
| 2083 // If this layer can't do the scroll we ask the next layer up that can s
croll to try | 2083 // If this layer can't do the scroll we ask the next layer up that can s
croll to try |
| 2084 IntSize remainingScrollOffset = newScrollOffset - adjustedScrollOffset()
; | 2084 IntSize remainingScrollOffset = newScrollOffset - adjustedScrollOffset()
; |
| 2085 if (!remainingScrollOffset.isZero() && renderer()->parent()) { | 2085 if (!remainingScrollOffset.isZero() && renderer()->parent()) { |
| 2086 if (RenderLayer* scrollableLayer = enclosingScrollableLayer()) | 2086 if (RenderLayer* scrollableLayer = enclosingScrollableLayer()) |
| 2087 scrollableLayer->scrollByRecursively(remainingScrollOffset); | 2087 scrollableLayer->scrollByRecursively(remainingScrollOffset, clam
p); |
| 2088 | 2088 |
| 2089 Frame* frame = renderer()->frame(); | 2089 Frame* frame = renderer()->frame(); |
| 2090 if (frame) | 2090 if (frame) |
| 2091 frame->eventHandler()->updateAutoscrollRenderer(); | 2091 frame->eventHandler()->updateAutoscrollRenderer(); |
| 2092 } | 2092 } |
| 2093 } else if (renderer()->view()->frameView()) { | 2093 } else if (renderer()->view()->frameView()) { |
| 2094 // If we are here, we were called on a renderer that can be programmatic
ally scrolled, but doesn't | 2094 // If we are here, we were called on a renderer that can be programmatic
ally scrolled, but doesn't |
| 2095 // have an overflow clip. Which means that it is a document node that ca
n be scrolled. | 2095 // have an overflow clip. Which means that it is a document node that ca
n be scrolled. |
| 2096 renderer()->view()->frameView()->scrollBy(delta); | 2096 renderer()->view()->frameView()->scrollBy(delta); |
| 2097 | 2097 |
| (...skipping 4272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6370 } | 6370 } |
| 6371 } | 6371 } |
| 6372 | 6372 |
| 6373 void showLayerTree(const WebCore::RenderObject* renderer) | 6373 void showLayerTree(const WebCore::RenderObject* renderer) |
| 6374 { | 6374 { |
| 6375 if (!renderer) | 6375 if (!renderer) |
| 6376 return; | 6376 return; |
| 6377 showLayerTree(renderer->enclosingLayer()); | 6377 showLayerTree(renderer->enclosingLayer()); |
| 6378 } | 6378 } |
| 6379 #endif | 6379 #endif |
| OLD | NEW |