OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. |
3 * Copyright (C) 2013 Intel Corporation. All rights reserved. | 3 * Copyright (C) 2013 Intel Corporation. All rights reserved. |
4 * | 4 * |
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
6 * | 6 * |
7 * Other contributors: | 7 * Other contributors: |
8 * Robert O'Callahan <roc+@cs.cmu.edu> | 8 * Robert O'Callahan <roc+@cs.cmu.edu> |
9 * David Baron <dbaron@fas.harvard.edu> | 9 * David Baron <dbaron@fas.harvard.edu> |
10 * Christian Biesinger <cbiesinger@web.de> | 10 * Christian Biesinger <cbiesinger@web.de> |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 RenderLayerFilterInfo::removeFilterInfoForRenderLayer(this); | 232 RenderLayerFilterInfo::removeFilterInfoForRenderLayer(this); |
233 } | 233 } |
234 | 234 |
235 bool hasFilterInfo() const { return m_hasFilterInfo; } | 235 bool hasFilterInfo() const { return m_hasFilterInfo; } |
236 void setHasFilterInfo(bool hasFilterInfo) { m_hasFilterInfo = hasFilterInfo;
} | 236 void setHasFilterInfo(bool hasFilterInfo) { m_hasFilterInfo = hasFilterInfo;
} |
237 | 237 |
238 void updateFilters(const RenderStyle* oldStyle, const RenderStyle* newStyle)
; | 238 void updateFilters(const RenderStyle* oldStyle, const RenderStyle* newStyle)
; |
239 | 239 |
240 Node* enclosingElement() const; | 240 Node* enclosingElement() const; |
241 | 241 |
242 bool scrollsWithRespectTo(const RenderLayer*) const; | |
243 | |
244 RenderLayerClipper& clipper() { return m_clipper; } | 242 RenderLayerClipper& clipper() { return m_clipper; } |
245 const RenderLayerClipper& clipper() const { return m_clipper; } | 243 const RenderLayerClipper& clipper() const { return m_clipper; } |
246 | 244 |
247 inline bool isPositionedContainer() const | 245 inline bool isPositionedContainer() const |
248 { | 246 { |
249 // FIXME: This is not in sync with containingBlock. | 247 // FIXME: This is not in sync with containingBlock. |
250 RenderLayerModelObject* layerRenderer = renderer(); | 248 RenderLayerModelObject* layerRenderer = renderer(); |
251 return isRootLayer() || layerRenderer->isPositioned() || hasTransform(); | 249 return isRootLayer() || layerRenderer->isPositioned() || hasTransform(); |
252 } | 250 } |
253 | 251 |
254 class AncestorDependentCompositingInputs { | 252 class AncestorDependentCompositingInputs { |
255 public: | 253 public: |
256 AncestorDependentCompositingInputs() | 254 AncestorDependentCompositingInputs() |
257 : opacityAncestor(0) | 255 : opacityAncestor(0) |
258 , transformAncestor(0) | 256 , transformAncestor(0) |
259 , filterAncestor(0) | 257 , filterAncestor(0) |
260 , clippingContainer(0) | 258 , clippingContainer(0) |
261 , ancestorScrollingLayer(0) | |
262 , scrollParent(0) | |
263 , clipParent(0) | 259 , clipParent(0) |
264 , isUnclippedDescendant(false) | 260 , isUnclippedDescendant(false) |
265 , hasAncestorWithClipPath(false) | 261 , hasAncestorWithClipPath(false) |
266 { } | 262 { } |
267 | 263 |
268 IntRect clippedAbsoluteBoundingBox; | 264 IntRect clippedAbsoluteBoundingBox; |
269 const RenderLayer* opacityAncestor; | 265 const RenderLayer* opacityAncestor; |
270 const RenderLayer* transformAncestor; | 266 const RenderLayer* transformAncestor; |
271 const RenderLayer* filterAncestor; | 267 const RenderLayer* filterAncestor; |
272 const RenderObject* clippingContainer; | 268 const RenderObject* clippingContainer; |
273 const RenderLayer* ancestorScrollingLayer; | |
274 | |
275 // A scroll parent is a compositor concept. It's only needed in blink | |
276 // because we need to use it as a promotion trigger. A layer has a | |
277 // scroll parent if neither its compositor scrolling ancestor, nor any | |
278 // other layer scrolled by this ancestor, is a stacking ancestor of this | |
279 // layer. Layers with scroll parents must be scrolled with the main | |
280 // scrolling layer by the compositor. | |
281 const RenderLayer* scrollParent; | |
282 | 269 |
283 // A clip parent is another compositor concept that has leaked into | 270 // A clip parent is another compositor concept that has leaked into |
284 // blink so that it may be used as a promotion trigger. Layers with clip | 271 // blink so that it may be used as a promotion trigger. Layers with clip |
285 // parents escape the clip of a stacking tree ancestor. The compositor | 272 // parents escape the clip of a stacking tree ancestor. The compositor |
286 // needs to know about clip parents in order to circumvent its normal | 273 // needs to know about clip parents in order to circumvent its normal |
287 // clipping logic. | 274 // clipping logic. |
288 const RenderLayer* clipParent; | 275 const RenderLayer* clipParent; |
289 | 276 |
290 // The "is unclipped descendant" concept is now only being used for one | 277 // The "is unclipped descendant" concept is now only being used for one |
291 // purpose: when traversing the RenderLayers in stacking order, we check | 278 // purpose: when traversing the RenderLayers in stacking order, we check |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 void updateDescendantDependentCompositingInputs(const DescendantDependentCom
positingInputs&); | 312 void updateDescendantDependentCompositingInputs(const DescendantDependentCom
positingInputs&); |
326 | 313 |
327 const AncestorDependentCompositingInputs& ancestorDependentCompositingInputs
() const { ASSERT(!m_needsAncestorDependentCompositingInputsUpdate); return m_an
cestorDependentCompositingInputs; } | 314 const AncestorDependentCompositingInputs& ancestorDependentCompositingInputs
() const { ASSERT(!m_needsAncestorDependentCompositingInputsUpdate); return m_an
cestorDependentCompositingInputs; } |
328 const DescendantDependentCompositingInputs& descendantDependentCompositingIn
puts() const { ASSERT(!m_needsDescendantDependentCompositingInputsUpdate); retur
n m_descendantDependentCompositingInputs; } | 315 const DescendantDependentCompositingInputs& descendantDependentCompositingIn
puts() const { ASSERT(!m_needsDescendantDependentCompositingInputsUpdate); retur
n m_descendantDependentCompositingInputs; } |
329 | 316 |
330 IntRect clippedAbsoluteBoundingBox() const { return ancestorDependentComposi
tingInputs().clippedAbsoluteBoundingBox; } | 317 IntRect clippedAbsoluteBoundingBox() const { return ancestorDependentComposi
tingInputs().clippedAbsoluteBoundingBox; } |
331 const RenderLayer* opacityAncestor() const { return ancestorDependentComposi
tingInputs().opacityAncestor; } | 318 const RenderLayer* opacityAncestor() const { return ancestorDependentComposi
tingInputs().opacityAncestor; } |
332 const RenderLayer* transformAncestor() const { return ancestorDependentCompo
sitingInputs().transformAncestor; } | 319 const RenderLayer* transformAncestor() const { return ancestorDependentCompo
sitingInputs().transformAncestor; } |
333 const RenderLayer* filterAncestor() const { return ancestorDependentComposit
ingInputs().filterAncestor; } | 320 const RenderLayer* filterAncestor() const { return ancestorDependentComposit
ingInputs().filterAncestor; } |
334 const RenderObject* clippingContainer() const { return ancestorDependentComp
ositingInputs().clippingContainer; } | 321 const RenderObject* clippingContainer() const { return ancestorDependentComp
ositingInputs().clippingContainer; } |
335 const RenderLayer* ancestorScrollingLayer() const { return ancestorDependent
CompositingInputs().ancestorScrollingLayer; } | |
336 RenderLayer* scrollParent() const { return const_cast<RenderLayer*>(ancestor
DependentCompositingInputs().scrollParent); } | |
337 RenderLayer* clipParent() const { return const_cast<RenderLayer*>(ancestorDe
pendentCompositingInputs().clipParent); } | 322 RenderLayer* clipParent() const { return const_cast<RenderLayer*>(ancestorDe
pendentCompositingInputs().clipParent); } |
338 bool isUnclippedDescendant() const { return ancestorDependentCompositingInpu
ts().isUnclippedDescendant; } | 323 bool isUnclippedDescendant() const { return ancestorDependentCompositingInpu
ts().isUnclippedDescendant; } |
339 bool hasAncestorWithClipPath() const { return ancestorDependentCompositingIn
puts().hasAncestorWithClipPath; } | 324 bool hasAncestorWithClipPath() const { return ancestorDependentCompositingIn
puts().hasAncestorWithClipPath; } |
340 bool hasDescendantWithClipPath() const { return descendantDependentCompositi
ngInputs().hasDescendantWithClipPath; } | 325 bool hasDescendantWithClipPath() const { return descendantDependentCompositi
ngInputs().hasDescendantWithClipPath; } |
341 | 326 |
342 bool lostGroupedMapping() const { return m_lostGroupedMapping; } | 327 bool lostGroupedMapping() const { return m_lostGroupedMapping; } |
343 void setLostGroupedMapping(bool b) { m_lostGroupedMapping = b; } | 328 void setLostGroupedMapping(bool b) { m_lostGroupedMapping = b; } |
344 | 329 |
345 bool hasCompositingDescendant() const { return m_hasCompositingDescendant; } | 330 bool hasCompositingDescendant() const { return m_hasCompositingDescendant; } |
346 void setHasCompositingDescendant(bool); | 331 void setHasCompositingDescendant(bool); |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 | 483 |
499 } // namespace blink | 484 } // namespace blink |
500 | 485 |
501 #ifndef NDEBUG | 486 #ifndef NDEBUG |
502 // Outside the WebCore namespace for ease of invocation from gdb. | 487 // Outside the WebCore namespace for ease of invocation from gdb. |
503 void showLayerTree(const blink::RenderLayer*); | 488 void showLayerTree(const blink::RenderLayer*); |
504 void showLayerTree(const blink::RenderObject*); | 489 void showLayerTree(const blink::RenderObject*); |
505 #endif | 490 #endif |
506 | 491 |
507 #endif // SKY_ENGINE_CORE_RENDERING_RENDERLAYER_H_ | 492 #endif // SKY_ENGINE_CORE_RENDERING_RENDERLAYER_H_ |
OLD | NEW |