Chromium Code Reviews| 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 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 815 void computePaintOrderList(PaintOrderListType type, Vector<RefPtr<Node> >&); | 815 void computePaintOrderList(PaintOrderListType type, Vector<RefPtr<Node> >&); |
| 816 | 816 |
| 817 enum ForceNeedsCompositedScrollingMode { | 817 enum ForceNeedsCompositedScrollingMode { |
| 818 DoNotForceCompositedScrolling = 0, | 818 DoNotForceCompositedScrolling = 0, |
| 819 ForceCompositedScrollingOn, | 819 ForceCompositedScrollingOn, |
| 820 ForceCompositedScrollingOff | 820 ForceCompositedScrollingOff |
| 821 }; | 821 }; |
| 822 void setForceNeedsCompositedScrolling(ForceNeedsCompositedScrollingMode); | 822 void setForceNeedsCompositedScrolling(ForceNeedsCompositedScrollingMode); |
| 823 | 823 |
| 824 private: | 824 private: |
| 825 enum CollectLayersBehavior { StopAtStackingContexts, StopAtStackingContainer s }; | |
| 826 | |
| 827 void updateZOrderLists(); | 825 void updateZOrderLists(); |
| 828 void rebuildZOrderLists(); | 826 void rebuildZOrderLists(); |
| 829 // See the comment for collectLayers for information about the layerToForceA sStackingContainer parameter. | 827 // See the comment for collectLayers for information about the layerToForceA sStackingContainer parameter. |
| 830 void rebuildZOrderLists(CollectLayersBehavior, OwnPtr<Vector<RenderLayer*> > &, OwnPtr<Vector<RenderLayer*> >&, const RenderLayer* layerToForceAsStackingCont ainer = 0); | 828 void rebuildZOrderLists(OwnPtr<Vector<RenderLayer*> >&, OwnPtr<Vector<Render Layer*> >&, const RenderLayer* layerToForceAsStackingContainer = 0, ForceNeedsCo mpositedScrollingMode = DoNotForceCompositedScrolling); |
|
shawnsingh
2013/05/07 00:47:42
I would feel more comfortable with an identifier n
hartmanng
2013/05/13 19:27:06
Apparently this is against the style, unless it "a
| |
| 831 void clearZOrderLists(); | 829 void clearZOrderLists(); |
| 832 | 830 |
| 833 void updateNormalFlowList(); | 831 void updateNormalFlowList(); |
| 834 | 832 |
| 835 bool isStackingContext(const RenderStyle* style) const { return !style->hasA utoZIndex() || isRootLayer(); } | 833 bool isStackingContext(const RenderStyle* style) const { return !style->hasA utoZIndex() || isRootLayer(); } |
| 836 | 834 |
| 837 bool isDirtyStackingContainer() const { return m_zOrderListsDirty && isStack ingContainer(); } | 835 bool isDirtyStackingContainer() const { return m_zOrderListsDirty && isStack ingContainer(); } |
| 838 | 836 |
| 839 void setAncestorChainHasSelfPaintingLayerDescendant(); | 837 void setAncestorChainHasSelfPaintingLayerDescendant(); |
| 840 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); | 838 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 899 void setParent(RenderLayer* parent); | 897 void setParent(RenderLayer* parent); |
| 900 void setFirstChild(RenderLayer* first) { m_first = first; } | 898 void setFirstChild(RenderLayer* first) { m_first = first; } |
| 901 void setLastChild(RenderLayer* last) { m_last = last; } | 899 void setLastChild(RenderLayer* last) { m_last = last; } |
| 902 | 900 |
| 903 LayoutPoint renderBoxLocation() const { return renderer()->isBox() ? toRende rBox(renderer())->location() : LayoutPoint(); } | 901 LayoutPoint renderBoxLocation() const { return renderer()->isBox() ? toRende rBox(renderer())->location() : LayoutPoint(); } |
| 904 | 902 |
| 905 // layerToForceAsStackingContainer allows us to build pre-promotion and | 903 // layerToForceAsStackingContainer allows us to build pre-promotion and |
| 906 // post-promotion layer lists, by allowing us to treat a layer as if it is a | 904 // post-promotion layer lists, by allowing us to treat a layer as if it is a |
| 907 // stacking context, without adding a new member to RenderLayer or modifying | 905 // stacking context, without adding a new member to RenderLayer or modifying |
| 908 // the style (which could cause extra allocations). | 906 // the style (which could cause extra allocations). |
| 909 void collectLayers(bool includeHiddenLayers, CollectLayersBehavior, OwnPtr<V ector<RenderLayer*> >&, OwnPtr<Vector<RenderLayer*> >&, const RenderLayer* layer ToForceAsStackingContainer = 0); | 907 void collectLayers(bool includeHiddenLayers, OwnPtr<Vector<RenderLayer*> >&, OwnPtr<Vector<RenderLayer*> >&, const RenderLayer* layerToForceAsStackingContai ner = 0, ForceNeedsCompositedScrollingMode = DoNotForceCompositedScrolling); |
| 910 | 908 |
| 911 struct LayerPaintingInfo { | 909 struct LayerPaintingInfo { |
| 912 LayerPaintingInfo(RenderLayer* inRootLayer, const LayoutRect& inDirtyRec t, PaintBehavior inPaintBehavior, const LayoutSize& inSubPixelAccumulation, Rend erObject* inPaintingRoot = 0, RenderRegion*inRegion = 0, OverlapTestRequestMap* inOverlapTestRequests = 0) | 910 LayerPaintingInfo(RenderLayer* inRootLayer, const LayoutRect& inDirtyRec t, PaintBehavior inPaintBehavior, const LayoutSize& inSubPixelAccumulation, Rend erObject* inPaintingRoot = 0, RenderRegion*inRegion = 0, OverlapTestRequestMap* inOverlapTestRequests = 0) |
| 913 : rootLayer(inRootLayer) | 911 : rootLayer(inRootLayer) |
| 914 , paintingRoot(inPaintingRoot) | 912 , paintingRoot(inPaintingRoot) |
| 915 , paintDirtyRect(inDirtyRect) | 913 , paintDirtyRect(inDirtyRect) |
| 916 , subPixelAccumulation(inSubPixelAccumulation) | 914 , subPixelAccumulation(inSubPixelAccumulation) |
| 917 , region(inRegion) | 915 , region(inRegion) |
| 918 , overlapTestRequests(inOverlapTestRequests) | 916 , overlapTestRequests(inOverlapTestRequests) |
| 919 , paintBehavior(inPaintBehavior) | 917 , paintBehavior(inPaintBehavior) |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 982 const LayoutRect& hitTestRect, const HitTestLocation&, const HitTestingT ransformState* = 0, double* zOffset = 0); | 980 const LayoutRect& hitTestRect, const HitTestLocation&, const HitTestingT ransformState* = 0, double* zOffset = 0); |
| 983 | 981 |
| 984 bool listBackgroundIsKnownToBeOpaqueInRect(const Vector<RenderLayer*>*, cons t LayoutRect&) const; | 982 bool listBackgroundIsKnownToBeOpaqueInRect(const Vector<RenderLayer*>*, cons t LayoutRect&) const; |
| 985 | 983 |
| 986 void computeScrollDimensions(); | 984 void computeScrollDimensions(); |
| 987 bool hasHorizontalOverflow() const; | 985 bool hasHorizontalOverflow() const; |
| 988 bool hasVerticalOverflow() const; | 986 bool hasVerticalOverflow() const; |
| 989 bool hasScrollableHorizontalOverflow() const; | 987 bool hasScrollableHorizontalOverflow() const; |
| 990 bool hasScrollableVerticalOverflow() const; | 988 bool hasScrollableVerticalOverflow() const; |
| 991 | 989 |
| 992 bool shouldBeNormalFlowOnly() const; | 990 bool shouldBeNormalFlowOnly(ForceNeedsCompositedScrollingMode = DoNotForceCo mpositedScrolling) const; |
| 993 | 991 |
| 994 bool shouldBeSelfPaintingLayer() const; | 992 bool shouldBeSelfPaintingLayer() const; |
| 995 | 993 |
| 996 int scrollPosition(Scrollbar*) const; | 994 int scrollPosition(Scrollbar*) const; |
| 997 | 995 |
| 998 // ScrollableArea interface | 996 // ScrollableArea interface |
| 999 virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&); | 997 virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&); |
| 1000 virtual void invalidateScrollCornerRect(const IntRect&); | 998 virtual void invalidateScrollCornerRect(const IntRect&); |
| 1001 virtual bool isActive() const; | 999 virtual bool isActive() const; |
| 1002 virtual bool isScrollCornerVisible() const; | 1000 virtual bool isScrollCornerVisible() const; |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1324 | 1322 |
| 1325 } // namespace WebCore | 1323 } // namespace WebCore |
| 1326 | 1324 |
| 1327 #ifndef NDEBUG | 1325 #ifndef NDEBUG |
| 1328 // Outside the WebCore namespace for ease of invocation from gdb. | 1326 // Outside the WebCore namespace for ease of invocation from gdb. |
| 1329 void showLayerTree(const WebCore::RenderLayer*); | 1327 void showLayerTree(const WebCore::RenderLayer*); |
| 1330 void showLayerTree(const WebCore::RenderObject*); | 1328 void showLayerTree(const WebCore::RenderObject*); |
| 1331 #endif | 1329 #endif |
| 1332 | 1330 |
| 1333 #endif // RenderLayer_h | 1331 #endif // RenderLayer_h |
| OLD | NEW |