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 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 TransformationMatrix perspectiveTransform() const; | 722 TransformationMatrix perspectiveTransform() const; |
723 FloatPoint perspectiveOrigin() const; | 723 FloatPoint perspectiveOrigin() const; |
724 bool preserves3D() const { return renderer()->style()->transformStyle3D() ==
TransformStyle3DPreserve3D; } | 724 bool preserves3D() const { return renderer()->style()->transformStyle3D() ==
TransformStyle3DPreserve3D; } |
725 bool has3DTransform() const { return m_transform && !m_transform->isAffine()
; } | 725 bool has3DTransform() const { return m_transform && !m_transform->isAffine()
; } |
726 | 726 |
727 virtual void filterNeedsRepaint(); | 727 virtual void filterNeedsRepaint(); |
728 bool hasFilter() const { return renderer()->hasFilter(); } | 728 bool hasFilter() const { return renderer()->hasFilter(); } |
729 | 729 |
730 bool hasBlendMode() const; | 730 bool hasBlendMode() const; |
731 | 731 |
732 // Overloaded new operator. Derived classes must override operator new | 732 void* operator new(size_t); |
733 // in order to allocate out of the RenderArena. | 733 // Only safe to call from RenderLayerModelObject::destroyLayer() |
734 void* operator new(size_t, RenderArena*); | 734 void operator delete(void*); |
735 | |
736 // Overridden to prevent the normal delete from being called. | |
737 void operator delete(void*, size_t); | |
738 | 735 |
739 bool isComposited() const { return m_backing != 0; } | 736 bool isComposited() const { return m_backing != 0; } |
740 bool hasCompositedMask() const; | 737 bool hasCompositedMask() const; |
741 RenderLayerBacking* backing() const { return m_backing.get(); } | 738 RenderLayerBacking* backing() const { return m_backing.get(); } |
742 RenderLayerBacking* ensureBacking(); | 739 RenderLayerBacking* ensureBacking(); |
743 void clearBacking(bool layerBeingDestroyed = false); | 740 void clearBacking(bool layerBeingDestroyed = false); |
744 virtual GraphicsLayer* layerForScrolling() const; | 741 virtual GraphicsLayer* layerForScrolling() const; |
745 virtual GraphicsLayer* layerForHorizontalScrollbar() const; | 742 virtual GraphicsLayer* layerForHorizontalScrollbar() const; |
746 virtual GraphicsLayer* layerForVerticalScrollbar() const; | 743 virtual GraphicsLayer* layerForVerticalScrollbar() const; |
747 virtual GraphicsLayer* layerForScrollCorner() const; | 744 virtual GraphicsLayer* layerForScrollCorner() const; |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
896 HasChangedAncestor = 1 << 3 | 893 HasChangedAncestor = 1 << 3 |
897 }; | 894 }; |
898 typedef unsigned UpdateLayerPositionsAfterScrollFlags; | 895 typedef unsigned UpdateLayerPositionsAfterScrollFlags; |
899 void updateLayerPositionsAfterScroll(RenderGeometryMap*, UpdateLayerPosition
sAfterScrollFlags = NoFlag); | 896 void updateLayerPositionsAfterScroll(RenderGeometryMap*, UpdateLayerPosition
sAfterScrollFlags = NoFlag); |
900 | 897 |
901 friend IntSize RenderBox::scrolledContentOffset() const; | 898 friend IntSize RenderBox::scrolledContentOffset() const; |
902 IntSize scrolledContentOffset() const { return m_scrollOffset; } | 899 IntSize scrolledContentOffset() const { return m_scrollOffset; } |
903 | 900 |
904 IntSize clampScrollOffset(const IntSize&) const; | 901 IntSize clampScrollOffset(const IntSize&) const; |
905 | 902 |
906 // The normal operator new is disallowed on all render objects. | |
907 void* operator new(size_t) throw(); | |
908 | |
909 void setNextSibling(RenderLayer* next) { m_next = next; } | 903 void setNextSibling(RenderLayer* next) { m_next = next; } |
910 void setPreviousSibling(RenderLayer* prev) { m_previous = prev; } | 904 void setPreviousSibling(RenderLayer* prev) { m_previous = prev; } |
911 void setParent(RenderLayer* parent); | 905 void setParent(RenderLayer* parent); |
912 void setFirstChild(RenderLayer* first) { m_first = first; } | 906 void setFirstChild(RenderLayer* first) { m_first = first; } |
913 void setLastChild(RenderLayer* last) { m_last = last; } | 907 void setLastChild(RenderLayer* last) { m_last = last; } |
914 | 908 |
915 LayoutPoint renderBoxLocation() const { return renderer()->isBox() ? toRende
rBox(renderer())->location() : LayoutPoint(); } | 909 LayoutPoint renderBoxLocation() const { return renderer()->isBox() ? toRende
rBox(renderer())->location() : LayoutPoint(); } |
916 | 910 |
917 // layerToForceAsStackingContainer allows us to build pre-promotion and | 911 // layerToForceAsStackingContainer allows us to build pre-promotion and |
918 // post-promotion layer lists, by allowing us to treat a layer as if it is a | 912 // post-promotion layer lists, by allowing us to treat a layer as if it is a |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1093 void setCompositingReasons(CompositingReasons reasons) { m_compositingProper
ties.compositingReasons = reasons; } | 1087 void setCompositingReasons(CompositingReasons reasons) { m_compositingProper
ties.compositingReasons = reasons; } |
1094 CompositingReasons compositingReasons() const { return m_compositingProperti
es.compositingReasons; } | 1088 CompositingReasons compositingReasons() const { return m_compositingProperti
es.compositingReasons; } |
1095 | 1089 |
1096 // Returns true if z ordering would not change if this layer were a stacking
container. | 1090 // Returns true if z ordering would not change if this layer were a stacking
container. |
1097 bool canBeStackingContainer() const; | 1091 bool canBeStackingContainer() const; |
1098 | 1092 |
1099 friend class RenderLayerBacking; | 1093 friend class RenderLayerBacking; |
1100 friend class RenderLayerCompositor; | 1094 friend class RenderLayerCompositor; |
1101 friend class RenderLayerModelObject; | 1095 friend class RenderLayerModelObject; |
1102 | 1096 |
1103 // Only safe to call from RenderLayerModelObject::destroyLayer(RenderArena*) | |
1104 void destroy(RenderArena*); | |
1105 | |
1106 LayoutUnit overflowTop() const; | 1097 LayoutUnit overflowTop() const; |
1107 LayoutUnit overflowBottom() const; | 1098 LayoutUnit overflowBottom() const; |
1108 LayoutUnit overflowLeft() const; | 1099 LayoutUnit overflowLeft() const; |
1109 LayoutUnit overflowRight() const; | 1100 LayoutUnit overflowRight() const; |
1110 | 1101 |
1111 IntRect rectForHorizontalScrollbar(const IntRect& borderBoxRect) const; | 1102 IntRect rectForHorizontalScrollbar(const IntRect& borderBoxRect) const; |
1112 IntRect rectForVerticalScrollbar(const IntRect& borderBoxRect) const; | 1103 IntRect rectForVerticalScrollbar(const IntRect& borderBoxRect) const; |
1113 | 1104 |
1114 LayoutUnit verticalScrollbarStart(int minX, int maxX) const; | 1105 LayoutUnit verticalScrollbarStart(int minX, int maxX) const; |
1115 LayoutUnit horizontalScrollbarStart(int minX) const; | 1106 LayoutUnit horizontalScrollbarStart(int minX) const; |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1322 | 1313 |
1323 } // namespace WebCore | 1314 } // namespace WebCore |
1324 | 1315 |
1325 #ifndef NDEBUG | 1316 #ifndef NDEBUG |
1326 // Outside the WebCore namespace for ease of invocation from gdb. | 1317 // Outside the WebCore namespace for ease of invocation from gdb. |
1327 void showLayerTree(const WebCore::RenderLayer*); | 1318 void showLayerTree(const WebCore::RenderLayer*); |
1328 void showLayerTree(const WebCore::RenderObject*); | 1319 void showLayerTree(const WebCore::RenderObject*); |
1329 #endif | 1320 #endif |
1330 | 1321 |
1331 #endif // RenderLayer_h | 1322 #endif // RenderLayer_h |
OLD | NEW |