| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 // Layer to get clipped by ancestor | 89 // Layer to get clipped by ancestor |
| 90 bool hasAncestorClippingLayer() const { return m_ancestorClippingLayer; } | 90 bool hasAncestorClippingLayer() const { return m_ancestorClippingLayer; } |
| 91 GraphicsLayer* ancestorClippingLayer() const { return m_ancestorClippingLaye
r.get(); } | 91 GraphicsLayer* ancestorClippingLayer() const { return m_ancestorClippingLaye
r.get(); } |
| 92 | 92 |
| 93 bool hasContentsLayer() const { return m_foregroundLayer; } | 93 bool hasContentsLayer() const { return m_foregroundLayer; } |
| 94 GraphicsLayer* foregroundLayer() const { return m_foregroundLayer.get(); } | 94 GraphicsLayer* foregroundLayer() const { return m_foregroundLayer.get(); } |
| 95 | 95 |
| 96 GraphicsLayer* backgroundLayer() const { return m_backgroundLayer.get(); } | 96 GraphicsLayer* backgroundLayer() const { return m_backgroundLayer.get(); } |
| 97 bool backgroundLayerPaintsFixedRootBackground() const { return m_backgroundL
ayerPaintsFixedRootBackground; } | 97 bool backgroundLayerPaintsFixedRootBackground() const { return m_backgroundL
ayerPaintsFixedRootBackground; } |
| 98 | 98 |
| 99 bool hasScrollingLayer() const { return m_scrollingLayer; } | |
| 100 GraphicsLayer* scrollingLayer() const { return m_scrollingLayer.get(); } | |
| 101 GraphicsLayer* scrollingContentsLayer() const { return m_scrollingContentsLa
yer.get(); } | |
| 102 GraphicsLayer* scrollingBlockSelectionLayer() const { return m_scrollingBloc
kSelectionLayer.get(); } | |
| 103 | |
| 104 bool hasMaskLayer() const { return m_maskLayer; } | 99 bool hasMaskLayer() const { return m_maskLayer; } |
| 105 GraphicsLayer* maskLayer() const { return m_maskLayer.get(); } | 100 GraphicsLayer* maskLayer() const { return m_maskLayer.get(); } |
| 106 | 101 |
| 107 bool hasChildClippingMaskLayer() const { return m_childClippingMaskLayer; } | 102 bool hasChildClippingMaskLayer() const { return m_childClippingMaskLayer; } |
| 108 GraphicsLayer* childClippingMaskLayer() const { return m_childClippingMaskLa
yer.get(); } | 103 GraphicsLayer* childClippingMaskLayer() const { return m_childClippingMaskLa
yer.get(); } |
| 109 | 104 |
| 110 GraphicsLayer* parentForSublayers() const; | 105 GraphicsLayer* parentForSublayers() const; |
| 111 GraphicsLayer* childForSuperlayers() const; | 106 GraphicsLayer* childForSuperlayers() const; |
| 112 | 107 |
| 113 GraphicsLayer* childTransformLayer() const { return m_childTransformLayer.ge
t(); } | 108 GraphicsLayer* childTransformLayer() const { return m_childTransformLayer.ge
t(); } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 134 void setContentsNeedDisplay(); | 129 void setContentsNeedDisplay(); |
| 135 // r is in the coordinate space of the layer's render object | 130 // r is in the coordinate space of the layer's render object |
| 136 void setContentsNeedDisplayInRect(const LayoutRect&); | 131 void setContentsNeedDisplayInRect(const LayoutRect&); |
| 137 | 132 |
| 138 // Notification from the renderer that its content changed. | 133 // Notification from the renderer that its content changed. |
| 139 void contentChanged(ContentChangeType); | 134 void contentChanged(ContentChangeType); |
| 140 | 135 |
| 141 LayoutRect compositedBounds() const { return m_compositedBounds; } | 136 LayoutRect compositedBounds() const { return m_compositedBounds; } |
| 142 IntRect pixelSnappedCompositedBounds() const; | 137 IntRect pixelSnappedCompositedBounds() const; |
| 143 | 138 |
| 144 void positionOverflowControlsLayers(const IntSize& offsetFromRoot); | |
| 145 bool hasUnpositionedOverflowControlsLayers() const; | |
| 146 | |
| 147 // Returns true if the assignment actually changed the assigned squashing la
yer. | 139 // Returns true if the assignment actually changed the assigned squashing la
yer. |
| 148 bool updateSquashingLayerAssignment(RenderLayer* squashedLayer, const Render
Layer& owningLayer, size_t nextSquashedLayerIndex); | 140 bool updateSquashingLayerAssignment(RenderLayer* squashedLayer, const Render
Layer& owningLayer, size_t nextSquashedLayerIndex); |
| 149 void removeRenderLayerFromSquashingGraphicsLayer(const RenderLayer*); | 141 void removeRenderLayerFromSquashingGraphicsLayer(const RenderLayer*); |
| 150 | 142 |
| 151 void finishAccumulatingSquashingLayers(size_t nextSquashedLayerIndex); | 143 void finishAccumulatingSquashingLayers(size_t nextSquashedLayerIndex); |
| 152 void updateRenderingContext(); | 144 void updateRenderingContext(); |
| 153 void updateShouldFlattenTransform(); | 145 void updateShouldFlattenTransform(); |
| 154 | 146 |
| 155 // GraphicsLayerClient interface | 147 // GraphicsLayerClient interface |
| 156 virtual void notifyAnimationStarted(const GraphicsLayer*, double monotonicTi
me) override; | 148 virtual void notifyAnimationStarted(const GraphicsLayer*, double monotonicTi
me) override; |
| 157 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL
ayerPaintingPhase, const IntRect& clip) override; | 149 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL
ayerPaintingPhase, const IntRect& clip) override; |
| 158 virtual bool isTrackingPaintInvalidations() const override; | 150 virtual bool isTrackingPaintInvalidations() const override; |
| 159 | 151 |
| 160 #if ENABLE(ASSERT) | 152 #if ENABLE(ASSERT) |
| 161 virtual void verifyNotPainting() override; | 153 virtual void verifyNotPainting() override; |
| 162 #endif | 154 #endif |
| 163 | 155 |
| 164 LayoutRect contentsBox() const; | 156 LayoutRect contentsBox() const; |
| 165 | 157 |
| 166 GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizo
ntalScrollbar.get(); } | |
| 167 GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVertical
Scrollbar.get(); } | |
| 168 | |
| 169 // Returns true if the overflow controls cannot be positioned within this | 158 // Returns true if the overflow controls cannot be positioned within this |
| 170 // CLM's internal hierarchy without incorrectly stacking under some | 159 // CLM's internal hierarchy without incorrectly stacking under some |
| 171 // scrolling content. If this returns true, these controls must be | 160 // scrolling content. If this returns true, these controls must be |
| 172 // repositioned in the graphics layer tree to ensure that they stack above | 161 // repositioned in the graphics layer tree to ensure that they stack above |
| 173 // scrolling content. | 162 // scrolling content. |
| 174 bool needsToReparentOverflowControls() const; | 163 bool needsToReparentOverflowControls() const; |
| 175 | 164 |
| 176 // Removes the overflow controls host layer from its parent and positions it | 165 // Removes the overflow controls host layer from its parent and positions it |
| 177 // so that it can be inserted as a sibling to this CLM without changing | 166 // so that it can be inserted as a sibling to this CLM without changing |
| 178 // position. | 167 // position. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 197 LayoutSize contentOffsetInCompositingLayer() const; | 186 LayoutSize contentOffsetInCompositingLayer() const; |
| 198 | 187 |
| 199 LayoutPoint squashingOffsetFromTransformedAncestor() | 188 LayoutPoint squashingOffsetFromTransformedAncestor() |
| 200 { | 189 { |
| 201 return m_squashingLayerOffsetFromTransformedAncestor; | 190 return m_squashingLayerOffsetFromTransformedAncestor; |
| 202 } | 191 } |
| 203 | 192 |
| 204 // If there is a squashed layer painting into this CLM that is an ancestor o
f the given RenderObject, return it. Otherwise return 0. | 193 // If there is a squashed layer painting into this CLM that is an ancestor o
f the given RenderObject, return it. Otherwise return 0. |
| 205 const GraphicsLayerPaintInfo* containingSquashedLayer(const RenderObject*); | 194 const GraphicsLayerPaintInfo* containingSquashedLayer(const RenderObject*); |
| 206 | 195 |
| 207 void updateScrollingBlockSelection(); | |
| 208 | |
| 209 private: | 196 private: |
| 210 static const GraphicsLayerPaintInfo* containingSquashedLayer(const RenderObj
ect*, const Vector<GraphicsLayerPaintInfo>& layers); | 197 static const GraphicsLayerPaintInfo* containingSquashedLayer(const RenderObj
ect*, const Vector<GraphicsLayerPaintInfo>& layers); |
| 211 | 198 |
| 212 // Helper methods to updateGraphicsLayerGeometry: | 199 // Helper methods to updateGraphicsLayerGeometry: |
| 213 void computeGraphicsLayerParentLocation(const RenderLayer* compositingContai
ner, const IntRect& ancestorCompositingBounds, IntPoint& graphicsLayerParentLoca
tion); | 200 void computeGraphicsLayerParentLocation(const RenderLayer* compositingContai
ner, const IntRect& ancestorCompositingBounds, IntPoint& graphicsLayerParentLoca
tion); |
| 214 void updateSquashingLayerGeometry(const LayoutPoint& offsetFromCompositedAnc
estor, const IntPoint& graphicsLayerParentLocation, const RenderLayer& reference
Layer, Vector<GraphicsLayerPaintInfo>& layers, GraphicsLayer*, LayoutPoint* offs
etFromTransformedAncestor, Vector<RenderLayer*>& layersNeedingPaintInvalidation)
; | 201 void updateSquashingLayerGeometry(const LayoutPoint& offsetFromCompositedAnc
estor, const IntPoint& graphicsLayerParentLocation, const RenderLayer& reference
Layer, Vector<GraphicsLayerPaintInfo>& layers, GraphicsLayer*, LayoutPoint* offs
etFromTransformedAncestor, Vector<RenderLayer*>& layersNeedingPaintInvalidation)
; |
| 215 void updateMainGraphicsLayerGeometry(const IntRect& relativeCompositingBound
s, const IntRect& localCompositingBounds, const IntPoint& graphicsLayerParentLoc
ation); | 202 void updateMainGraphicsLayerGeometry(const IntRect& relativeCompositingBound
s, const IntRect& localCompositingBounds, const IntPoint& graphicsLayerParentLoc
ation); |
| 216 void updateAncestorClippingLayerGeometry(const RenderLayer* compositingConta
iner, const IntPoint& snappedOffsetFromCompositedAncestor, IntPoint& graphicsLay
erParentLocation); | 203 void updateAncestorClippingLayerGeometry(const RenderLayer* compositingConta
iner, const IntPoint& snappedOffsetFromCompositedAncestor, IntPoint& graphicsLay
erParentLocation); |
| 217 void updateOverflowControlsHostLayerGeometry(const RenderLayer* compositingS
tackingContext); | 204 void updateOverflowControlsHostLayerGeometry(const RenderLayer* compositingS
tackingContext); |
| 218 void updateChildContainmentLayerGeometry(const IntRect& clippingBox, const I
ntRect& localCompositingBounds); | 205 void updateChildContainmentLayerGeometry(const IntRect& clippingBox, const I
ntRect& localCompositingBounds); |
| 219 void updateChildTransformLayerGeometry(); | 206 void updateChildTransformLayerGeometry(); |
| 220 void updateMaskLayerGeometry(); | 207 void updateMaskLayerGeometry(); |
| 221 void updateTransformGeometry(const IntPoint& snappedOffsetFromCompositedAnce
stor, const IntRect& relativeCompositingBounds); | 208 void updateTransformGeometry(const IntPoint& snappedOffsetFromCompositedAnce
stor, const IntRect& relativeCompositingBounds); |
| 222 void updateForegroundLayerGeometry(const FloatSize& relativeCompositingBound
sSize, const IntRect& clippingBox); | 209 void updateForegroundLayerGeometry(const FloatSize& relativeCompositingBound
sSize, const IntRect& clippingBox); |
| 223 void updateBackgroundLayerGeometry(const FloatSize& relativeCompositingBound
sSize); | 210 void updateBackgroundLayerGeometry(const FloatSize& relativeCompositingBound
sSize); |
| 224 void updateScrollingLayerGeometry(const IntRect& localCompositingBounds); | |
| 225 void updateChildClippingMaskLayerGeometry(); | 211 void updateChildClippingMaskLayerGeometry(); |
| 226 | 212 |
| 227 void createPrimaryGraphicsLayer(); | 213 void createPrimaryGraphicsLayer(); |
| 228 void destroyGraphicsLayers(); | 214 void destroyGraphicsLayers(); |
| 229 | 215 |
| 230 PassOwnPtr<GraphicsLayer> createGraphicsLayer(CompositingReasons); | 216 PassOwnPtr<GraphicsLayer> createGraphicsLayer(CompositingReasons); |
| 231 bool toggleScrollbarLayerIfNeeded(OwnPtr<GraphicsLayer>&, bool needsLayer, C
ompositingReasons); | |
| 232 | 217 |
| 233 RenderLayerModelObject* renderer() const { return m_owningLayer.renderer();
} | 218 RenderLayerModelObject* renderer() const { return m_owningLayer.renderer();
} |
| 234 RenderLayerCompositor* compositor() const { return m_owningLayer.compositor(
); } | 219 RenderLayerCompositor* compositor() const { return m_owningLayer.compositor(
); } |
| 235 | 220 |
| 236 void updateInternalHierarchy(); | 221 void updateInternalHierarchy(); |
| 237 void updatePaintingPhases(); | 222 void updatePaintingPhases(); |
| 238 bool updateClippingLayers(bool needsAncestorClip, bool needsDescendantClip); | 223 bool updateClippingLayers(bool needsAncestorClip, bool needsDescendantClip); |
| 239 bool updateChildTransformLayer(bool needsChildTransformLayer); | 224 bool updateChildTransformLayer(bool needsChildTransformLayer); |
| 240 bool updateOverflowControlsLayers(bool needsHorizontalScrollbarLayer, bool n
eedsVerticalScrollbarLayer, bool needsAncestorClip); | |
| 241 bool updateForegroundLayer(bool needsForegroundLayer); | 225 bool updateForegroundLayer(bool needsForegroundLayer); |
| 242 bool updateBackgroundLayer(bool needsBackgroundLayer); | 226 bool updateBackgroundLayer(bool needsBackgroundLayer); |
| 243 bool updateMaskLayer(bool needsMaskLayer); | 227 bool updateMaskLayer(bool needsMaskLayer); |
| 244 bool updateClippingMaskLayers(bool needsChildClippingMaskLayer); | 228 bool updateClippingMaskLayers(bool needsChildClippingMaskLayer); |
| 245 bool requiresHorizontalScrollbarLayer() const { return m_owningLayer.scrolla
bleArea() && m_owningLayer.scrollableArea()->horizontalScrollbar(); } | |
| 246 bool requiresVerticalScrollbarLayer() const { return m_owningLayer.scrollabl
eArea() && m_owningLayer.scrollableArea()->verticalScrollbar(); } | |
| 247 bool updateScrollingLayers(bool scrollingLayers); | |
| 248 void updateScrollParent(RenderLayer*); | |
| 249 void updateClipParent(); | 229 void updateClipParent(); |
| 250 bool updateSquashingLayers(bool needsSquashingLayers); | 230 bool updateSquashingLayers(bool needsSquashingLayers); |
| 251 void updateDrawsContent(); | 231 void updateDrawsContent(); |
| 252 void updateChildrenTransform(); | 232 void updateChildrenTransform(); |
| 253 void updateCompositedBounds(); | 233 void updateCompositedBounds(); |
| 254 | 234 |
| 255 // Also sets subpixelAccumulation on the layer. | 235 // Also sets subpixelAccumulation on the layer. |
| 256 void computeBoundsOfOwningLayer(const RenderLayer* compositedAncestor, IntRe
ct& localCompositingBounds, IntRect& compositingBoundsRelativeToCompositedAncest
or, LayoutPoint& offsetFromCompositedAncestor, IntPoint& snappedOffsetFromCompos
itedAncestor); | 236 void computeBoundsOfOwningLayer(const RenderLayer* compositedAncestor, IntRe
ct& localCompositingBounds, IntRect& compositingBoundsRelativeToCompositedAncest
or, LayoutPoint& offsetFromCompositedAncestor, IntPoint& snappedOffsetFromCompos
itedAncestor); |
| 257 | 237 |
| 258 void setBackgroundLayerPaintsFixedRootBackground(bool); | 238 void setBackgroundLayerPaintsFixedRootBackground(bool); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 // Return true if |m_owningLayer|'s compositing ancestor is not a descendant
(inclusive) of the | 275 // Return true if |m_owningLayer|'s compositing ancestor is not a descendant
(inclusive) of the |
| 296 // clipping container for |m_owningLayer|. | 276 // clipping container for |m_owningLayer|. |
| 297 bool owningLayerClippedByLayerNotAboveCompositedAncestor(); | 277 bool owningLayerClippedByLayerNotAboveCompositedAncestor(); |
| 298 | 278 |
| 299 RenderLayer& m_owningLayer; | 279 RenderLayer& m_owningLayer; |
| 300 | 280 |
| 301 // The hierarchy of layers that is maintained by the CompositedLayerMapping
looks like this: | 281 // The hierarchy of layers that is maintained by the CompositedLayerMapping
looks like this: |
| 302 // | 282 // |
| 303 // + m_ancestorClippingLayer [OPTIONAL] | 283 // + m_ancestorClippingLayer [OPTIONAL] |
| 304 // + m_graphicsLayer | 284 // + m_graphicsLayer |
| 305 // + m_childContainmentLayer [OPTIONAL] <-OR-> m_scrollingLayer [OPTI
ONAL] <-OR-> m_childTransformLayer | 285 // + m_childContainmentLayer [OPTIONAL] <-OR-> m_childTransformLayer |
| 306 // | + m_scrollingContents
Layer [Present iff m_scrollingLayer is present] | |
| 307 // | + m_scrollingBlock
SelectionLayer [Present iff m_scrollingLayer is present] | |
| 308 // | | 286 // | |
| 309 // + m_overflowControlsClippingLayer [OPTIONAL] // *The overflow cont
rols may need to be repositioned in the | 287 // + m_overflowControlsClippingLayer [OPTIONAL] // *The overflow cont
rols may need to be repositioned in the |
| 310 // + m_overflowControlsHostLayer // graphics layer tr
ee by the RLC to ensure that they stack | 288 // + m_overflowControlsHostLayer // graphics layer tr
ee by the RLC to ensure that they stack |
| 311 // + m_layerForVerticalScrollbar // above scrolling c
ontent. | |
| 312 // + m_layerForHorizontalScrollbar | |
| 313 // | 289 // |
| 314 // We need an ancestor clipping layer if our clipping ancestor is not our an
cestor in the | 290 // We need an ancestor clipping layer if our clipping ancestor is not our an
cestor in the |
| 315 // clipping tree. Here's what that might look like. | 291 // clipping tree. Here's what that might look like. |
| 316 // | 292 // |
| 317 // Let A = the clipping ancestor, | 293 // Let A = the clipping ancestor, |
| 318 // B = the clip descendant, and | 294 // B = the clip descendant, and |
| 319 // SC = the stacking context that is the ancestor of A and B in the stac
king tree. | 295 // SC = the stacking context that is the ancestor of A and B in the stac
king tree. |
| 320 // | 296 // |
| 321 // SC | 297 // SC |
| 322 // + A = m_graphicsLayer | 298 // + A = m_graphicsLayer |
| 323 // | + m_childContainmentLayer | 299 // | + m_childContainmentLayer |
| 324 // | + ... | 300 // | + ... |
| 325 // ... | 301 // ... |
| 326 // | | 302 // | |
| 327 // + B = m_ancestorClippingLayer [+] | 303 // + B = m_ancestorClippingLayer [+] |
| 328 // + m_graphicsLayer | 304 // + m_graphicsLayer |
| 329 // + ... | 305 // + ... |
| 330 // | 306 // |
| 331 // In this case B is clipped by another layer that doesn't happen to be its
ancestor: A. | 307 // In this case B is clipped by another layer that doesn't happen to be its
ancestor: A. |
| 332 // So we create an ancestor clipping layer for B, [+], which ensures that B
is clipped | 308 // So we create an ancestor clipping layer for B, [+], which ensures that B
is clipped |
| 333 // as if it had been A's descendant. | 309 // as if it had been A's descendant. |
| 334 OwnPtr<GraphicsLayer> m_ancestorClippingLayer; // Only used if we are clippe
d by an ancestor which is not a stacking context. | 310 OwnPtr<GraphicsLayer> m_ancestorClippingLayer; // Only used if we are clippe
d by an ancestor which is not a stacking context. |
| 335 OwnPtr<GraphicsLayer> m_graphicsLayer; | 311 OwnPtr<GraphicsLayer> m_graphicsLayer; |
| 336 OwnPtr<GraphicsLayer> m_childContainmentLayer; // Only used if we have clipp
ing on a stacking context with compositing children. | 312 OwnPtr<GraphicsLayer> m_childContainmentLayer; // Only used if we have clipp
ing on a stacking context with compositing children. |
| 337 OwnPtr<GraphicsLayer> m_childTransformLayer; // Only used if we have perspec
tive and no m_childContainmentLayer. | 313 OwnPtr<GraphicsLayer> m_childTransformLayer; // Only used if we have perspec
tive and no m_childContainmentLayer. |
| 338 OwnPtr<GraphicsLayer> m_scrollingLayer; // Only used if the layer is using c
omposited scrolling. | |
| 339 OwnPtr<GraphicsLayer> m_scrollingContentsLayer; // Only used if the layer is
using composited scrolling. | |
| 340 OwnPtr<GraphicsLayer> m_scrollingBlockSelectionLayer; // Only used if the la
yer is using composited scrolling, but has no scrolling contents apart from bloc
k selection gaps. | |
| 341 | 314 |
| 342 // This layer is also added to the hierarchy by the RLB, but in a different
way than | 315 // This layer is also added to the hierarchy by the RLB, but in a different
way than |
| 343 // the layers above. It's added to m_graphicsLayer as its mask layer (natura
lly) if | 316 // the layers above. It's added to m_graphicsLayer as its mask layer (natura
lly) if |
| 344 // we have a mask, and isn't part of the typical hierarchy (it has no childr
en). | 317 // we have a mask, and isn't part of the typical hierarchy (it has no childr
en). |
| 345 OwnPtr<GraphicsLayer> m_maskLayer; // Only used if we have a mask. | 318 OwnPtr<GraphicsLayer> m_maskLayer; // Only used if we have a mask. |
| 346 OwnPtr<GraphicsLayer> m_childClippingMaskLayer; // Only used if we have to c
lip child layers or accelerated contents with border radius or clip-path. | 319 OwnPtr<GraphicsLayer> m_childClippingMaskLayer; // Only used if we have to c
lip child layers or accelerated contents with border radius or clip-path. |
| 347 | 320 |
| 348 // There are two other (optional) layers whose painting is managed by the Co
mpositedLayerMapping, | 321 // There are two other (optional) layers whose painting is managed by the Co
mpositedLayerMapping, |
| 349 // but whose position in the hierarchy is maintained by the RenderLayerCompo
sitor. These | 322 // but whose position in the hierarchy is maintained by the RenderLayerCompo
sitor. These |
| 350 // are the foreground and background layers. The foreground layer exists if
we have composited | 323 // are the foreground and background layers. The foreground layer exists if
we have composited |
| (...skipping 12 matching lines...) Expand all Loading... |
| 363 // + frame clipping layer | 336 // + frame clipping layer |
| 364 // + m_backgroundLayer | 337 // + m_backgroundLayer |
| 365 // + frame scrolling layer | 338 // + frame scrolling layer |
| 366 // + root content layer | 339 // + root content layer |
| 367 // | 340 // |
| 368 // With the hierarchy set up like this, the root content layer is able to sc
roll without affecting | 341 // With the hierarchy set up like this, the root content layer is able to sc
roll without affecting |
| 369 // the background layer (or paint invalidation). | 342 // the background layer (or paint invalidation). |
| 370 OwnPtr<GraphicsLayer> m_foregroundLayer; // Only used in cases where we need
to draw the foreground separately. | 343 OwnPtr<GraphicsLayer> m_foregroundLayer; // Only used in cases where we need
to draw the foreground separately. |
| 371 OwnPtr<GraphicsLayer> m_backgroundLayer; // Only used in cases where we need
to draw the background separately. | 344 OwnPtr<GraphicsLayer> m_backgroundLayer; // Only used in cases where we need
to draw the background separately. |
| 372 | 345 |
| 373 OwnPtr<GraphicsLayer> m_layerForHorizontalScrollbar; | |
| 374 OwnPtr<GraphicsLayer> m_layerForVerticalScrollbar; | |
| 375 | |
| 376 // This layer exists to simplify the reparenting of overflow control that is
occasionally required | 346 // This layer exists to simplify the reparenting of overflow control that is
occasionally required |
| 377 // to ensure that scrollbars appear above scrolling content. | 347 // to ensure that scrollbars appear above scrolling content. |
| 378 OwnPtr<GraphicsLayer> m_overflowControlsHostLayer; | 348 OwnPtr<GraphicsLayer> m_overflowControlsHostLayer; |
| 379 | 349 |
| 380 // The reparented overflow controls sometimes need to be clipped by a non-an
cestor. In just the same | 350 // The reparented overflow controls sometimes need to be clipped by a non-an
cestor. In just the same |
| 381 // way we need an ancestor clipping layer to clip this CLM's internal hierar
chy, we add another layer | 351 // way we need an ancestor clipping layer to clip this CLM's internal hierar
chy, we add another layer |
| 382 // to clip the overflow controls. It would be possible to make m_overflowCon
trolsHostLayer be | 352 // to clip the overflow controls. It would be possible to make m_overflowCon
trolsHostLayer be |
| 383 // responsible for applying this clip, but that could require repositioning
all of the overflow | 353 // responsible for applying this clip, but that could require repositioning
all of the overflow |
| 384 // controls since the this clip may apply an offset. By using a separate lay
er, the overflow controls | 354 // controls since the this clip may apply an offset. By using a separate lay
er, the overflow controls |
| 385 // can remain ignorant of the layers above them and still work correctly. | 355 // can remain ignorant of the layers above them and still work correctly. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 408 | 378 |
| 409 LayoutRect m_compositedBounds; | 379 LayoutRect m_compositedBounds; |
| 410 | 380 |
| 411 LayoutSize m_contentOffsetInCompositingLayer; | 381 LayoutSize m_contentOffsetInCompositingLayer; |
| 412 unsigned m_contentOffsetInCompositingLayerDirty : 1; | 382 unsigned m_contentOffsetInCompositingLayerDirty : 1; |
| 413 | 383 |
| 414 unsigned m_pendingUpdateScope : 2; | 384 unsigned m_pendingUpdateScope : 2; |
| 415 unsigned m_requiresOwnBackingStoreForIntrinsicReasons : 1; | 385 unsigned m_requiresOwnBackingStoreForIntrinsicReasons : 1; |
| 416 unsigned m_requiresOwnBackingStoreForAncestorReasons : 1; | 386 unsigned m_requiresOwnBackingStoreForAncestorReasons : 1; |
| 417 unsigned m_backgroundLayerPaintsFixedRootBackground : 1; | 387 unsigned m_backgroundLayerPaintsFixedRootBackground : 1; |
| 418 unsigned m_scrollingContentsAreEmpty : 1; | |
| 419 }; | 388 }; |
| 420 | 389 |
| 421 } // namespace blink | 390 } // namespace blink |
| 422 | 391 |
| 423 #endif // CompositedLayerMapping_h | 392 #endif // CompositedLayerMapping_h |
| OLD | NEW |