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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
93 PaintLayerStackingNodeIterator iterator(*layer.stackingNode(), NormalFlowChi ldren | PositiveZOrderChildren); | 93 PaintLayerStackingNodeIterator iterator(*layer.stackingNode(), NormalFlowChi ldren | 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::parentFrameContentLayers(toLayoutPa rt(layer.layoutObject())); | 100 parented = PaintLayerCompositor::parentFrameContentLayers(toLayoutPa rt(layer.layoutObject())); |
101 | 101 |
102 if (!parented) | 102 if (!parented) |
103 currentCompositedLayerMapping->parentForSublayers()->setChildren(lay erChildren); | 103 currentCompositedLayerMapping->setSublayers(layerChildren); |
104 | |
105 // If the layer has a clipping layer the overflow controls layers will b e siblings of the clipping layer. | |
106 // Otherwise, the overflow control layers are normal children. | |
107 // FIXME: Why isn't this handled in CLM updateInternalHierarchy? | |
108 if (!currentCompositedLayerMapping->hasClippingLayer() && !currentCompos itedLayerMapping->hasScrollingLayer()) { | |
chrishtr
2015/11/19 17:29:52
Where has this logic gone?
skobes
2015/11/19 18:30:07
This code was restoring the overflow controls in t
| |
109 if (GraphicsLayer* overflowControlLayer = currentCompositedLayerMapp ing->layerForHorizontalScrollbar()) { | |
110 overflowControlLayer->removeFromParent(); | |
111 currentCompositedLayerMapping->parentForSublayers()->addChild(ov erflowControlLayer); | |
112 } | |
113 | |
114 if (GraphicsLayer* overflowControlLayer = currentCompositedLayerMapp ing->layerForVerticalScrollbar()) { | |
115 overflowControlLayer->removeFromParent(); | |
116 currentCompositedLayerMapping->parentForSublayers()->addChild(ov erflowControlLayer); | |
117 } | |
118 | |
119 if (GraphicsLayer* overflowControlLayer = currentCompositedLayerMapp ing->layerForScrollCorner()) { | |
120 overflowControlLayer->removeFromParent(); | |
121 currentCompositedLayerMapping->parentForSublayers()->addChild(ov erflowControlLayer); | |
122 } | |
123 } | |
124 | 104 |
125 if (shouldAppendLayer(layer)) | 105 if (shouldAppendLayer(layer)) |
126 info.childLayersOfEnclosingCompositedLayer->append(currentComposited LayerMapping->childForSuperlayers()); | 106 info.childLayersOfEnclosingCompositedLayer->append(currentComposited LayerMapping->childForSuperlayers()); |
127 } | 107 } |
128 | 108 |
129 if (layer.scrollParent() | 109 if (layer.scrollParent() |
130 && layer.scrollParent()->hasCompositedLayerMapping() | 110 && layer.scrollParent()->hasCompositedLayerMapping() |
131 && layer.scrollParent()->compositedLayerMapping()->needsToReparentOverfl owControls() | 111 && layer.scrollParent()->compositedLayerMapping()->needsToReparentOverfl owControls() |
132 && layer.scrollParent()->scrollableArea()->topmostScrollChild() == &laye r) | 112 && layer.scrollParent()->scrollableArea()->topmostScrollChild() == &laye r) |
133 info.childLayersOfEnclosingCompositedLayer->append(layer.scrollParent()- >compositedLayerMapping()->detachLayerForOverflowControls(*info.enclosingComposi tedLayer)); | 113 info.childLayersOfEnclosingCompositedLayer->append(layer.scrollParent()- >compositedLayerMapping()->detachLayerForOverflowControls(*info.enclosingComposi tedLayer)); |
134 } | 114 } |
135 | 115 |
136 } | 116 } |
OLD | NEW |