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 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 PaintLayerTemporaryClipRects = 1 << 2, | 600 PaintLayerTemporaryClipRects = 1 << 2, |
601 PaintLayerPaintingReflection = 1 << 3, | 601 PaintLayerPaintingReflection = 1 << 3, |
602 PaintLayerPaintingOverlayScrollbars = 1 << 4, | 602 PaintLayerPaintingOverlayScrollbars = 1 << 4, |
603 PaintLayerPaintingCompositingBackgroundPhase = 1 << 5, | 603 PaintLayerPaintingCompositingBackgroundPhase = 1 << 5, |
604 PaintLayerPaintingCompositingForegroundPhase = 1 << 6, | 604 PaintLayerPaintingCompositingForegroundPhase = 1 << 6, |
605 PaintLayerPaintingCompositingMaskPhase = 1 << 7, | 605 PaintLayerPaintingCompositingMaskPhase = 1 << 7, |
606 PaintLayerPaintingCompositingScrollingPhase = 1 << 8, | 606 PaintLayerPaintingCompositingScrollingPhase = 1 << 8, |
607 PaintLayerPaintingOverflowContents = 1 << 9, | 607 PaintLayerPaintingOverflowContents = 1 << 9, |
608 PaintLayerPaintingRootBackgroundOnly = 1 << 10, | 608 PaintLayerPaintingRootBackgroundOnly = 1 << 10, |
609 PaintLayerPaintingSkipRootBackground = 1 << 11, | 609 PaintLayerPaintingSkipRootBackground = 1 << 11, |
| 610 PaintLayerPaintingCompositingBorderRadiusMaskPhase = 1 << 12, |
610 PaintLayerPaintingCompositingAllPhases = (PaintLayerPaintingCompositingB
ackgroundPhase | PaintLayerPaintingCompositingForegroundPhase | PaintLayerPainti
ngCompositingMaskPhase) | 611 PaintLayerPaintingCompositingAllPhases = (PaintLayerPaintingCompositingB
ackgroundPhase | PaintLayerPaintingCompositingForegroundPhase | PaintLayerPainti
ngCompositingMaskPhase) |
611 }; | 612 }; |
612 | 613 |
613 typedef unsigned PaintLayerFlags; | 614 typedef unsigned PaintLayerFlags; |
614 | 615 |
615 // The two main functions that use the layer system. The paint method | 616 // The two main functions that use the layer system. The paint method |
616 // paints the layers that intersect the damage rect from back to | 617 // paints the layers that intersect the damage rect from back to |
617 // front. The hitTest method looks for mouse events by walking | 618 // front. The hitTest method looks for mouse events by walking |
618 // layers that intersect the point from front to back. | 619 // layers that intersect the point from front to back. |
619 void paint(GraphicsContext*, const LayoutRect& damageRect, PaintBehavior = P
aintBehaviorNormal, RenderObject* paintingRoot = 0, | 620 void paint(GraphicsContext*, const LayoutRect& damageRect, PaintBehavior = P
aintBehaviorNormal, RenderObject* paintingRoot = 0, |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 | 732 |
732 // Overloaded new operator. Derived classes must override operator new | 733 // Overloaded new operator. Derived classes must override operator new |
733 // in order to allocate out of the RenderArena. | 734 // in order to allocate out of the RenderArena. |
734 void* operator new(size_t, RenderArena*); | 735 void* operator new(size_t, RenderArena*); |
735 | 736 |
736 // Overridden to prevent the normal delete from being called. | 737 // Overridden to prevent the normal delete from being called. |
737 void operator delete(void*, size_t); | 738 void operator delete(void*, size_t); |
738 | 739 |
739 bool isComposited() const { return m_backing != 0; } | 740 bool isComposited() const { return m_backing != 0; } |
740 bool hasCompositedMask() const; | 741 bool hasCompositedMask() const; |
| 742 bool hasCompositedBorderRadiusMask() const; |
741 RenderLayerBacking* backing() const { return m_backing.get(); } | 743 RenderLayerBacking* backing() const { return m_backing.get(); } |
742 RenderLayerBacking* ensureBacking(); | 744 RenderLayerBacking* ensureBacking(); |
743 void clearBacking(bool layerBeingDestroyed = false); | 745 void clearBacking(bool layerBeingDestroyed = false); |
744 virtual GraphicsLayer* layerForScrolling() const; | 746 virtual GraphicsLayer* layerForScrolling() const; |
745 virtual GraphicsLayer* layerForHorizontalScrollbar() const; | 747 virtual GraphicsLayer* layerForHorizontalScrollbar() const; |
746 virtual GraphicsLayer* layerForVerticalScrollbar() const; | 748 virtual GraphicsLayer* layerForVerticalScrollbar() const; |
747 virtual GraphicsLayer* layerForScrollCorner() const; | 749 virtual GraphicsLayer* layerForScrollCorner() const; |
748 virtual bool usesCompositedScrolling() const OVERRIDE; | 750 virtual bool usesCompositedScrolling() const OVERRIDE; |
749 bool needsCompositedScrolling() const; | 751 bool needsCompositedScrolling() const; |
750 bool needsCompositingLayersRebuiltForClip(const RenderStyle* oldStyle, const
RenderStyle* newStyle) const; | 752 bool needsCompositingLayersRebuiltForClip(const RenderStyle* oldStyle, const
RenderStyle* newStyle) const; |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
956 ShouldRespectOverflowClip = RespectOverflowClip, const LayoutPoint* offs
etFromRoot = 0, const LayoutRect* layerBoundingBox = 0); | 958 ShouldRespectOverflowClip = RespectOverflowClip, const LayoutPoint* offs
etFromRoot = 0, const LayoutRect* layerBoundingBox = 0); |
957 void updatePaintingInfoForFragments(LayerFragments&, const LayerPaintingInfo
&, PaintLayerFlags, bool shouldPaintContent, const LayoutPoint* offsetFromRoot); | 959 void updatePaintingInfoForFragments(LayerFragments&, const LayerPaintingInfo
&, PaintLayerFlags, bool shouldPaintContent, const LayoutPoint* offsetFromRoot); |
958 void paintBackgroundForFragments(const LayerFragments&, GraphicsContext*, Gr
aphicsContext* transparencyLayerContext, | 960 void paintBackgroundForFragments(const LayerFragments&, GraphicsContext*, Gr
aphicsContext* transparencyLayerContext, |
959 const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, con
st LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer); | 961 const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, con
st LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer); |
960 void paintForegroundForFragments(const LayerFragments&, GraphicsContext*, Gr
aphicsContext* transparencyLayerContext, | 962 void paintForegroundForFragments(const LayerFragments&, GraphicsContext*, Gr
aphicsContext* transparencyLayerContext, |
961 const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, con
st LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer, | 963 const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, con
st LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer, |
962 bool selectionOnly, bool forceBlackText); | 964 bool selectionOnly, bool forceBlackText); |
963 void paintForegroundForFragmentsWithPhase(PaintPhase, const LayerFragments&,
GraphicsContext*, const LayerPaintingInfo&, PaintBehavior, RenderObject* painti
ngRootForRenderer); | 965 void paintForegroundForFragmentsWithPhase(PaintPhase, const LayerFragments&,
GraphicsContext*, const LayerPaintingInfo&, PaintBehavior, RenderObject* painti
ngRootForRenderer); |
964 void paintOutlineForFragments(const LayerFragments&, GraphicsContext*, const
LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer); | 966 void paintOutlineForFragments(const LayerFragments&, GraphicsContext*, const
LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer); |
965 void paintOverflowControlsForFragments(const LayerFragments&, GraphicsContex
t*, const LayerPaintingInfo&); | 967 void paintOverflowControlsForFragments(const LayerFragments&, GraphicsContex
t*, const LayerPaintingInfo&); |
966 void paintMaskForFragments(const LayerFragments&, GraphicsContext*, const La
yerPaintingInfo&, RenderObject* paintingRootForRenderer); | 968 void paintMaskForFragments(const LayerFragments&, GraphicsContext*, const La
yerPaintingInfo&, RenderObject* paintingRootForRenderer, PaintPhase = PaintPhase
Mask); |
967 void paintTransformedLayerIntoFragments(GraphicsContext*, const LayerPaintin
gInfo&, PaintLayerFlags); | 969 void paintTransformedLayerIntoFragments(GraphicsContext*, const LayerPaintin
gInfo&, PaintLayerFlags); |
968 | 970 |
969 RenderLayer* hitTestLayer(RenderLayer* rootLayer, RenderLayer* containerLaye
r, const HitTestRequest& request, HitTestResult& result, | 971 RenderLayer* hitTestLayer(RenderLayer* rootLayer, RenderLayer* containerLaye
r, const HitTestRequest& request, HitTestResult& result, |
970 const LayoutRect& hitTestRect, const HitTestLocati
on&, bool appliedTransform, | 972 const LayoutRect& hitTestRect, const HitTestLocati
on&, bool appliedTransform, |
971 const HitTestingTransformState* transformState = 0
, double* zOffset = 0); | 973 const HitTestingTransformState* transformState = 0
, double* zOffset = 0); |
972 RenderLayer* hitTestLayerByApplyingTransform(RenderLayer* rootLayer, RenderL
ayer* containerLayer, const HitTestRequest&, HitTestResult&, | 974 RenderLayer* hitTestLayerByApplyingTransform(RenderLayer* rootLayer, RenderL
ayer* containerLayer, const HitTestRequest&, HitTestResult&, |
973 const LayoutRect& hitTestRect, const HitTestLocation&, const HitTestingT
ransformState* = 0, double* zOffset = 0, | 975 const LayoutRect& hitTestRect, const HitTestLocation&, const HitTestingT
ransformState* = 0, double* zOffset = 0, |
974 const LayoutPoint& translationOffset = LayoutPoint()); | 976 const LayoutPoint& translationOffset = LayoutPoint()); |
975 RenderLayer* hitTestList(Vector<RenderLayer*>*, RenderLayer* rootLayer, cons
t HitTestRequest& request, HitTestResult& result, | 977 RenderLayer* hitTestList(Vector<RenderLayer*>*, RenderLayer* rootLayer, cons
t HitTestRequest& request, HitTestResult& result, |
976 const LayoutRect& hitTestRect, const HitTestLocatio
n&, | 978 const LayoutRect& hitTestRect, const HitTestLocatio
n&, |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1324 | 1326 |
1325 } // namespace WebCore | 1327 } // namespace WebCore |
1326 | 1328 |
1327 #ifndef NDEBUG | 1329 #ifndef NDEBUG |
1328 // Outside the WebCore namespace for ease of invocation from gdb. | 1330 // Outside the WebCore namespace for ease of invocation from gdb. |
1329 void showLayerTree(const WebCore::RenderLayer*); | 1331 void showLayerTree(const WebCore::RenderLayer*); |
1330 void showLayerTree(const WebCore::RenderObject*); | 1332 void showLayerTree(const WebCore::RenderObject*); |
1331 #endif | 1333 #endif |
1332 | 1334 |
1333 #endif // RenderLayer_h | 1335 #endif // RenderLayer_h |
OLD | NEW |