OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 } | 151 } |
152 | 152 |
153 void ScrollingCoordinator::updateLayerPositionConstraint(RenderLayer* layer) | 153 void ScrollingCoordinator::updateLayerPositionConstraint(RenderLayer* layer) |
154 { | 154 { |
155 ASSERT(layer->backing()); | 155 ASSERT(layer->backing()); |
156 RenderLayerBacking* backing = layer->backing(); | 156 RenderLayerBacking* backing = layer->backing(); |
157 GraphicsLayer* mainLayer = backing->childForSuperlayers(); | 157 GraphicsLayer* mainLayer = backing->childForSuperlayers(); |
158 | 158 |
159 // Avoid unnecessary commits | 159 // Avoid unnecessary commits |
160 clearPositionConstraintExceptForLayer(backing->ancestorClippingLayer(), main
Layer); | 160 clearPositionConstraintExceptForLayer(backing->ancestorClippingLayer(), main
Layer); |
161 clearPositionConstraintExceptForLayer(backing->contentsContainmentLayer(), m
ainLayer); | |
162 clearPositionConstraintExceptForLayer(backing->graphicsLayer(), mainLayer); | 161 clearPositionConstraintExceptForLayer(backing->graphicsLayer(), mainLayer); |
163 | 162 |
164 if (WebLayer* scrollableLayer = scrollingWebLayerForGraphicsLayer(mainLayer)
) | 163 if (WebLayer* scrollableLayer = scrollingWebLayerForGraphicsLayer(mainLayer)
) |
165 scrollableLayer->setPositionConstraint(computePositionConstraint(layer))
; | 164 scrollableLayer->setPositionConstraint(computePositionConstraint(layer))
; |
166 } | 165 } |
167 | 166 |
168 void ScrollingCoordinator::willDestroyScrollableArea(ScrollableArea* scrollableA
rea) | 167 void ScrollingCoordinator::willDestroyScrollableArea(ScrollableArea* scrollableA
rea) |
169 { | 168 { |
170 removeWebScrollbarLayer(scrollableArea, HorizontalScrollbar); | 169 removeWebScrollbarLayer(scrollableArea, HorizontalScrollbar); |
171 removeWebScrollbarLayer(scrollableArea, VerticalScrollbar); | 170 removeWebScrollbarLayer(scrollableArea, VerticalScrollbar); |
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 stringBuilder.resize(stringBuilder.length() - 2); | 632 stringBuilder.resize(stringBuilder.length() - 2); |
634 return stringBuilder.toString(); | 633 return stringBuilder.toString(); |
635 } | 634 } |
636 | 635 |
637 String ScrollingCoordinator::mainThreadScrollingReasonsAsText() const | 636 String ScrollingCoordinator::mainThreadScrollingReasonsAsText() const |
638 { | 637 { |
639 return mainThreadScrollingReasonsAsText(mainThreadScrollingReasons()); | 638 return mainThreadScrollingReasonsAsText(mainThreadScrollingReasons()); |
640 } | 639 } |
641 | 640 |
642 } // namespace WebCore | 641 } // namespace WebCore |
OLD | NEW |