| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 infoForChildren.childLayersOfEnclosingCompositedLayer->append(curren
tCompositedLayerMapping->foregroundLayer()); | 76 infoForChildren.childLayersOfEnclosingCompositedLayer->append(curren
tCompositedLayerMapping->foregroundLayer()); |
| 77 } | 77 } |
| 78 | 78 |
| 79 RenderLayerStackingNodeIterator iterator(*layer.stackingNode(), NormalFlowCh
ildren | PositiveZOrderChildren); | 79 RenderLayerStackingNodeIterator iterator(*layer.stackingNode(), NormalFlowCh
ildren | PositiveZOrderChildren); |
| 80 while (RenderLayerStackingNode* curNode = iterator.next()) | 80 while (RenderLayerStackingNode* curNode = iterator.next()) |
| 81 rebuild(*curNode->layer(), infoForChildren); | 81 rebuild(*curNode->layer(), infoForChildren); |
| 82 | 82 |
| 83 if (hasCompositedLayerMapping) { | 83 if (hasCompositedLayerMapping) { |
| 84 currentCompositedLayerMapping->parentForSublayers()->setChildren(layerCh
ildren); | 84 currentCompositedLayerMapping->parentForSublayers()->setChildren(layerCh
ildren); |
| 85 | 85 |
| 86 // If the layer has a clipping layer the overflow controls layers will b
e siblings of the clipping layer. | |
| 87 // Otherwise, the overflow control layers are normal children. | |
| 88 // FIXME: Why isn't this handled in CLM updateInternalHierarchy? | |
| 89 if (!currentCompositedLayerMapping->hasClippingLayer() && !currentCompos
itedLayerMapping->hasScrollingLayer()) { | |
| 90 if (GraphicsLayer* overflowControlLayer = currentCompositedLayerMapp
ing->layerForHorizontalScrollbar()) { | |
| 91 overflowControlLayer->removeFromParent(); | |
| 92 currentCompositedLayerMapping->parentForSublayers()->addChild(ov
erflowControlLayer); | |
| 93 } | |
| 94 | |
| 95 if (GraphicsLayer* overflowControlLayer = currentCompositedLayerMapp
ing->layerForVerticalScrollbar()) { | |
| 96 overflowControlLayer->removeFromParent(); | |
| 97 currentCompositedLayerMapping->parentForSublayers()->addChild(ov
erflowControlLayer); | |
| 98 } | |
| 99 } | |
| 100 | |
| 101 info.childLayersOfEnclosingCompositedLayer->append(currentCompositedLaye
rMapping->childForSuperlayers()); | 86 info.childLayersOfEnclosingCompositedLayer->append(currentCompositedLaye
rMapping->childForSuperlayers()); |
| 102 } | 87 } |
| 103 | 88 |
| 104 if (layer.scrollParent() | 89 if (layer.scrollParent() |
| 105 && layer.scrollParent()->hasCompositedLayerMapping() | 90 && layer.scrollParent()->hasCompositedLayerMapping() |
| 106 && layer.scrollParent()->compositedLayerMapping()->needsToReparentOverfl
owControls() | 91 && layer.scrollParent()->compositedLayerMapping()->needsToReparentOverfl
owControls() |
| 107 && layer.scrollParent()->scrollableArea()->topmostScrollChild() == &laye
r) | 92 && layer.scrollParent()->scrollableArea()->topmostScrollChild() == &laye
r) |
| 108 info.childLayersOfEnclosingCompositedLayer->append(layer.scrollParent()-
>compositedLayerMapping()->detachLayerForOverflowControls(*info.enclosingComposi
tedLayer)); | 93 info.childLayersOfEnclosingCompositedLayer->append(layer.scrollParent()-
>compositedLayerMapping()->detachLayerForOverflowControls(*info.enclosingComposi
tedLayer)); |
| 109 } | 94 } |
| 110 | 95 |
| 111 } | 96 } |
| OLD | NEW |