| 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 2154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2165 ASSERT(view); | 2165 ASSERT(view); |
| 2166 | 2166 |
| 2167 // Update the positions of our child layers (if needed as only fixed layers
should be impacted by a scroll). | 2167 // Update the positions of our child layers (if needed as only fixed layers
should be impacted by a scroll). |
| 2168 // We don't update compositing layers, because we need to do a deep update f
rom the compositing ancestor. | 2168 // We don't update compositing layers, because we need to do a deep update f
rom the compositing ancestor. |
| 2169 bool inLayout = view ? view->frameView()->isInLayout() : false; | 2169 bool inLayout = view ? view->frameView()->isInLayout() : false; |
| 2170 if (!inLayout) { | 2170 if (!inLayout) { |
| 2171 // If we're in the middle of layout, we'll just update layers once layou
t has finished. | 2171 // If we're in the middle of layout, we'll just update layers once layou
t has finished. |
| 2172 updateLayerPositionsAfterOverflowScroll(); | 2172 updateLayerPositionsAfterOverflowScroll(); |
| 2173 if (view) { | 2173 if (view) { |
| 2174 // Update regions, scrolling may change the clip of a particular reg
ion. | 2174 // Update regions, scrolling may change the clip of a particular reg
ion. |
| 2175 #if ENABLE(DASHBOARD_SUPPORT) || ENABLE(DRAGGABLE_REGION) | 2175 #if ENABLE(DRAGGABLE_REGION) |
| 2176 view->frameView()->updateAnnotatedRegions(); | 2176 view->frameView()->updateAnnotatedRegions(); |
| 2177 #endif | 2177 #endif |
| 2178 view->updateWidgetPositions(); | 2178 view->updateWidgetPositions(); |
| 2179 } | 2179 } |
| 2180 | 2180 |
| 2181 if (!m_updatingMarqueePosition) { | 2181 if (!m_updatingMarqueePosition) { |
| 2182 // Avoid updating compositing layers if, higher on the stack, we're
already updating layer | 2182 // Avoid updating compositing layers if, higher on the stack, we're
already updating layer |
| 2183 // positions. Updating layer positions requires a full walk of up-to
-date RenderLayers, and | 2183 // positions. Updating layer positions requires a full walk of up-to
-date RenderLayers, and |
| 2184 // in this case we're still updating their positions; we'll update c
ompositing layers later | 2184 // in this case we're still updating their positions; we'll update c
ompositing layers later |
| 2185 // when that completes. | 2185 // when that completes. |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2886 else | 2886 else |
| 2887 destroyScrollbar(HorizontalScrollbar); | 2887 destroyScrollbar(HorizontalScrollbar); |
| 2888 | 2888 |
| 2889 // Destroying or creating one bar can cause our scrollbar corner to come and
go. We need to update the opposite scrollbar's style. | 2889 // Destroying or creating one bar can cause our scrollbar corner to come and
go. We need to update the opposite scrollbar's style. |
| 2890 if (m_hBar) | 2890 if (m_hBar) |
| 2891 m_hBar->styleChanged(); | 2891 m_hBar->styleChanged(); |
| 2892 if (m_vBar) | 2892 if (m_vBar) |
| 2893 m_vBar->styleChanged(); | 2893 m_vBar->styleChanged(); |
| 2894 | 2894 |
| 2895 // Force an update since we know the scrollbars have changed things. | 2895 // Force an update since we know the scrollbars have changed things. |
| 2896 #if ENABLE(DASHBOARD_SUPPORT) || ENABLE(DRAGGABLE_REGION) | 2896 #if ENABLE(DRAGGABLE_REGION) |
| 2897 if (renderer()->document()->hasAnnotatedRegions()) | 2897 if (renderer()->document()->hasAnnotatedRegions()) |
| 2898 renderer()->document()->setAnnotatedRegionsDirty(true); | 2898 renderer()->document()->setAnnotatedRegionsDirty(true); |
| 2899 #endif | 2899 #endif |
| 2900 } | 2900 } |
| 2901 | 2901 |
| 2902 void RenderLayer::setHasVerticalScrollbar(bool hasScrollbar) | 2902 void RenderLayer::setHasVerticalScrollbar(bool hasScrollbar) |
| 2903 { | 2903 { |
| 2904 if (hasScrollbar == hasVerticalScrollbar()) | 2904 if (hasScrollbar == hasVerticalScrollbar()) |
| 2905 return; | 2905 return; |
| 2906 | 2906 |
| 2907 if (hasScrollbar) | 2907 if (hasScrollbar) |
| 2908 m_vBar = createScrollbar(VerticalScrollbar); | 2908 m_vBar = createScrollbar(VerticalScrollbar); |
| 2909 else | 2909 else |
| 2910 destroyScrollbar(VerticalScrollbar); | 2910 destroyScrollbar(VerticalScrollbar); |
| 2911 | 2911 |
| 2912 // Destroying or creating one bar can cause our scrollbar corner to come an
d go. We need to update the opposite scrollbar's style. | 2912 // Destroying or creating one bar can cause our scrollbar corner to come an
d go. We need to update the opposite scrollbar's style. |
| 2913 if (m_hBar) | 2913 if (m_hBar) |
| 2914 m_hBar->styleChanged(); | 2914 m_hBar->styleChanged(); |
| 2915 if (m_vBar) | 2915 if (m_vBar) |
| 2916 m_vBar->styleChanged(); | 2916 m_vBar->styleChanged(); |
| 2917 | 2917 |
| 2918 // Force an update since we know the scrollbars have changed things. | 2918 // Force an update since we know the scrollbars have changed things. |
| 2919 #if ENABLE(DASHBOARD_SUPPORT) || ENABLE(DRAGGABLE_REGION) | 2919 #if ENABLE(DRAGGABLE_REGION) |
| 2920 if (renderer()->document()->hasAnnotatedRegions()) | 2920 if (renderer()->document()->hasAnnotatedRegions()) |
| 2921 renderer()->document()->setAnnotatedRegionsDirty(true); | 2921 renderer()->document()->setAnnotatedRegionsDirty(true); |
| 2922 #endif | 2922 #endif |
| 2923 } | 2923 } |
| 2924 | 2924 |
| 2925 ScrollableArea* RenderLayer::enclosingScrollableArea() const | 2925 ScrollableArea* RenderLayer::enclosingScrollableArea() const |
| 2926 { | 2926 { |
| 2927 if (RenderLayer* scrollableLayer = enclosingScrollableLayer()) | 2927 if (RenderLayer* scrollableLayer = enclosingScrollableLayer()) |
| 2928 return scrollableLayer; | 2928 return scrollableLayer; |
| 2929 | 2929 |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3109 | 3109 |
| 3110 if (autoHorizontalScrollBarChanged || autoVerticalScrollBarChanged) { | 3110 if (autoHorizontalScrollBarChanged || autoVerticalScrollBarChanged) { |
| 3111 if (box->hasAutoHorizontalScrollbar()) | 3111 if (box->hasAutoHorizontalScrollbar()) |
| 3112 setHasHorizontalScrollbar(hasHorizontalOverflow); | 3112 setHasHorizontalScrollbar(hasHorizontalOverflow); |
| 3113 if (box->hasAutoVerticalScrollbar()) | 3113 if (box->hasAutoVerticalScrollbar()) |
| 3114 setHasVerticalScrollbar(hasVerticalOverflow); | 3114 setHasVerticalScrollbar(hasVerticalOverflow); |
| 3115 | 3115 |
| 3116 updateSelfPaintingLayer(); | 3116 updateSelfPaintingLayer(); |
| 3117 | 3117 |
| 3118 // Force an update since we know the scrollbars have changed things. | 3118 // Force an update since we know the scrollbars have changed things. |
| 3119 #if ENABLE(DASHBOARD_SUPPORT) || ENABLE(DRAGGABLE_REGION) | 3119 #if ENABLE(DRAGGABLE_REGION) |
| 3120 if (renderer()->document()->hasAnnotatedRegions()) | 3120 if (renderer()->document()->hasAnnotatedRegions()) |
| 3121 renderer()->document()->setAnnotatedRegionsDirty(true); | 3121 renderer()->document()->setAnnotatedRegionsDirty(true); |
| 3122 #endif | 3122 #endif |
| 3123 | 3123 |
| 3124 renderer()->repaint(); | 3124 renderer()->repaint(); |
| 3125 | 3125 |
| 3126 if (renderer()->style()->overflowX() == OAUTO || renderer()->style()->ov
erflowY() == OAUTO) { | 3126 if (renderer()->style()->overflowX() == OAUTO || renderer()->style()->ov
erflowY() == OAUTO) { |
| 3127 if (!m_inOverflowRelayout) { | 3127 if (!m_inOverflowRelayout) { |
| 3128 // Our proprietary overflow: overlay value doesn't trigger a lay
out. | 3128 // Our proprietary overflow: overlay value doesn't trigger a lay
out. |
| 3129 m_inOverflowRelayout = true; | 3129 m_inOverflowRelayout = true; |
| (...skipping 3333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6463 } | 6463 } |
| 6464 } | 6464 } |
| 6465 | 6465 |
| 6466 void showLayerTree(const WebCore::RenderObject* renderer) | 6466 void showLayerTree(const WebCore::RenderObject* renderer) |
| 6467 { | 6467 { |
| 6468 if (!renderer) | 6468 if (!renderer) |
| 6469 return; | 6469 return; |
| 6470 showLayerTree(renderer->enclosingLayer()); | 6470 showLayerTree(renderer->enclosingLayer()); |
| 6471 } | 6471 } |
| 6472 #endif | 6472 #endif |
| OLD | NEW |