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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 void setOffsetFromSquashingLayerOrigin(IntSize offset) { m_compositingProper
ties.offsetFromSquashingLayerOrigin = offset; } | 473 void setOffsetFromSquashingLayerOrigin(IntSize offset) { m_compositingProper
ties.offsetFromSquashingLayerOrigin = offset; } |
474 IntSize offsetFromSquashingLayerOrigin() const { return m_compositingPropert
ies.offsetFromSquashingLayerOrigin; } | 474 IntSize offsetFromSquashingLayerOrigin() const { return m_compositingPropert
ies.offsetFromSquashingLayerOrigin; } |
475 | 475 |
476 bool scrollsOverflow() const; | 476 bool scrollsOverflow() const; |
477 | 477 |
478 bool hasDirectReasonsForCompositing() const { return compositingReasons() &
CompositingReasonComboAllDirectReasons; } | 478 bool hasDirectReasonsForCompositing() const { return compositingReasons() &
CompositingReasonComboAllDirectReasons; } |
479 CompositingReasons styleDeterminedCompositingReasons() const { return compos
itingReasons() & CompositingReasonComboAllStyleDeterminedReasons; } | 479 CompositingReasons styleDeterminedCompositingReasons() const { return compos
itingReasons() & CompositingReasonComboAllStyleDeterminedReasons; } |
480 | 480 |
481 void clearAncestorDependentPropertyCache(); | 481 void clearAncestorDependentPropertyCache(); |
482 | 482 |
483 const IntRect& absoluteBoundingBox() { ASSERT(!m_needsToRecomputeBounds); re
turn m_absoluteBoundingBox; } | 483 class AncestorDependentProperties { |
484 void setAbsoluteBoundingBox(const IntRect&); | 484 public: |
485 void clearNeedsToRecomputeBounds(); | 485 IntRect absoluteBoundingBox; |
486 bool needsToRecomputeBounds() { return m_needsToRecomputeBounds; } | 486 }; |
| 487 |
| 488 void setNeedsToUpdateAncestorDependentProperties(); |
| 489 bool childNeedsToUpdateAncestorDependantProperties() const { return m_childN
eedsToUpdateAncestorDependantProperties; } |
| 490 bool needsToUpdateAncestorDependentProperties() const { return m_needsToUpda
teAncestorDependentProperties; } |
| 491 |
| 492 void updateAncestorDependentProperties(const AncestorDependentProperties&); |
| 493 void clearChildNeedsToUpdateAncestorDependantProperties(); |
| 494 |
| 495 const AncestorDependentProperties& ancestorDependentProperties() { ASSERT(!m
_needsToUpdateAncestorDependentProperties); return m_ancestorDependentProperties
; } |
487 | 496 |
488 private: | 497 private: |
| 498 // FIXME: Merge with AncestorDependentProperties. |
489 class AncestorDependentPropertyCache { | 499 class AncestorDependentPropertyCache { |
490 WTF_MAKE_NONCOPYABLE(AncestorDependentPropertyCache); | 500 WTF_MAKE_NONCOPYABLE(AncestorDependentPropertyCache); |
491 public: | 501 public: |
492 AncestorDependentPropertyCache(); | 502 AncestorDependentPropertyCache(); |
493 | 503 |
494 RenderLayer* ancestorCompositedScrollingLayer() const; | 504 RenderLayer* ancestorCompositedScrollingLayer() const; |
495 void setAncestorCompositedScrollingLayer(RenderLayer*); | 505 void setAncestorCompositedScrollingLayer(RenderLayer*); |
496 | 506 |
497 RenderLayer* scrollParent() const; | 507 RenderLayer* scrollParent() const; |
498 void setScrollParent(RenderLayer*); | 508 void setScrollParent(RenderLayer*); |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 unsigned m_has3DTransformedDescendant : 1; | 716 unsigned m_has3DTransformedDescendant : 1; |
707 | 717 |
708 unsigned m_containsDirtyOverlayScrollbars : 1; | 718 unsigned m_containsDirtyOverlayScrollbars : 1; |
709 | 719 |
710 // This is an optimization added for <table>. | 720 // This is an optimization added for <table>. |
711 // Currently cells do not need to update their repaint rectangles when scrol
ling. This also | 721 // Currently cells do not need to update their repaint rectangles when scrol
ling. This also |
712 // saves a lot of time when scrolling on a table. | 722 // saves a lot of time when scrolling on a table. |
713 const unsigned m_canSkipRepaintRectsUpdateOnScroll : 1; | 723 const unsigned m_canSkipRepaintRectsUpdateOnScroll : 1; |
714 | 724 |
715 unsigned m_hasFilterInfo : 1; | 725 unsigned m_hasFilterInfo : 1; |
716 unsigned m_needsToRecomputeBounds : 1; | 726 unsigned m_needsToUpdateAncestorDependentProperties : 1; |
| 727 unsigned m_childNeedsToUpdateAncestorDependantProperties : 1; |
717 | 728 |
718 RenderLayerModelObject* m_renderer; | 729 RenderLayerModelObject* m_renderer; |
719 | 730 |
720 RenderLayer* m_parent; | 731 RenderLayer* m_parent; |
721 RenderLayer* m_previous; | 732 RenderLayer* m_previous; |
722 RenderLayer* m_next; | 733 RenderLayer* m_next; |
723 RenderLayer* m_first; | 734 RenderLayer* m_first; |
724 RenderLayer* m_last; | 735 RenderLayer* m_last; |
725 | 736 |
726 // Our current relative position offset. | 737 // Our current relative position offset. |
727 LayoutSize m_offsetForInFlowPosition; | 738 LayoutSize m_offsetForInFlowPosition; |
728 | 739 |
729 // Our (x,y) coordinates are in our parent layer's coordinate space. | 740 // Our (x,y) coordinates are in our parent layer's coordinate space. |
730 LayoutPoint m_topLeft; | 741 LayoutPoint m_topLeft; |
731 | 742 |
732 // The layer's width/height | 743 // The layer's width/height |
733 IntSize m_layerSize; | 744 IntSize m_layerSize; |
734 | 745 |
735 // Cached normal flow values for absolute positioned elements with static le
ft/top values. | 746 // Cached normal flow values for absolute positioned elements with static le
ft/top values. |
736 LayoutUnit m_staticInlinePosition; | 747 LayoutUnit m_staticInlinePosition; |
737 LayoutUnit m_staticBlockPosition; | 748 LayoutUnit m_staticBlockPosition; |
738 | 749 |
739 IntRect m_absoluteBoundingBox; | |
740 | |
741 OwnPtr<TransformationMatrix> m_transform; | 750 OwnPtr<TransformationMatrix> m_transform; |
742 | 751 |
743 // Pointer to the enclosing RenderLayer that caused us to be paginated. It i
s 0 if we are not paginated. | 752 // Pointer to the enclosing RenderLayer that caused us to be paginated. It i
s 0 if we are not paginated. |
744 RenderLayer* m_enclosingPaginationLayer; | 753 RenderLayer* m_enclosingPaginationLayer; |
745 | 754 |
746 // Properties that are computed while updating compositing layers. These val
ues may be dirty/invalid if | 755 // Properties that are computed while updating compositing layers. These val
ues may be dirty/invalid if |
747 // compositing status is not up-to-date before using them. | 756 // compositing status is not up-to-date before using them. |
748 struct CompositingProperties { | 757 struct CompositingProperties { |
749 CompositingProperties() | 758 CompositingProperties() |
750 : hasCompositingDescendant(false) | 759 : hasCompositingDescendant(false) |
(...skipping 21 matching lines...) Expand all Loading... |
772 // The reason, if any exists, that a fixed-position layer is chosen not
to be composited. | 781 // The reason, if any exists, that a fixed-position layer is chosen not
to be composited. |
773 unsigned viewportConstrainedNotCompositedReason : ViewportConstrainedNot
CompositedReasonBits; | 782 unsigned viewportConstrainedNotCompositedReason : ViewportConstrainedNot
CompositedReasonBits; |
774 | 783 |
775 // Once computed, indicates all that a layer needs to become composited
using the CompositingReasons enum bitfield. | 784 // Once computed, indicates all that a layer needs to become composited
using the CompositingReasons enum bitfield. |
776 CompositingReasons compositingReasons; | 785 CompositingReasons compositingReasons; |
777 | 786 |
778 // Used for invalidating this layer's contents on the squashing Graphics
Layer. | 787 // Used for invalidating this layer's contents on the squashing Graphics
Layer. |
779 IntSize offsetFromSquashingLayerOrigin; | 788 IntSize offsetFromSquashingLayerOrigin; |
780 }; | 789 }; |
781 | 790 |
| 791 // FIXME: Merge m_ancestorDependentPropertyCache into m_ancestorDependentPro
perties; |
| 792 AncestorDependentProperties m_ancestorDependentProperties; |
| 793 |
782 CompositingProperties m_compositingProperties; | 794 CompositingProperties m_compositingProperties; |
783 | 795 |
784 IntRect m_blockSelectionGapsBounds; | 796 IntRect m_blockSelectionGapsBounds; |
785 | 797 |
786 OwnPtr<CompositedLayerMapping> m_compositedLayerMapping; | 798 OwnPtr<CompositedLayerMapping> m_compositedLayerMapping; |
787 OwnPtr<RenderLayerScrollableArea> m_scrollableArea; | 799 OwnPtr<RenderLayerScrollableArea> m_scrollableArea; |
788 | 800 |
789 mutable OwnPtr<AncestorDependentPropertyCache> m_ancestorDependentPropertyCa
che; | 801 mutable OwnPtr<AncestorDependentPropertyCache> m_ancestorDependentPropertyCa
che; |
790 | 802 |
791 CompositedLayerMapping* m_groupedMapping; | 803 CompositedLayerMapping* m_groupedMapping; |
792 | 804 |
793 RenderLayerRepainter m_repainter; | 805 RenderLayerRepainter m_repainter; |
794 RenderLayerClipper m_clipper; // FIXME: Lazily allocate? | 806 RenderLayerClipper m_clipper; // FIXME: Lazily allocate? |
795 OwnPtr<RenderLayerStackingNode> m_stackingNode; | 807 OwnPtr<RenderLayerStackingNode> m_stackingNode; |
796 OwnPtr<RenderLayerReflectionInfo> m_reflectionInfo; | 808 OwnPtr<RenderLayerReflectionInfo> m_reflectionInfo; |
797 RenderLayerBlendInfo m_blendInfo; | 809 RenderLayerBlendInfo m_blendInfo; |
798 }; | 810 }; |
799 | 811 |
800 } // namespace WebCore | 812 } // namespace WebCore |
801 | 813 |
802 #ifndef NDEBUG | 814 #ifndef NDEBUG |
803 // Outside the WebCore namespace for ease of invocation from gdb. | 815 // Outside the WebCore namespace for ease of invocation from gdb. |
804 void showLayerTree(const WebCore::RenderLayer*); | 816 void showLayerTree(const WebCore::RenderLayer*); |
805 void showLayerTree(const WebCore::RenderObject*); | 817 void showLayerTree(const WebCore::RenderObject*); |
806 #endif | 818 #endif |
807 | 819 |
808 #endif // RenderLayer_h | 820 #endif // RenderLayer_h |
OLD | NEW |