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 * | 3 * |
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
5 * | 5 * |
6 * Other contributors: | 6 * Other contributors: |
7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 namespace WebCore { | 56 namespace WebCore { |
57 | 57 |
58 #if ENABLE(CSS_FILTERS) | 58 #if ENABLE(CSS_FILTERS) |
59 class FilterEffectRenderer; | 59 class FilterEffectRenderer; |
60 class FilterOperations; | 60 class FilterOperations; |
61 #endif | 61 #endif |
62 class HitTestRequest; | 62 class HitTestRequest; |
63 class HitTestResult; | 63 class HitTestResult; |
64 class HitTestingTransformState; | 64 class HitTestingTransformState; |
| 65 class PaintOrderLists; |
65 class RenderFlowThread; | 66 class RenderFlowThread; |
66 class RenderGeometryMap; | 67 class RenderGeometryMap; |
67 class RenderLayerBacking; | 68 class RenderLayerBacking; |
68 class RenderLayerCompositor; | 69 class RenderLayerCompositor; |
69 class RenderMarquee; | 70 class RenderMarquee; |
70 class RenderReplica; | 71 class RenderReplica; |
71 class RenderScrollbarPart; | 72 class RenderScrollbarPart; |
72 class RenderStyle; | 73 class RenderStyle; |
73 class RenderView; | 74 class RenderView; |
74 class Scrollbar; | 75 class Scrollbar; |
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
827 NotCompositedForBoundsOutOfView, | 828 NotCompositedForBoundsOutOfView, |
828 NotCompositedForNonViewContainer, | 829 NotCompositedForNonViewContainer, |
829 NotCompositedForNoVisibleContent, | 830 NotCompositedForNoVisibleContent, |
830 }; | 831 }; |
831 | 832 |
832 void setViewportConstrainedNotCompositedReason(ViewportConstrainedNotComposi
tedReason reason) { m_viewportConstrainedNotCompositedReason = reason; } | 833 void setViewportConstrainedNotCompositedReason(ViewportConstrainedNotComposi
tedReason reason) { m_viewportConstrainedNotCompositedReason = reason; } |
833 ViewportConstrainedNotCompositedReason viewportConstrainedNotCompositedReaso
n() const { return static_cast<ViewportConstrainedNotCompositedReason>(m_viewpor
tConstrainedNotCompositedReason); } | 834 ViewportConstrainedNotCompositedReason viewportConstrainedNotCompositedReaso
n() const { return static_cast<ViewportConstrainedNotCompositedReason>(m_viewpor
tConstrainedNotCompositedReason); } |
834 | 835 |
835 bool isOutOfFlowRenderFlowThread() const { return renderer()->isOutOfFlowRen
derFlowThread(); } | 836 bool isOutOfFlowRenderFlowThread() const { return renderer()->isOutOfFlowRen
derFlowThread(); } |
836 | 837 |
| 838 String paintOrderListsAsText(); |
| 839 PassRefPtr<PaintOrderLists> paintOrderLists(); |
| 840 |
837 private: | 841 private: |
838 enum CollectLayersBehavior { StopAtStackingContexts, StopAtStackingContainer
s }; | 842 enum CollectLayersBehavior { StopAtStackingContexts, StopAtStackingContainer
s }; |
839 | 843 |
840 void updateZOrderLists(); | 844 void updateZOrderLists(); |
841 void rebuildZOrderLists(); | 845 void rebuildZOrderLists(); |
842 void rebuildZOrderLists(CollectLayersBehavior, OwnPtr<Vector<RenderLayer*> >
&, OwnPtr<Vector<RenderLayer*> >&); | 846 // See the comment for collectLayers for information about the |
| 847 // layerToForceAsStackingContext parameter. |
| 848 void rebuildZOrderLists(CollectLayersBehavior, OwnPtr<Vector<RenderLayer*> >
&, OwnPtr<Vector<RenderLayer*> >&, const RenderLayer* layerToForceAsStackingCont
ext = 0); |
843 void clearZOrderLists(); | 849 void clearZOrderLists(); |
844 | 850 |
845 void updateNormalFlowList(); | 851 void updateNormalFlowList(); |
846 | 852 |
847 bool isStackingContext(const RenderStyle* style) const { return !style->hasA
utoZIndex() || isRootLayer(); } | 853 bool isStackingContext(const RenderStyle* style) const { return !style->hasA
utoZIndex() || isRootLayer(); } |
848 | 854 |
849 bool isDirtyStackingContainer() const { return m_zOrderListsDirty && isStack
ingContainer(); } | 855 bool isDirtyStackingContainer() const { return m_zOrderListsDirty && isStack
ingContainer(); } |
850 | 856 |
851 void setAncestorChainHasSelfPaintingLayerDescendant(); | 857 void setAncestorChainHasSelfPaintingLayerDescendant(); |
852 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); | 858 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); |
853 | 859 |
854 bool acceleratedCompositingForOverflowScrollEnabled() const; | 860 bool acceleratedCompositingForOverflowScrollEnabled() const; |
855 void updateDescendantsAreContiguousInStackingOrder(); | 861 void updateDescendantsAreContiguousInStackingOrder(); |
856 void updateDescendantsAreContiguousInStackingOrderRecursive(const HashMap<co
nst RenderLayer*, int>&, int& minIndex, int& maxIndex, int& count, bool firstIte
ration); | 862 void updateDescendantsAreContiguousInStackingOrderRecursive(const HashMap<co
nst RenderLayer*, int>&, int& minIndex, int& maxIndex, int& count, bool firstIte
ration); |
| 863 void collectBeforeAfterPromotionZOrderLists(RenderLayer* ancestorStackingCon
text, |
| 864 OwnPtr<Vector<RenderLayer*> >& posZOrderListBeforePromote, |
| 865 OwnPtr<Vector<RenderLayer*> >& negZOrderListBeforePromote, |
| 866 OwnPtr<Vector<RenderLayer*> >& posZOrderListAfterPromote, |
| 867 OwnPtr<Vector<RenderLayer*> >& negZOrderListAfterPromote); |
| 868 void getPaintOrderLists(RenderLayer* ancestorStackingContext, |
| 869 OwnPtr<Vector<RenderLayer*> >& posZOrderListBeforePromote, |
| 870 OwnPtr<Vector<RenderLayer*> >& negZOrderListBeforePromote, |
| 871 OwnPtr<Vector<RenderLayer*> >& posZOrderListAfterPromote, |
| 872 OwnPtr<Vector<RenderLayer*> >& negZOrderListAfterPromote); |
857 | 873 |
858 void computeRepaintRects(const RenderLayerModelObject* repaintContainer, con
st RenderGeometryMap* = 0); | 874 void computeRepaintRects(const RenderLayerModelObject* repaintContainer, con
st RenderGeometryMap* = 0); |
859 void computeRepaintRectsIncludingDescendants(); | 875 void computeRepaintRectsIncludingDescendants(); |
860 void clearRepaintRects(); | 876 void clearRepaintRects(); |
861 | 877 |
862 void clipToRect(RenderLayer* rootLayer, GraphicsContext*, const LayoutRect&
paintDirtyRect, const ClipRect&, | 878 void clipToRect(RenderLayer* rootLayer, GraphicsContext*, const LayoutRect&
paintDirtyRect, const ClipRect&, |
863 BorderRadiusClippingRule = IncludeSelfForBorderRadius); | 879 BorderRadiusClippingRule = IncludeSelfForBorderRadius); |
864 void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const C
lipRect&); | 880 void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const C
lipRect&); |
865 | 881 |
866 bool shouldRepaintAfterLayout() const; | 882 bool shouldRepaintAfterLayout() const; |
867 | 883 |
868 void updateSelfPaintingLayer(); | 884 void updateSelfPaintingLayer(); |
869 void updateStackingContextsAfterStyleChange(const RenderStyle* oldStyle); | 885 void updateStackingContextsAfterStyleChange(const RenderStyle* oldStyle); |
870 | 886 |
871 void updateScrollbarsAfterStyleChange(const RenderStyle* oldStyle); | 887 void updateScrollbarsAfterStyleChange(const RenderStyle* oldStyle); |
872 void updateScrollbarsAfterLayout(); | 888 void updateScrollbarsAfterLayout(); |
873 | 889 |
874 void setAncestorChainHasOutOfFlowPositionedDescendant(RenderObject* containi
ngBlock); | 890 void setAncestorChainHasOutOfFlowPositionedDescendant(RenderObject* containi
ngBlock); |
875 void dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus(); | 891 void dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus(); |
876 void updateOutOfFlowPositioned(const RenderStyle* oldStyle); | 892 void updateOutOfFlowPositioned(const RenderStyle* oldStyle); |
877 | 893 |
| 894 void updateIsNormalFlowOnly(); |
878 void updateNeedsCompositedScrolling(); | 895 void updateNeedsCompositedScrolling(); |
879 | 896 |
880 // Returns true if the position changed. | 897 // Returns true if the position changed. |
881 bool updateLayerPosition(); | 898 bool updateLayerPosition(); |
882 | 899 |
883 void updateLayerPositions(RenderGeometryMap* = 0, UpdateLayerPositionsFlags
= defaultFlags); | 900 void updateLayerPositions(RenderGeometryMap* = 0, UpdateLayerPositionsFlags
= defaultFlags); |
884 | 901 |
885 enum UpdateLayerPositionsAfterScrollFlag { | 902 enum UpdateLayerPositionsAfterScrollFlag { |
886 NoFlag = 0, | 903 NoFlag = 0, |
887 IsOverflowScroll = 1 << 0, | 904 IsOverflowScroll = 1 << 0, |
(...skipping 13 matching lines...) Expand all Loading... |
901 void* operator new(size_t) throw(); | 918 void* operator new(size_t) throw(); |
902 | 919 |
903 void setNextSibling(RenderLayer* next) { m_next = next; } | 920 void setNextSibling(RenderLayer* next) { m_next = next; } |
904 void setPreviousSibling(RenderLayer* prev) { m_previous = prev; } | 921 void setPreviousSibling(RenderLayer* prev) { m_previous = prev; } |
905 void setParent(RenderLayer* parent); | 922 void setParent(RenderLayer* parent); |
906 void setFirstChild(RenderLayer* first) { m_first = first; } | 923 void setFirstChild(RenderLayer* first) { m_first = first; } |
907 void setLastChild(RenderLayer* last) { m_last = last; } | 924 void setLastChild(RenderLayer* last) { m_last = last; } |
908 | 925 |
909 LayoutPoint renderBoxLocation() const { return renderer()->isBox() ? toRende
rBox(renderer())->location() : LayoutPoint(); } | 926 LayoutPoint renderBoxLocation() const { return renderer()->isBox() ? toRende
rBox(renderer())->location() : LayoutPoint(); } |
910 | 927 |
911 void collectLayers(bool includeHiddenLayers, CollectLayersBehavior, OwnPtr<V
ector<RenderLayer*> >&, OwnPtr<Vector<RenderLayer*> >&); | 928 // layerToForceAsStackingContext allows us to build pre-promotion and |
| 929 // post-promotion layer lists, by allowing us to treat a layer as if it is a |
| 930 // stacking context, without adding a new member to RenderLayer or modifying |
| 931 // the style (which could cause extra allocations). |
| 932 void collectLayers(bool includeHiddenLayers, CollectLayersBehavior, OwnPtr<V
ector<RenderLayer*> >&, OwnPtr<Vector<RenderLayer*> >&, const RenderLayer* layer
ToForceAsStackingContext = 0); |
912 | 933 |
913 void updateCompositingAndLayerListsIfNeeded(); | 934 void updateCompositingAndLayerListsIfNeeded(); |
914 | 935 |
915 struct LayerPaintingInfo { | 936 struct LayerPaintingInfo { |
916 LayerPaintingInfo(RenderLayer* inRootLayer, const LayoutRect& inDirtyRec
t, PaintBehavior inPaintBehavior, const LayoutSize& inSubPixelAccumulation, Rend
erObject* inPaintingRoot = 0, RenderRegion*inRegion = 0, OverlapTestRequestMap*
inOverlapTestRequests = 0) | 937 LayerPaintingInfo(RenderLayer* inRootLayer, const LayoutRect& inDirtyRec
t, PaintBehavior inPaintBehavior, const LayoutSize& inSubPixelAccumulation, Rend
erObject* inPaintingRoot = 0, RenderRegion*inRegion = 0, OverlapTestRequestMap*
inOverlapTestRequests = 0) |
917 : rootLayer(inRootLayer) | 938 : rootLayer(inRootLayer) |
918 , paintingRoot(inPaintingRoot) | 939 , paintingRoot(inPaintingRoot) |
919 , paintDirtyRect(inDirtyRect) | 940 , paintDirtyRect(inDirtyRect) |
920 , subPixelAccumulation(inSubPixelAccumulation) | 941 , subPixelAccumulation(inSubPixelAccumulation) |
921 , region(inRegion) | 942 , region(inRegion) |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1310 | 1331 |
1311 } // namespace WebCore | 1332 } // namespace WebCore |
1312 | 1333 |
1313 #ifndef NDEBUG | 1334 #ifndef NDEBUG |
1314 // Outside the WebCore namespace for ease of invocation from gdb. | 1335 // Outside the WebCore namespace for ease of invocation from gdb. |
1315 void showLayerTree(const WebCore::RenderLayer*); | 1336 void showLayerTree(const WebCore::RenderLayer*); |
1316 void showLayerTree(const WebCore::RenderObject*); | 1337 void showLayerTree(const WebCore::RenderObject*); |
1317 #endif | 1338 #endif |
1318 | 1339 |
1319 #endif // RenderLayer_h | 1340 #endif // RenderLayer_h |
OLD | NEW |