OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 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 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
881 | 881 |
882 updateHasGpuRasterizationHint(renderer()->style()); | 882 updateHasGpuRasterizationHint(renderer()->style()); |
883 updateContentsRect(); | 883 updateContentsRect(); |
884 updateBackgroundColor(); | 884 updateBackgroundColor(); |
885 updateDrawsContent(); | 885 updateDrawsContent(); |
886 updateContentsOpaque(); | 886 updateContentsOpaque(); |
887 updateAfterWidgetResize(); | 887 updateAfterWidgetResize(); |
888 updateRenderingContext(); | 888 updateRenderingContext(); |
889 updateShouldFlattenTransform(); | 889 updateShouldFlattenTransform(); |
890 updateChildrenTransform(); | 890 updateChildrenTransform(); |
| 891 updateScrollParent(m_owningLayer.scrollParent()); |
891 registerScrollingLayers(); | 892 registerScrollingLayers(); |
892 | 893 |
893 updateCompositingReasons(); | 894 updateCompositingReasons(); |
894 | 895 |
895 return updateType; | 896 return updateType; |
896 } | 897 } |
897 | 898 |
898 void CompositedLayerMapping::registerScrollingLayers() | 899 void CompositedLayerMapping::registerScrollingLayers() |
899 { | 900 { |
900 // Register fixed position layers and their containers with the scrolling co
ordinator. | 901 // Register fixed position layers and their containers with the scrolling co
ordinator. |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1407 | 1408 |
1408 // Only the topmost layer has a scroll parent. All other layers have a null
scroll parent. | 1409 // Only the topmost layer has a scroll parent. All other layers have a null
scroll parent. |
1409 if (layer != topmostLayer) | 1410 if (layer != topmostLayer) |
1410 scrollParent = 0; | 1411 scrollParent = 0; |
1411 | 1412 |
1412 scrollingCoordinator->updateScrollParentForGraphicsLayer(layer, scrollParent
); | 1413 scrollingCoordinator->updateScrollParentForGraphicsLayer(layer, scrollParent
); |
1413 } | 1414 } |
1414 | 1415 |
1415 void CompositedLayerMapping::updateScrollParent(RenderLayer* scrollParent) | 1416 void CompositedLayerMapping::updateScrollParent(RenderLayer* scrollParent) |
1416 { | 1417 { |
| 1418 if (!scrollParent && m_squashedLayers.size()) |
| 1419 scrollParent = m_squashedLayers[0].renderLayer->scrollParent(); |
1417 | 1420 |
1418 if (ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLay
er(m_owningLayer)) { | 1421 if (ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLay
er(m_owningLayer)) { |
1419 GraphicsLayer* topmostLayer = localRootForOwningLayer(); | 1422 GraphicsLayer* topmostLayer = childForSuperlayers(); |
| 1423 updateScrollParentForGraphicsLayer(m_squashingContainmentLayer.get(), to
pmostLayer, scrollParent, scrollingCoordinator); |
1420 updateScrollParentForGraphicsLayer(m_ancestorClippingLayer.get(), topmos
tLayer, scrollParent, scrollingCoordinator); | 1424 updateScrollParentForGraphicsLayer(m_ancestorClippingLayer.get(), topmos
tLayer, scrollParent, scrollingCoordinator); |
1421 updateScrollParentForGraphicsLayer(m_graphicsLayer.get(), topmostLayer,
scrollParent, scrollingCoordinator); | 1425 updateScrollParentForGraphicsLayer(m_graphicsLayer.get(), topmostLayer,
scrollParent, scrollingCoordinator); |
1422 } | 1426 } |
1423 } | 1427 } |
1424 | 1428 |
1425 void CompositedLayerMapping::updateClipParent(RenderLayer* clipParent) | 1429 void CompositedLayerMapping::updateClipParent(RenderLayer* clipParent) |
1426 { | 1430 { |
1427 if (ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLay
er(m_owningLayer)) | 1431 if (ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLay
er(m_owningLayer)) |
1428 scrollingCoordinator->updateClipParentForGraphicsLayer(m_graphicsLayer.g
et(), clipParent); | 1432 scrollingCoordinator->updateClipParentForGraphicsLayer(m_graphicsLayer.g
et(), clipParent); |
1429 } | 1433 } |
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2146 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2150 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
2147 name = "Scrolling Contents Layer"; | 2151 name = "Scrolling Contents Layer"; |
2148 } else { | 2152 } else { |
2149 ASSERT_NOT_REACHED(); | 2153 ASSERT_NOT_REACHED(); |
2150 } | 2154 } |
2151 | 2155 |
2152 return name; | 2156 return name; |
2153 } | 2157 } |
2154 | 2158 |
2155 } // namespace WebCore | 2159 } // namespace WebCore |
OLD | NEW |