OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2014 Google Inc. All rights reserved. | 3 * Copyright (C) 2014 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 layer.stackingNode()->updateLayerListsIfNeeded(); | 64 layer.stackingNode()->updateLayerListsIfNeeded(); |
65 | 65 |
66 const bool hasCompositedLayerMapping = layer.hasCompositedLayerMapping(); | 66 const bool hasCompositedLayerMapping = layer.hasCompositedLayerMapping(); |
67 CompositedLayerMappingPtr currentCompositedLayerMapping = layer.compositedLa
yerMapping(); | 67 CompositedLayerMappingPtr currentCompositedLayerMapping = layer.compositedLa
yerMapping(); |
68 | 68 |
69 // If this layer has a compositedLayerMapping, then that is where we place s
ubsequent children GraphicsLayers. | 69 // If this layer has a compositedLayerMapping, then that is where we place s
ubsequent children GraphicsLayers. |
70 // Otherwise children continue to append to the child list of the enclosing
layer. | 70 // Otherwise children continue to append to the child list of the enclosing
layer. |
71 GraphicsLayerVector layerChildren; | 71 GraphicsLayerVector layerChildren; |
72 GraphicsLayerVector& childList = hasCompositedLayerMapping ? layerChildren :
childLayersOfEnclosingLayer; | 72 GraphicsLayerVector& childList = hasCompositedLayerMapping ? layerChildren :
childLayersOfEnclosingLayer; |
73 | 73 |
74 #if !ASSERT_DISABLED | 74 #if ASSERT_ENABLED |
75 LayerListMutationDetector mutationChecker(layer.stackingNode()); | 75 LayerListMutationDetector mutationChecker(layer.stackingNode()); |
76 #endif | 76 #endif |
77 | 77 |
78 if (layer.stackingNode()->isStackingContext()) { | 78 if (layer.stackingNode()->isStackingContext()) { |
79 RenderLayerStackingNodeIterator iterator(*layer.stackingNode(), Negative
ZOrderChildren); | 79 RenderLayerStackingNodeIterator iterator(*layer.stackingNode(), Negative
ZOrderChildren); |
80 while (RenderLayerStackingNode* curNode = iterator.next()) | 80 while (RenderLayerStackingNode* curNode = iterator.next()) |
81 rebuild(*curNode->layer(), childList); | 81 rebuild(*curNode->layer(), childList); |
82 | 82 |
83 // If a negative z-order child is compositing, we get a foreground layer
which needs to get parented. | 83 // If a negative z-order child is compositing, we get a foreground layer
which needs to get parented. |
84 if (hasCompositedLayerMapping && currentCompositedLayerMapping->foregrou
ndLayer()) | 84 if (hasCompositedLayerMapping && currentCompositedLayerMapping->foregrou
ndLayer()) |
(...skipping 30 matching lines...) Expand all Loading... |
115 currentCompositedLayerMapping->parentForSublayers()->addChild(ov
erflowControlLayer); | 115 currentCompositedLayerMapping->parentForSublayers()->addChild(ov
erflowControlLayer); |
116 } | 116 } |
117 } | 117 } |
118 | 118 |
119 if (shouldAppendLayer(layer)) | 119 if (shouldAppendLayer(layer)) |
120 childLayersOfEnclosingLayer.append(currentCompositedLayerMapping->ch
ildForSuperlayers()); | 120 childLayersOfEnclosingLayer.append(currentCompositedLayerMapping->ch
ildForSuperlayers()); |
121 } | 121 } |
122 } | 122 } |
123 | 123 |
124 } | 124 } |
OLD | NEW |