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