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 26 matching lines...) Expand all Loading... | |
37 * version of this file under the LGPL, indicate your decision by | 37 * version of this file under the LGPL, indicate your decision by |
38 * deletingthe provisions above and replace them with the notice and | 38 * deletingthe provisions above and replace them with the notice and |
39 * other provisions required by the MPL or the GPL, as the case may be. | 39 * other provisions required by the MPL or the GPL, as the case may be. |
40 * If you do not delete the provisions above, a recipient may use your | 40 * If you do not delete the provisions above, a recipient may use your |
41 * version of this file under any of the LGPL, the MPL or the GPL. | 41 * version of this file under any of the LGPL, the MPL or the GPL. |
42 */ | 42 */ |
43 | 43 |
44 #ifndef RenderLayer_h | 44 #ifndef RenderLayer_h |
45 #define RenderLayer_h | 45 #define RenderLayer_h |
46 | 46 |
47 #include "core/page/Settings.h" | |
47 #include "core/platform/ScrollableArea.h" | 48 #include "core/platform/ScrollableArea.h" |
48 #include "core/rendering/PaintInfo.h" | 49 #include "core/rendering/PaintInfo.h" |
49 #include "core/rendering/RenderBox.h" | 50 #include "core/rendering/RenderBox.h" |
50 | 51 |
51 #include <wtf/OwnPtr.h> | 52 #include <wtf/OwnPtr.h> |
52 | 53 |
53 #include "core/rendering/RenderLayerFilterInfo.h" | 54 #include "core/rendering/RenderLayerFilterInfo.h" |
54 | 55 |
55 namespace WebCore { | 56 namespace WebCore { |
56 | 57 |
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
817 | 818 |
818 void setViewportConstrainedNotCompositedReason(ViewportConstrainedNotComposi tedReason reason) { m_compositingProperties.viewportConstrainedNotCompositedReas on = reason; } | 819 void setViewportConstrainedNotCompositedReason(ViewportConstrainedNotComposi tedReason reason) { m_compositingProperties.viewportConstrainedNotCompositedReas on = reason; } |
819 ViewportConstrainedNotCompositedReason viewportConstrainedNotCompositedReaso n() const { return static_cast<ViewportConstrainedNotCompositedReason>(m_composi tingProperties.viewportConstrainedNotCompositedReason); } | 820 ViewportConstrainedNotCompositedReason viewportConstrainedNotCompositedReaso n() const { return static_cast<ViewportConstrainedNotCompositedReason>(m_composi tingProperties.viewportConstrainedNotCompositedReason); } |
820 | 821 |
821 bool isOutOfFlowRenderFlowThread() const { return renderer()->isOutOfFlowRen derFlowThread(); } | 822 bool isOutOfFlowRenderFlowThread() const { return renderer()->isOutOfFlowRen derFlowThread(); } |
822 | 823 |
823 enum PaintOrderListType {BeforePromote, AfterPromote}; | 824 enum PaintOrderListType {BeforePromote, AfterPromote}; |
824 void computePaintOrderList(PaintOrderListType type, Vector<RefPtr<Node> >&); | 825 void computePaintOrderList(PaintOrderListType type, Vector<RefPtr<Node> >&); |
825 | 826 |
826 private: | 827 private: |
827 enum CollectLayersBehavior { StopAtStackingContexts, StopAtStackingContainer s }; | |
828 | |
829 void updateZOrderLists(); | 828 void updateZOrderLists(); |
830 void rebuildZOrderLists(); | 829 void rebuildZOrderLists(); |
831 // See the comment for collectLayers for information about the layerToForceA sStackingContainer parameter. | 830 // See the comment for collectLayers for information about the layerToForceA sStackingContainer parameter. |
832 void rebuildZOrderLists(CollectLayersBehavior, OwnPtr<Vector<RenderLayer*> > &, OwnPtr<Vector<RenderLayer*> >&, const RenderLayer* layerToForceAsStackingCont ainer = 0); | 831 void rebuildZOrderLists(OwnPtr<Vector<RenderLayer*> >&, OwnPtr<Vector<Render Layer*> >&, const RenderLayer* layerToForceAsStackingContainer = 0, AcceleratedC ompositingForOverflowScrollEnabledMode = AcceleratedCompositingForOverflowScroll Enabled); |
shawnsingh
2013/05/16 09:47:54
Actually my problem wasn't really with the naming,
| |
833 void clearZOrderLists(); | 832 void clearZOrderLists(); |
834 | 833 |
835 void updateNormalFlowList(); | 834 void updateNormalFlowList(); |
836 | 835 |
837 bool isStackingContext(const RenderStyle* style) const { return !style->hasA utoZIndex() || isRootLayer(); } | 836 bool isStackingContext(const RenderStyle* style) const { return !style->hasA utoZIndex() || isRootLayer(); } |
838 | 837 |
839 bool isDirtyStackingContainer() const { return m_zOrderListsDirty && isStack ingContainer(); } | 838 bool isDirtyStackingContainer() const { return m_zOrderListsDirty && isStack ingContainer(); } |
840 | 839 |
841 void setAncestorChainHasSelfPaintingLayerDescendant(); | 840 void setAncestorChainHasSelfPaintingLayerDescendant(); |
842 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); | 841 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
901 void setParent(RenderLayer* parent); | 900 void setParent(RenderLayer* parent); |
902 void setFirstChild(RenderLayer* first) { m_first = first; } | 901 void setFirstChild(RenderLayer* first) { m_first = first; } |
903 void setLastChild(RenderLayer* last) { m_last = last; } | 902 void setLastChild(RenderLayer* last) { m_last = last; } |
904 | 903 |
905 LayoutPoint renderBoxLocation() const { return renderer()->isBox() ? toRende rBox(renderer())->location() : LayoutPoint(); } | 904 LayoutPoint renderBoxLocation() const { return renderer()->isBox() ? toRende rBox(renderer())->location() : LayoutPoint(); } |
906 | 905 |
907 // layerToForceAsStackingContainer allows us to build pre-promotion and | 906 // layerToForceAsStackingContainer allows us to build pre-promotion and |
908 // post-promotion layer lists, by allowing us to treat a layer as if it is a | 907 // post-promotion layer lists, by allowing us to treat a layer as if it is a |
909 // stacking context, without adding a new member to RenderLayer or modifying | 908 // stacking context, without adding a new member to RenderLayer or modifying |
910 // the style (which could cause extra allocations). | 909 // the style (which could cause extra allocations). |
911 void collectLayers(bool includeHiddenLayers, CollectLayersBehavior, OwnPtr<V ector<RenderLayer*> >&, OwnPtr<Vector<RenderLayer*> >&, const RenderLayer* layer ToForceAsStackingContainer = 0); | 910 void collectLayers(bool includeHiddenLayers, OwnPtr<Vector<RenderLayer*> >&, OwnPtr<Vector<RenderLayer*> >&, const RenderLayer* layerToForceAsStackingContai ner = 0, AcceleratedCompositingForOverflowScrollEnabledMode = AcceleratedComposi tingForOverflowScrollEnabled); |
912 | 911 |
913 struct LayerPaintingInfo { | 912 struct LayerPaintingInfo { |
914 LayerPaintingInfo(RenderLayer* inRootLayer, const LayoutRect& inDirtyRec t, PaintBehavior inPaintBehavior, const LayoutSize& inSubPixelAccumulation, Rend erObject* inPaintingRoot = 0, RenderRegion*inRegion = 0, OverlapTestRequestMap* inOverlapTestRequests = 0) | 913 LayerPaintingInfo(RenderLayer* inRootLayer, const LayoutRect& inDirtyRec t, PaintBehavior inPaintBehavior, const LayoutSize& inSubPixelAccumulation, Rend erObject* inPaintingRoot = 0, RenderRegion*inRegion = 0, OverlapTestRequestMap* inOverlapTestRequests = 0) |
915 : rootLayer(inRootLayer) | 914 : rootLayer(inRootLayer) |
916 , paintingRoot(inPaintingRoot) | 915 , paintingRoot(inPaintingRoot) |
917 , paintDirtyRect(inDirtyRect) | 916 , paintDirtyRect(inDirtyRect) |
918 , subPixelAccumulation(inSubPixelAccumulation) | 917 , subPixelAccumulation(inSubPixelAccumulation) |
919 , region(inRegion) | 918 , region(inRegion) |
920 , overlapTestRequests(inOverlapTestRequests) | 919 , overlapTestRequests(inOverlapTestRequests) |
921 , paintBehavior(inPaintBehavior) | 920 , paintBehavior(inPaintBehavior) |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
984 const LayoutRect& hitTestRect, const HitTestLocation&, const HitTestingT ransformState* = 0, double* zOffset = 0); | 983 const LayoutRect& hitTestRect, const HitTestLocation&, const HitTestingT ransformState* = 0, double* zOffset = 0); |
985 | 984 |
986 bool listBackgroundIsKnownToBeOpaqueInRect(const Vector<RenderLayer*>*, cons t LayoutRect&) const; | 985 bool listBackgroundIsKnownToBeOpaqueInRect(const Vector<RenderLayer*>*, cons t LayoutRect&) const; |
987 | 986 |
988 void computeScrollDimensions(); | 987 void computeScrollDimensions(); |
989 bool hasHorizontalOverflow() const; | 988 bool hasHorizontalOverflow() const; |
990 bool hasVerticalOverflow() const; | 989 bool hasVerticalOverflow() const; |
991 bool hasScrollableHorizontalOverflow() const; | 990 bool hasScrollableHorizontalOverflow() const; |
992 bool hasScrollableVerticalOverflow() const; | 991 bool hasScrollableVerticalOverflow() const; |
993 | 992 |
994 bool shouldBeNormalFlowOnly() const; | 993 bool shouldBeNormalFlowOnly(AcceleratedCompositingForOverflowScrollEnabledMo de = AcceleratedCompositingForOverflowScrollEnabled) const; |
995 | 994 |
996 bool shouldBeSelfPaintingLayer() const; | 995 bool shouldBeSelfPaintingLayer() const; |
997 | 996 |
998 int scrollPosition(Scrollbar*) const; | 997 int scrollPosition(Scrollbar*) const; |
999 | 998 |
1000 // ScrollableArea interface | 999 // ScrollableArea interface |
1001 virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&); | 1000 virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&); |
1002 virtual void invalidateScrollCornerRect(const IntRect&); | 1001 virtual void invalidateScrollCornerRect(const IntRect&); |
1003 virtual bool isActive() const; | 1002 virtual bool isActive() const; |
1004 virtual bool isScrollCornerVisible() const; | 1003 virtual bool isScrollCornerVisible() const; |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1322 | 1321 |
1323 } // namespace WebCore | 1322 } // namespace WebCore |
1324 | 1323 |
1325 #ifndef NDEBUG | 1324 #ifndef NDEBUG |
1326 // Outside the WebCore namespace for ease of invocation from gdb. | 1325 // Outside the WebCore namespace for ease of invocation from gdb. |
1327 void showLayerTree(const WebCore::RenderLayer*); | 1326 void showLayerTree(const WebCore::RenderLayer*); |
1328 void showLayerTree(const WebCore::RenderObject*); | 1327 void showLayerTree(const WebCore::RenderObject*); |
1329 #endif | 1328 #endif |
1330 | 1329 |
1331 #endif // RenderLayer_h | 1330 #endif // RenderLayer_h |
OLD | NEW |