| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 if (layer.stackingNode()->isStackingContext()) { | 78 if (layer.stackingNode()->isStackingContext()) { |
| 79 PaintLayerStackingNodeIterator iterator(*layer.stackingNode(), | 79 PaintLayerStackingNodeIterator iterator(*layer.stackingNode(), |
| 80 NegativeZOrderChildren); | 80 NegativeZOrderChildren); |
| 81 while (PaintLayerStackingNode* curNode = iterator.next()) | 81 while (PaintLayerStackingNode* curNode = iterator.next()) |
| 82 rebuild(*curNode->layer(), infoForChildren); | 82 rebuild(*curNode->layer(), infoForChildren); |
| 83 | 83 |
| 84 // If a negative z-order child is compositing, we get a foreground layer | 84 // If a negative z-order child is compositing, we get a foreground layer |
| 85 // which needs to get parented. | 85 // which needs to get parented. |
| 86 if (hasCompositedLayerMapping && | 86 if (hasCompositedLayerMapping && |
| 87 currentCompositedLayerMapping->foregroundLayer()) | 87 currentCompositedLayerMapping->foregroundLayer()) |
| 88 infoForChildren.childLayersOfEnclosingCompositedLayer->append( | 88 infoForChildren.childLayersOfEnclosingCompositedLayer->push_back( |
| 89 currentCompositedLayerMapping->foregroundLayer()); | 89 currentCompositedLayerMapping->foregroundLayer()); |
| 90 } | 90 } |
| 91 | 91 |
| 92 PaintLayerStackingNodeIterator iterator( | 92 PaintLayerStackingNodeIterator iterator( |
| 93 *layer.stackingNode(), NormalFlowChildren | PositiveZOrderChildren); | 93 *layer.stackingNode(), NormalFlowChildren | PositiveZOrderChildren); |
| 94 while (PaintLayerStackingNode* curNode = iterator.next()) | 94 while (PaintLayerStackingNode* curNode = iterator.next()) |
| 95 rebuild(*curNode->layer(), infoForChildren); | 95 rebuild(*curNode->layer(), infoForChildren); |
| 96 | 96 |
| 97 if (hasCompositedLayerMapping) { | 97 if (hasCompositedLayerMapping) { |
| 98 bool parented = false; | 98 bool parented = false; |
| 99 if (layer.layoutObject()->isLayoutPart()) | 99 if (layer.layoutObject()->isLayoutPart()) |
| 100 parented = PaintLayerCompositor::attachFrameContentLayersToIframeLayer( | 100 parented = PaintLayerCompositor::attachFrameContentLayersToIframeLayer( |
| 101 toLayoutPart(layer.layoutObject())); | 101 toLayoutPart(layer.layoutObject())); |
| 102 | 102 |
| 103 if (!parented) | 103 if (!parented) |
| 104 currentCompositedLayerMapping->setSublayers(layerChildren); | 104 currentCompositedLayerMapping->setSublayers(layerChildren); |
| 105 | 105 |
| 106 if (shouldAppendLayer(layer)) | 106 if (shouldAppendLayer(layer)) |
| 107 info.childLayersOfEnclosingCompositedLayer->append( | 107 info.childLayersOfEnclosingCompositedLayer->push_back( |
| 108 currentCompositedLayerMapping->childForSuperlayers()); | 108 currentCompositedLayerMapping->childForSuperlayers()); |
| 109 } | 109 } |
| 110 | 110 |
| 111 if (layer.scrollParent() && | 111 if (layer.scrollParent() && |
| 112 layer.scrollParent()->hasCompositedLayerMapping() && | 112 layer.scrollParent()->hasCompositedLayerMapping() && |
| 113 layer.scrollParent() | 113 layer.scrollParent() |
| 114 ->compositedLayerMapping() | 114 ->compositedLayerMapping() |
| 115 ->needsToReparentOverflowControls() && | 115 ->needsToReparentOverflowControls() && |
| 116 layer.scrollParent()->getScrollableArea()->topmostScrollChild() == &layer) | 116 layer.scrollParent()->getScrollableArea()->topmostScrollChild() == &layer) |
| 117 info.childLayersOfEnclosingCompositedLayer->append( | 117 info.childLayersOfEnclosingCompositedLayer->push_back( |
| 118 layer.scrollParent() | 118 layer.scrollParent() |
| 119 ->compositedLayerMapping() | 119 ->compositedLayerMapping() |
| 120 ->detachLayerForOverflowControls(*info.enclosingCompositedLayer)); | 120 ->detachLayerForOverflowControls(*info.enclosingCompositedLayer)); |
| 121 } | 121 } |
| 122 | 122 |
| 123 } // namespace blink | 123 } // namespace blink |
| OLD | NEW |