| 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 2134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2145 restrictedByLineClamp = !renderer()->parent()->style()->lineClamp().isNo
ne(); | 2145 restrictedByLineClamp = !renderer()->parent()->style()->lineClamp().isNo
ne(); |
| 2146 | 2146 |
| 2147 if (renderer()->hasOverflowClip() && !restrictedByLineClamp) { | 2147 if (renderer()->hasOverflowClip() && !restrictedByLineClamp) { |
| 2148 IntSize newScrollOffset = adjustedScrollOffset() + delta; | 2148 IntSize newScrollOffset = adjustedScrollOffset() + delta; |
| 2149 scrollToOffset(newScrollOffset, clamp); | 2149 scrollToOffset(newScrollOffset, clamp); |
| 2150 | 2150 |
| 2151 // If this layer can't do the scroll we ask the next layer up that can s
croll to try | 2151 // If this layer can't do the scroll we ask the next layer up that can s
croll to try |
| 2152 IntSize remainingScrollOffset = newScrollOffset - adjustedScrollOffset()
; | 2152 IntSize remainingScrollOffset = newScrollOffset - adjustedScrollOffset()
; |
| 2153 if (!remainingScrollOffset.isZero() && renderer()->parent()) { | 2153 if (!remainingScrollOffset.isZero() && renderer()->parent()) { |
| 2154 if (RenderLayer* scrollableLayer = enclosingScrollableLayer()) | 2154 if (RenderLayer* scrollableLayer = enclosingScrollableLayer()) |
| 2155 scrollableLayer->scrollByRecursively(remainingScrollOffset); | 2155 scrollableLayer->scrollByRecursively(remainingScrollOffset, clam
p); |
| 2156 | 2156 |
| 2157 Frame* frame = renderer()->frame(); | 2157 Frame* frame = renderer()->frame(); |
| 2158 if (frame) | 2158 if (frame) |
| 2159 frame->eventHandler()->updateAutoscrollRenderer(); | 2159 frame->eventHandler()->updateAutoscrollRenderer(); |
| 2160 } | 2160 } |
| 2161 } else if (renderer()->view()->frameView()) { | 2161 } else if (renderer()->view()->frameView()) { |
| 2162 // If we are here, we were called on a renderer that can be programmatic
ally scrolled, but doesn't | 2162 // If we are here, we were called on a renderer that can be programmatic
ally scrolled, but doesn't |
| 2163 // have an overflow clip. Which means that it is a document node that ca
n be scrolled. | 2163 // have an overflow clip. Which means that it is a document node that ca
n be scrolled. |
| 2164 renderer()->view()->frameView()->scrollBy(delta); | 2164 renderer()->view()->frameView()->scrollBy(delta); |
| 2165 | 2165 |
| (...skipping 4276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6442 } | 6442 } |
| 6443 } | 6443 } |
| 6444 | 6444 |
| 6445 void showLayerTree(const WebCore::RenderObject* renderer) | 6445 void showLayerTree(const WebCore::RenderObject* renderer) |
| 6446 { | 6446 { |
| 6447 if (!renderer) | 6447 if (!renderer) |
| 6448 return; | 6448 return; |
| 6449 showLayerTree(renderer->enclosingLayer()); | 6449 showLayerTree(renderer->enclosingLayer()); |
| 6450 } | 6450 } |
| 6451 #endif | 6451 #endif |
| OLD | NEW |