| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 void GraphicsLayerTreeBuilder::rebuild(RenderLayer& layer, AncestorInfo info) | 58 void GraphicsLayerTreeBuilder::rebuild(RenderLayer& layer, AncestorInfo info) |
| 59 { | 59 { |
| 60 // Make the layer compositing if necessary, and set up clipping and content
layers. | 60 // Make the layer compositing if necessary, and set up clipping and content
layers. |
| 61 // Note that we can only do work here that is independent of whether the des
cendant layers | 61 // Note that we can only do work here that is independent of whether the des
cendant layers |
| 62 // have been processed. computeCompositingRequirements() will already have d
one the repaint if necessary. | 62 // have been processed. computeCompositingRequirements() will already have d
one the repaint if necessary. |
| 63 | 63 |
| 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 CompositedLayerMapping* currentCompositedLayerMapping = layer.compositedLaye
rMapping(); |
| 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 AncestorInfo infoForChildren(info); | 72 AncestorInfo infoForChildren(info); |
| 73 if (hasCompositedLayerMapping) { | 73 if (hasCompositedLayerMapping) { |
| 74 infoForChildren.childLayersOfEnclosingCompositedLayer = &layerChildren; | 74 infoForChildren.childLayersOfEnclosingCompositedLayer = &layerChildren; |
| 75 infoForChildren.enclosingCompositedLayer = &layer; | 75 infoForChildren.enclosingCompositedLayer = &layer; |
| 76 } | 76 } |
| 77 | 77 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 } | 126 } |
| 127 | 127 |
| 128 if (layer.scrollParent() | 128 if (layer.scrollParent() |
| 129 && layer.scrollParent()->hasCompositedLayerMapping() | 129 && layer.scrollParent()->hasCompositedLayerMapping() |
| 130 && layer.scrollParent()->compositedLayerMapping()->needsToReparentOverfl
owControls() | 130 && layer.scrollParent()->compositedLayerMapping()->needsToReparentOverfl
owControls() |
| 131 && layer.scrollParent()->scrollableArea()->topmostScrollChild() == &laye
r) | 131 && layer.scrollParent()->scrollableArea()->topmostScrollChild() == &laye
r) |
| 132 info.childLayersOfEnclosingCompositedLayer->append(layer.scrollParent()-
>compositedLayerMapping()->detachLayerForOverflowControls(*info.enclosingComposi
tedLayer)); | 132 info.childLayersOfEnclosingCompositedLayer->append(layer.scrollParent()-
>compositedLayerMapping()->detachLayerForOverflowControls(*info.enclosingComposi
tedLayer)); |
| 133 } | 133 } |
| 134 | 134 |
| 135 } | 135 } |
| OLD | NEW |