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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 bool hasCompositedMask() const; | 350 bool hasCompositedMask() const; |
351 bool hasCompositedClippingMask() const; | 351 bool hasCompositedClippingMask() const; |
352 bool needsCompositedScrolling() const { return m_scrollableArea && m_scrolla
bleArea->needsCompositedScrolling(); } | 352 bool needsCompositedScrolling() const { return m_scrollableArea && m_scrolla
bleArea->needsCompositedScrolling(); } |
353 | 353 |
354 RenderLayer* scrollParent() const; | 354 RenderLayer* scrollParent() const; |
355 RenderLayer* clipParent() const; | 355 RenderLayer* clipParent() const; |
356 | 356 |
357 bool needsCompositingLayersRebuiltForClip(const RenderStyle* oldStyle, const
RenderStyle* newStyle) const; | 357 bool needsCompositingLayersRebuiltForClip(const RenderStyle* oldStyle, const
RenderStyle* newStyle) const; |
358 bool needsCompositingLayersRebuiltForOverflow(const RenderStyle* oldStyle, c
onst RenderStyle* newStyle) const; | 358 bool needsCompositingLayersRebuiltForOverflow(const RenderStyle* oldStyle, c
onst RenderStyle* newStyle) const; |
359 bool needsCompositingLayersRebuiltForFilters(const RenderStyle* oldStyle, co
nst RenderStyle* newStyle, bool didPaintWithFilters) const; | 359 bool needsCompositingLayersRebuiltForFilters(const RenderStyle* oldStyle, co
nst RenderStyle* newStyle, bool didPaintWithFilters) const; |
| 360 bool needsCompositingLayersRebuiltForBlending(const RenderStyle* oldStyle, c
onst RenderStyle* newStyle) const; |
360 | 361 |
361 bool paintsWithTransparency(PaintBehavior paintBehavior) const | 362 bool paintsWithTransparency(PaintBehavior paintBehavior) const |
362 { | 363 { |
363 return isTransparent() && ((paintBehavior & PaintBehaviorFlattenComposit
ingLayers) || compositingState() != PaintsIntoOwnBacking); | 364 return isTransparent() && ((paintBehavior & PaintBehaviorFlattenComposit
ingLayers) || compositingState() != PaintsIntoOwnBacking); |
364 } | 365 } |
365 | 366 |
366 bool paintsWithTransform(PaintBehavior) const; | 367 bool paintsWithTransform(PaintBehavior) const; |
367 | 368 |
368 // Returns true if background phase is painted opaque in the given rect. | 369 // Returns true if background phase is painted opaque in the given rect. |
369 // The query rect is given in local coordinates. | 370 // The query rect is given in local coordinates. |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 RenderLayer* enclosingTransformedAncestor() const; | 583 RenderLayer* enclosingTransformedAncestor() const; |
583 | 584 |
584 void updatePagination(); | 585 void updatePagination(); |
585 | 586 |
586 // FIXME: Temporary. Remove when new columns come online. | 587 // FIXME: Temporary. Remove when new columns come online. |
587 bool useRegionBasedColumns() const; | 588 bool useRegionBasedColumns() const; |
588 | 589 |
589 bool hasCompositingDescendant() const { return m_compositingProperties.hasCo
mpositingDescendant; } | 590 bool hasCompositingDescendant() const { return m_compositingProperties.hasCo
mpositingDescendant; } |
590 void setHasCompositingDescendant(bool b) { m_compositingProperties.hasCompo
sitingDescendant = b; } | 591 void setHasCompositingDescendant(bool b) { m_compositingProperties.hasCompo
sitingDescendant = b; } |
591 | 592 |
| 593 bool shouldIsolateCompositedDescendants() const { return m_compositingProper
ties.shouldIsolateCompositedDescendants; } |
| 594 void setShouldIsolateCompositedDescendants(bool b) { m_compositingPropertie
s.shouldIsolateCompositedDescendants = b; } |
| 595 |
592 void setCompositingReasons(CompositingReasons reasons) { m_compositingProper
ties.compositingReasons = reasons; } | 596 void setCompositingReasons(CompositingReasons reasons) { m_compositingProper
ties.compositingReasons = reasons; } |
593 CompositingReasons compositingReasons() const { return m_compositingProperti
es.compositingReasons; } | 597 CompositingReasons compositingReasons() const { return m_compositingProperti
es.compositingReasons; } |
594 | 598 |
595 friend class CompositedLayerMapping; | 599 friend class CompositedLayerMapping; |
596 friend class RenderLayerCompositor; | 600 friend class RenderLayerCompositor; |
597 friend class RenderLayerModelObject; | 601 friend class RenderLayerModelObject; |
598 | 602 |
599 protected: | 603 protected: |
600 unsigned m_isSelfPaintingLayer : 1; | 604 unsigned m_isSelfPaintingLayer : 1; |
601 | 605 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 OwnPtr<TransformationMatrix> m_transform; | 675 OwnPtr<TransformationMatrix> m_transform; |
672 | 676 |
673 // Pointer to the enclosing RenderLayer that caused us to be paginated. It i
s 0 if we are not paginated. | 677 // Pointer to the enclosing RenderLayer that caused us to be paginated. It i
s 0 if we are not paginated. |
674 RenderLayer* m_enclosingPaginationLayer; | 678 RenderLayer* m_enclosingPaginationLayer; |
675 | 679 |
676 // Properties that are computed while updating compositing layers. These val
ues may be dirty/invalid if | 680 // Properties that are computed while updating compositing layers. These val
ues may be dirty/invalid if |
677 // compositing status is not up-to-date before using them. | 681 // compositing status is not up-to-date before using them. |
678 struct CompositingProperties { | 682 struct CompositingProperties { |
679 CompositingProperties() | 683 CompositingProperties() |
680 : hasCompositingDescendant(false) | 684 : hasCompositingDescendant(false) |
| 685 , shouldIsolateCompositedDescendants(false) |
681 , viewportConstrainedNotCompositedReason(NoNotCompositedReason) | 686 , viewportConstrainedNotCompositedReason(NoNotCompositedReason) |
682 , compositingReasons(CompositingReasonNone) | 687 , compositingReasons(CompositingReasonNone) |
683 { } | 688 { } |
684 | 689 |
685 // Used only while determining what layers should be composited. Applies
to the tree of z-order lists. | 690 // Used only while determining what layers should be composited. Applies
to the tree of z-order lists. |
686 bool hasCompositingDescendant : 1; | 691 bool hasCompositingDescendant : 1; |
687 | 692 |
| 693 // Should be for stacking contexts having unisolated blending descendant
s. |
| 694 bool shouldIsolateCompositedDescendants : 1; |
| 695 |
688 // The reason, if any exists, that a fixed-position layer is chosen not
to be composited. | 696 // The reason, if any exists, that a fixed-position layer is chosen not
to be composited. |
689 unsigned viewportConstrainedNotCompositedReason : 2; | 697 unsigned viewportConstrainedNotCompositedReason : 2; |
690 | 698 |
691 // Once computed, indicates all that a layer needs to become composited
using the CompositingReasons enum bitfield. | 699 // Once computed, indicates all that a layer needs to become composited
using the CompositingReasons enum bitfield. |
692 CompositingReasons compositingReasons; | 700 CompositingReasons compositingReasons; |
693 }; | 701 }; |
694 | 702 |
695 CompositingProperties m_compositingProperties; | 703 CompositingProperties m_compositingProperties; |
696 | 704 |
697 private: | 705 private: |
(...skipping 17 matching lines...) Expand all Loading... |
715 | 723 |
716 } // namespace WebCore | 724 } // namespace WebCore |
717 | 725 |
718 #ifndef NDEBUG | 726 #ifndef NDEBUG |
719 // Outside the WebCore namespace for ease of invocation from gdb. | 727 // Outside the WebCore namespace for ease of invocation from gdb. |
720 void showLayerTree(const WebCore::RenderLayer*); | 728 void showLayerTree(const WebCore::RenderLayer*); |
721 void showLayerTree(const WebCore::RenderObject*); | 729 void showLayerTree(const WebCore::RenderObject*); |
722 #endif | 730 #endif |
723 | 731 |
724 #endif // RenderLayer_h | 732 #endif // RenderLayer_h |
OLD | NEW |