| 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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 bool hasVerticalScrollbar() const { return verticalScrollbar(); } | 413 bool hasVerticalScrollbar() const { return verticalScrollbar(); } |
| 414 | 414 |
| 415 // ScrollableArea overrides | 415 // ScrollableArea overrides |
| 416 virtual Scrollbar* horizontalScrollbar() const { return m_hBar.get(); } | 416 virtual Scrollbar* horizontalScrollbar() const { return m_hBar.get(); } |
| 417 virtual Scrollbar* verticalScrollbar() const { return m_vBar.get(); } | 417 virtual Scrollbar* verticalScrollbar() const { return m_vBar.get(); } |
| 418 virtual ScrollableArea* enclosingScrollableArea() const; | 418 virtual ScrollableArea* enclosingScrollableArea() const; |
| 419 | 419 |
| 420 int verticalScrollbarWidth(OverlayScrollbarSizeRelevancy = IgnoreOverlayScro
llbarSize) const; | 420 int verticalScrollbarWidth(OverlayScrollbarSizeRelevancy = IgnoreOverlayScro
llbarSize) const; |
| 421 int horizontalScrollbarHeight(OverlayScrollbarSizeRelevancy = IgnoreOverlayS
crollbarSize) const; | 421 int horizontalScrollbarHeight(OverlayScrollbarSizeRelevancy = IgnoreOverlayS
crollbarSize) const; |
| 422 | 422 |
| 423 bool hasScrollParent() const { return m_compositingProperties.compositingRea
sons & CompositingReasonOverflowScrollingParent; } |
| 423 // isPointInResizeControl() is used for testing if a pointer/touch position
is in the resize control | 424 // isPointInResizeControl() is used for testing if a pointer/touch position
is in the resize control |
| 424 // area. | 425 // area. |
| 425 bool isPointInResizeControl(const IntPoint& absolutePoint, ResizerHitTestTyp
e resizerHitTestType) const; | 426 bool isPointInResizeControl(const IntPoint& absolutePoint, ResizerHitTestTyp
e resizerHitTestType) const; |
| 426 bool hitTestOverflowControls(HitTestResult&, const IntPoint& localPoint); | 427 bool hitTestOverflowControls(HitTestResult&, const IntPoint& localPoint); |
| 427 IntSize offsetFromResizeCorner(const IntPoint& absolutePoint) const; | 428 IntSize offsetFromResizeCorner(const IntPoint& absolutePoint) const; |
| 428 | 429 |
| 429 void paintOverflowControls(GraphicsContext*, const IntPoint&, const IntRect&
damageRect, bool paintingOverlayControls = false); | 430 void paintOverflowControls(GraphicsContext*, const IntPoint&, const IntRect&
damageRect, bool paintingOverlayControls = false); |
| 430 void paintScrollCorner(GraphicsContext*, const IntPoint&, const IntRect& dam
ageRect); | 431 void paintScrollCorner(GraphicsContext*, const IntPoint&, const IntRect& dam
ageRect); |
| 431 void paintResizer(GraphicsContext*, const IntPoint&, const IntRect& damageRe
ct); | 432 void paintResizer(GraphicsContext*, const IntPoint&, const IntRect& damageRe
ct); |
| 432 | 433 |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 // paints the layers that intersect the damage rect from back to | 614 // paints the layers that intersect the damage rect from back to |
| 614 // front. The hitTest method looks for mouse events by walking | 615 // front. The hitTest method looks for mouse events by walking |
| 615 // layers that intersect the point from front to back. | 616 // layers that intersect the point from front to back. |
| 616 void paint(GraphicsContext*, const LayoutRect& damageRect, PaintBehavior = P
aintBehaviorNormal, RenderObject* paintingRoot = 0, | 617 void paint(GraphicsContext*, const LayoutRect& damageRect, PaintBehavior = P
aintBehaviorNormal, RenderObject* paintingRoot = 0, |
| 617 RenderRegion* = 0, PaintLayerFlags = 0); | 618 RenderRegion* = 0, PaintLayerFlags = 0); |
| 618 bool hitTest(const HitTestRequest&, HitTestResult&); | 619 bool hitTest(const HitTestRequest&, HitTestResult&); |
| 619 bool hitTest(const HitTestRequest&, const HitTestLocation&, HitTestResult&); | 620 bool hitTest(const HitTestRequest&, const HitTestLocation&, HitTestResult&); |
| 620 void paintOverlayScrollbars(GraphicsContext*, const LayoutRect& damageRect,
PaintBehavior, RenderObject* paintingRoot = 0); | 621 void paintOverlayScrollbars(GraphicsContext*, const LayoutRect& damageRect,
PaintBehavior, RenderObject* paintingRoot = 0); |
| 621 | 622 |
| 622 struct ClipRectsContext { | 623 struct ClipRectsContext { |
| 623 ClipRectsContext(const RenderLayer* inRootLayer, RenderRegion* inRegion,
ClipRectsType inClipRectsType, OverlayScrollbarSizeRelevancy inOverlayScrollbar
SizeRelevancy = IgnoreOverlayScrollbarSize, ShouldRespectOverflowClip inRespectO
verflowClip = RespectOverflowClip) | 624 ClipRectsContext(const RenderLayer* inRootLayer, RenderRegion* inRegion,
ClipRectsType inClipRectsType, OverlayScrollbarSizeRelevancy inOverlayScrollbar
SizeRelevancy = IgnoreOverlayScrollbarSize, ShouldRespectOverflowClip inRespectO
verflowClip = RespectOverflowClip, const RenderLayer* scrollParent = 0) |
| 624 : rootLayer(inRootLayer) | 625 : rootLayer(inRootLayer) |
| 625 , region(inRegion) | 626 , region(inRegion) |
| 626 , clipRectsType(inClipRectsType) | 627 , clipRectsType(inClipRectsType) |
| 627 , overlayScrollbarSizeRelevancy(inOverlayScrollbarSizeRelevancy) | 628 , overlayScrollbarSizeRelevancy(inOverlayScrollbarSizeRelevancy) |
| 628 , respectOverflowClip(inRespectOverflowClip) | 629 , respectOverflowClip(inRespectOverflowClip) |
| 630 , scrollParent(scrollParent) |
| 629 { } | 631 { } |
| 630 const RenderLayer* rootLayer; | 632 const RenderLayer* rootLayer; |
| 631 RenderRegion* region; | 633 RenderRegion* region; |
| 632 ClipRectsType clipRectsType; | 634 ClipRectsType clipRectsType; |
| 633 OverlayScrollbarSizeRelevancy overlayScrollbarSizeRelevancy; | 635 OverlayScrollbarSizeRelevancy overlayScrollbarSizeRelevancy; |
| 634 ShouldRespectOverflowClip respectOverflowClip; | 636 ShouldRespectOverflowClip respectOverflowClip; |
| 637 const RenderLayer* scrollParent; |
| 635 }; | 638 }; |
| 636 | 639 |
| 637 // This method figures out our layerBounds in coordinates relative to | 640 // This method figures out our layerBounds in coordinates relative to |
| 638 // |rootLayer}. It also computes our background and foreground clip rects | 641 // |rootLayer}. It also computes our background and foreground clip rects |
| 639 // for painting/event handling. | 642 // for painting/event handling. |
| 640 // Pass offsetFromRoot if known. | 643 // Pass offsetFromRoot if known. |
| 641 void calculateRects(const ClipRectsContext&, const LayoutRect& paintDirtyRec
t, LayoutRect& layerBounds, | 644 void calculateRects(const ClipRectsContext&, const LayoutRect& paintDirtyRec
t, LayoutRect& layerBounds, |
| 642 ClipRect& backgroundRect, ClipRect& foregroundRect, ClipRect& outlineRec
t, const LayoutPoint* offsetFromRoot = 0) const; | 645 ClipRect& backgroundRect, ClipRect& foregroundRect, ClipRect& outlineRec
t, const LayoutPoint* offsetFromRoot = 0) const; |
| 643 | 646 |
| 644 // Compute and cache clip rects computed with the given layer as the root | 647 // Compute and cache clip rects computed with the given layer as the root |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 NotCompositedForNonViewContainer, | 803 NotCompositedForNonViewContainer, |
| 801 NotCompositedForNoVisibleContent, | 804 NotCompositedForNoVisibleContent, |
| 802 NotCompositedForUnscrollableAncestors, | 805 NotCompositedForUnscrollableAncestors, |
| 803 }; | 806 }; |
| 804 | 807 |
| 805 void setViewportConstrainedNotCompositedReason(ViewportConstrainedNotComposi
tedReason reason) { m_compositingProperties.viewportConstrainedNotCompositedReas
on = reason; } | 808 void setViewportConstrainedNotCompositedReason(ViewportConstrainedNotComposi
tedReason reason) { m_compositingProperties.viewportConstrainedNotCompositedReas
on = reason; } |
| 806 ViewportConstrainedNotCompositedReason viewportConstrainedNotCompositedReaso
n() const { return static_cast<ViewportConstrainedNotCompositedReason>(m_composi
tingProperties.viewportConstrainedNotCompositedReason); } | 809 ViewportConstrainedNotCompositedReason viewportConstrainedNotCompositedReaso
n() const { return static_cast<ViewportConstrainedNotCompositedReason>(m_composi
tingProperties.viewportConstrainedNotCompositedReason); } |
| 807 | 810 |
| 808 bool isOutOfFlowRenderFlowThread() const { return renderer()->isOutOfFlowRen
derFlowThread(); } | 811 bool isOutOfFlowRenderFlowThread() const { return renderer()->isOutOfFlowRen
derFlowThread(); } |
| 809 | 812 |
| 813 GraphicsLayer* layerForScrollChild() const; |
| 810 enum PaintOrderListType {BeforePromote, AfterPromote}; | 814 enum PaintOrderListType {BeforePromote, AfterPromote}; |
| 811 void computePaintOrderList(PaintOrderListType type, Vector<RefPtr<Node> >&); | 815 void computePaintOrderList(PaintOrderListType type, Vector<RefPtr<Node> >&); |
| 812 | 816 |
| 813 enum ForceNeedsCompositedScrollingMode { | 817 enum ForceNeedsCompositedScrollingMode { |
| 814 DoNotForceCompositedScrolling = 0, | 818 DoNotForceCompositedScrolling = 0, |
| 815 CompositedScrollingAlwaysOn = 1, | 819 CompositedScrollingAlwaysOn = 1, |
| 816 CompositedScrollingAlwaysOff = 2 | 820 CompositedScrollingAlwaysOff = 2 |
| 817 }; | 821 }; |
| 818 | 822 |
| 819 void setForceNeedsCompositedScrolling(ForceNeedsCompositedScrollingMode); | 823 void setForceNeedsCompositedScrolling(ForceNeedsCompositedScrollingMode); |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1322 | 1326 |
| 1323 } // namespace WebCore | 1327 } // namespace WebCore |
| 1324 | 1328 |
| 1325 #ifndef NDEBUG | 1329 #ifndef NDEBUG |
| 1326 // Outside the WebCore namespace for ease of invocation from gdb. | 1330 // Outside the WebCore namespace for ease of invocation from gdb. |
| 1327 void showLayerTree(const WebCore::RenderLayer*); | 1331 void showLayerTree(const WebCore::RenderLayer*); |
| 1328 void showLayerTree(const WebCore::RenderObject*); | 1332 void showLayerTree(const WebCore::RenderObject*); |
| 1329 #endif | 1333 #endif |
| 1330 | 1334 |
| 1331 #endif // RenderLayer_h | 1335 #endif // RenderLayer_h |
| OLD | NEW |