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 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
458 | 458 |
459 if (updateForegroundLayer(compositor->needsContentsCompositingLayer(&m_ownin gLayer))) | 459 if (updateForegroundLayer(compositor->needsContentsCompositingLayer(&m_ownin gLayer))) |
460 layerConfigChanged = true; | 460 layerConfigChanged = true; |
461 | 461 |
462 bool needsDescendentsClippingLayer = compositor->clipsCompositingDescendants (&m_owningLayer); | 462 bool needsDescendentsClippingLayer = compositor->clipsCompositingDescendants (&m_owningLayer); |
463 | 463 |
464 // Our scrolling layer will clip. | 464 // Our scrolling layer will clip. |
465 if (m_owningLayer.needsCompositedScrolling()) | 465 if (m_owningLayer.needsCompositedScrolling()) |
466 needsDescendentsClippingLayer = false; | 466 needsDescendentsClippingLayer = false; |
467 | 467 |
468 // FIXME: this should not be computed dynamically, but passed down during th e compositing update. | |
469 // See http://crbug.com/351851 | |
abarth-chromium
2014/03/21 15:49:51
Is this comments still accurate?
Ian Vollick
2014/03/21 18:23:28
Nope. Removed.
| |
468 RenderLayer* scrollParent = m_owningLayer.scrollParent(); | 470 RenderLayer* scrollParent = m_owningLayer.scrollParent(); |
469 bool needsAncestorClip = compositor->clippedByAncestor(&m_owningLayer); | 471 bool needsAncestorClip = compositor->clippedByAncestor(&m_owningLayer); |
470 if (scrollParent) { | 472 if (scrollParent) { |
471 // If our containing block is our ancestor scrolling layer, then we'll a lready be clipped | 473 // If our containing block is our ancestor scrolling layer, then we'll a lready be clipped |
472 // to it via our scroll parent and we don't need an ancestor clipping la yer. | 474 // to it via our scroll parent and we don't need an ancestor clipping la yer. |
473 if (m_owningLayer.renderer()->containingBlock()->enclosingLayer() == m_o wningLayer.ancestorCompositedScrollingLayer()) | 475 if (m_owningLayer.renderer()->containingBlock()->enclosingLayer() == m_o wningLayer.ancestorCompositedScrollingLayer()) |
474 needsAncestorClip = false; | 476 needsAncestorClip = false; |
475 } | 477 } |
476 | 478 |
477 if (updateClippingLayers(needsAncestorClip, needsDescendentsClippingLayer)) | 479 if (updateClippingLayers(needsAncestorClip, needsDescendentsClippingLayer)) |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
881 | 883 |
882 updateHasGpuRasterizationHint(renderer()->style()); | 884 updateHasGpuRasterizationHint(renderer()->style()); |
883 updateContentsRect(); | 885 updateContentsRect(); |
884 updateBackgroundColor(); | 886 updateBackgroundColor(); |
885 updateDrawsContent(); | 887 updateDrawsContent(); |
886 updateContentsOpaque(); | 888 updateContentsOpaque(); |
887 updateAfterWidgetResize(); | 889 updateAfterWidgetResize(); |
888 updateRenderingContext(); | 890 updateRenderingContext(); |
889 updateShouldFlattenTransform(); | 891 updateShouldFlattenTransform(); |
890 updateChildrenTransform(); | 892 updateChildrenTransform(); |
893 // FIXME: this should not be computed dynamically, but passed down during th e compositing update. | |
894 // See http://crbug.com/351851 | |
abarth-chromium
2014/03/21 15:49:51
ditto
Ian Vollick
2014/03/21 18:23:28
ditto
| |
895 updateScrollParent(m_owningLayer.scrollParent()); | |
891 registerScrollingLayers(); | 896 registerScrollingLayers(); |
892 | 897 |
893 updateCompositingReasons(); | 898 updateCompositingReasons(); |
894 | 899 |
895 return updateType; | 900 return updateType; |
896 } | 901 } |
897 | 902 |
898 void CompositedLayerMapping::registerScrollingLayers() | 903 void CompositedLayerMapping::registerScrollingLayers() |
899 { | 904 { |
900 // Register fixed position layers and their containers with the scrolling co ordinator. | 905 // 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 | 1412 |
1408 // Only the topmost layer has a scroll parent. All other layers have a null scroll parent. | 1413 // Only the topmost layer has a scroll parent. All other layers have a null scroll parent. |
1409 if (layer != topmostLayer) | 1414 if (layer != topmostLayer) |
1410 scrollParent = 0; | 1415 scrollParent = 0; |
1411 | 1416 |
1412 scrollingCoordinator->updateScrollParentForGraphicsLayer(layer, scrollParent ); | 1417 scrollingCoordinator->updateScrollParentForGraphicsLayer(layer, scrollParent ); |
1413 } | 1418 } |
1414 | 1419 |
1415 void CompositedLayerMapping::updateScrollParent(RenderLayer* scrollParent) | 1420 void CompositedLayerMapping::updateScrollParent(RenderLayer* scrollParent) |
1416 { | 1421 { |
1422 if (!scrollParent && m_squashedLayers.size()) | |
1423 scrollParent = m_squashedLayers[0].renderLayer->scrollParent(); | |
1417 | 1424 |
1418 if (ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLay er(m_owningLayer)) { | 1425 if (ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLay er(m_owningLayer)) { |
1419 GraphicsLayer* topmostLayer = localRootForOwningLayer(); | 1426 GraphicsLayer* topmostLayer = childForSuperlayers(); |
1427 updateScrollParentForGraphicsLayer(m_squashingContainmentLayer.get(), to pmostLayer, scrollParent, scrollingCoordinator); | |
1420 updateScrollParentForGraphicsLayer(m_ancestorClippingLayer.get(), topmos tLayer, scrollParent, scrollingCoordinator); | 1428 updateScrollParentForGraphicsLayer(m_ancestorClippingLayer.get(), topmos tLayer, scrollParent, scrollingCoordinator); |
1421 updateScrollParentForGraphicsLayer(m_graphicsLayer.get(), topmostLayer, scrollParent, scrollingCoordinator); | 1429 updateScrollParentForGraphicsLayer(m_graphicsLayer.get(), topmostLayer, scrollParent, scrollingCoordinator); |
1422 } | 1430 } |
1423 } | 1431 } |
1424 | 1432 |
1425 void CompositedLayerMapping::updateClipParent(RenderLayer* clipParent) | 1433 void CompositedLayerMapping::updateClipParent(RenderLayer* clipParent) |
1426 { | 1434 { |
1427 if (ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLay er(m_owningLayer)) | 1435 if (ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLay er(m_owningLayer)) |
1428 scrollingCoordinator->updateClipParentForGraphicsLayer(m_graphicsLayer.g et(), clipParent); | 1436 scrollingCoordinator->updateClipParentForGraphicsLayer(m_graphicsLayer.g et(), clipParent); |
1429 } | 1437 } |
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2146 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2154 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
2147 name = "Scrolling Contents Layer"; | 2155 name = "Scrolling Contents Layer"; |
2148 } else { | 2156 } else { |
2149 ASSERT_NOT_REACHED(); | 2157 ASSERT_NOT_REACHED(); |
2150 } | 2158 } |
2151 | 2159 |
2152 return name; | 2160 return name; |
2153 } | 2161 } |
2154 | 2162 |
2155 } // namespace WebCore | 2163 } // namespace WebCore |
OLD | NEW |