| 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 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 void scrollToYOffset(int y, ScrollOffsetClamping clamp = ScrollOffsetUnclamp
ed) { scrollToOffset(IntSize(scrollXOffset(), y), clamp); } | 449 void scrollToYOffset(int y, ScrollOffsetClamping clamp = ScrollOffsetUnclamp
ed) { scrollToOffset(IntSize(scrollXOffset(), y), clamp); } |
| 450 | 450 |
| 451 int scrollXOffset() const { return m_scrollOffset.width() + scrollOrigin().x
(); } | 451 int scrollXOffset() const { return m_scrollOffset.width() + scrollOrigin().x
(); } |
| 452 int scrollYOffset() const { return m_scrollOffset.height() + scrollOrigin().
y(); } | 452 int scrollYOffset() const { return m_scrollOffset.height() + scrollOrigin().
y(); } |
| 453 IntSize adjustedScrollOffset() const { return IntSize(scrollXOffset(), scrol
lYOffset()); } | 453 IntSize adjustedScrollOffset() const { return IntSize(scrollXOffset(), scrol
lYOffset()); } |
| 454 | 454 |
| 455 void scrollRectToVisible(const LayoutRect&, const ScrollAlignment& alignX, c
onst ScrollAlignment& alignY); | 455 void scrollRectToVisible(const LayoutRect&, const ScrollAlignment& alignX, c
onst ScrollAlignment& alignY); |
| 456 | 456 |
| 457 LayoutRect getRectToExpose(const LayoutRect& visibleRect, const LayoutRect&
exposeRect, const ScrollAlignment& alignX, const ScrollAlignment& alignY); | 457 LayoutRect getRectToExpose(const LayoutRect& visibleRect, const LayoutRect&
exposeRect, const ScrollAlignment& alignX, const ScrollAlignment& alignY); |
| 458 | 458 |
| 459 bool scrollsOverflow() const; | |
| 460 bool hasScrollbars() const { return m_hBar || m_vBar; } | |
| 461 void setHasHorizontalScrollbar(bool); | |
| 462 void setHasVerticalScrollbar(bool); | |
| 463 | |
| 464 PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation); | |
| 465 void destroyScrollbar(ScrollbarOrientation); | |
| 466 | |
| 467 bool hasHorizontalScrollbar() const { return horizontalScrollbar(); } | 459 bool hasHorizontalScrollbar() const { return horizontalScrollbar(); } |
| 468 bool hasVerticalScrollbar() const { return verticalScrollbar(); } | 460 bool hasVerticalScrollbar() const { return verticalScrollbar(); } |
| 469 | 461 |
| 470 // ScrollableArea overrides | 462 // ScrollableArea overrides |
| 471 virtual Scrollbar* horizontalScrollbar() const { return m_hBar.get(); } | 463 virtual Scrollbar* horizontalScrollbar() const { return m_hBar.get(); } |
| 472 virtual Scrollbar* verticalScrollbar() const { return m_vBar.get(); } | 464 virtual Scrollbar* verticalScrollbar() const { return m_vBar.get(); } |
| 473 virtual ScrollableArea* enclosingScrollableArea() const; | 465 virtual ScrollableArea* enclosingScrollableArea() const; |
| 474 | 466 |
| 475 int verticalScrollbarWidth(OverlayScrollbarSizeRelevancy = IgnoreOverlayScro
llbarSize) const; | 467 int verticalScrollbarWidth(OverlayScrollbarSizeRelevancy = IgnoreOverlayScro
llbarSize) const; |
| 476 int horizontalScrollbarHeight(OverlayScrollbarSizeRelevancy = IgnoreOverlayS
crollbarSize) const; | 468 int horizontalScrollbarHeight(OverlayScrollbarSizeRelevancy = IgnoreOverlayS
crollbarSize) const; |
| 477 | 469 |
| 478 bool hasOverflowControls() const; | |
| 479 // isPointInResizeControl() is used for testing if a pointer/touch position
is in the resize control | 470 // isPointInResizeControl() is used for testing if a pointer/touch position
is in the resize control |
| 480 // area. | 471 // area. |
| 481 bool isPointInResizeControl(const IntPoint& absolutePoint, ResizerHitTestTyp
e resizerHitTestType) const; | 472 bool isPointInResizeControl(const IntPoint& absolutePoint, ResizerHitTestTyp
e resizerHitTestType) const; |
| 482 bool hitTestOverflowControls(HitTestResult&, const IntPoint& localPoint); | 473 bool hitTestOverflowControls(HitTestResult&, const IntPoint& localPoint); |
| 483 IntSize offsetFromResizeCorner(const IntPoint& absolutePoint) const; | 474 IntSize offsetFromResizeCorner(const IntPoint& absolutePoint) const; |
| 484 | 475 |
| 485 void paintOverflowControls(GraphicsContext*, const IntPoint&, const IntRect&
damageRect, bool paintingOverlayControls = false); | 476 void paintOverflowControls(GraphicsContext*, const IntPoint&, const IntRect&
damageRect, bool paintingOverlayControls = false); |
| 486 void paintScrollCorner(GraphicsContext*, const IntPoint&, const IntRect& dam
ageRect); | 477 void paintScrollCorner(GraphicsContext*, const IntPoint&, const IntRect& dam
ageRect); |
| 487 void paintResizer(GraphicsContext*, const IntPoint&, const IntRect& damageRe
ct); | 478 void paintResizer(GraphicsContext*, const IntPoint&, const IntRect& damageRe
ct); |
| 488 | 479 |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 874 | 865 |
| 875 void setForceNeedsCompositedScrolling(ForceNeedsCompositedScrollingMode); | 866 void setForceNeedsCompositedScrolling(ForceNeedsCompositedScrollingMode); |
| 876 | 867 |
| 877 private: | 868 private: |
| 878 enum CollectLayersBehavior { | 869 enum CollectLayersBehavior { |
| 879 ForceLayerToStackingContainer, | 870 ForceLayerToStackingContainer, |
| 880 OverflowScrollCanBeStackingContainers, | 871 OverflowScrollCanBeStackingContainers, |
| 881 OnlyStackingContextsCanBeStackingContainers | 872 OnlyStackingContextsCanBeStackingContainers |
| 882 }; | 873 }; |
| 883 | 874 |
| 875 void setHasHorizontalScrollbar(bool); |
| 876 void setHasVerticalScrollbar(bool); |
| 877 |
| 878 PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation); |
| 879 void destroyScrollbar(ScrollbarOrientation); |
| 880 |
| 881 bool hasOverflowControls() const; |
| 882 |
| 884 void updateZOrderLists(); | 883 void updateZOrderLists(); |
| 885 void rebuildZOrderLists(); | 884 void rebuildZOrderLists(); |
| 886 // See the comment for collectLayers for information about the layerToForceA
sStackingContainer parameter. | 885 // See the comment for collectLayers for information about the layerToForceA
sStackingContainer parameter. |
| 887 void rebuildZOrderLists(OwnPtr<Vector<RenderLayer*> >&, OwnPtr<Vector<Render
Layer*> >&, const RenderLayer* layerToForceAsStackingContainer = 0, CollectLayer
sBehavior = OverflowScrollCanBeStackingContainers); | 886 void rebuildZOrderLists(OwnPtr<Vector<RenderLayer*> >&, OwnPtr<Vector<Render
Layer*> >&, const RenderLayer* layerToForceAsStackingContainer = 0, CollectLayer
sBehavior = OverflowScrollCanBeStackingContainers); |
| 888 void clearZOrderLists(); | 887 void clearZOrderLists(); |
| 889 | 888 |
| 890 void updateNormalFlowList(); | 889 void updateNormalFlowList(); |
| 891 | 890 |
| 892 bool isStackingContext(const RenderStyle* style) const { return !style->hasA
utoZIndex() || isRootLayer(); } | 891 bool isStackingContext(const RenderStyle* style) const { return !style->hasA
utoZIndex() || isRootLayer(); } |
| 893 | 892 |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1073 virtual IntPoint maximumScrollPosition() const; | 1072 virtual IntPoint maximumScrollPosition() const; |
| 1074 virtual IntRect visibleContentRect(VisibleContentRectIncludesScrollbars) con
st; | 1073 virtual IntRect visibleContentRect(VisibleContentRectIncludesScrollbars) con
st; |
| 1075 virtual int visibleHeight() const; | 1074 virtual int visibleHeight() const; |
| 1076 virtual int visibleWidth() const; | 1075 virtual int visibleWidth() const; |
| 1077 virtual IntSize contentsSize() const; | 1076 virtual IntSize contentsSize() const; |
| 1078 virtual IntSize overhangAmount() const; | 1077 virtual IntSize overhangAmount() const; |
| 1079 virtual IntPoint lastKnownMousePosition() const; | 1078 virtual IntPoint lastKnownMousePosition() const; |
| 1080 virtual bool shouldSuspendScrollAnimations() const; | 1079 virtual bool shouldSuspendScrollAnimations() const; |
| 1081 virtual bool scrollbarsCanBeActive() const; | 1080 virtual bool scrollbarsCanBeActive() const; |
| 1082 virtual IntRect scrollableAreaBoundingBox() const OVERRIDE; | 1081 virtual IntRect scrollableAreaBoundingBox() const OVERRIDE; |
| 1082 virtual bool isHorizontallyScrollable() const OVERRIDE; |
| 1083 virtual bool isVerticallyScrollable() const OVERRIDE; |
| 1083 | 1084 |
| 1084 // Rectangle encompassing the scroll corner and resizer rect. | 1085 // Rectangle encompassing the scroll corner and resizer rect. |
| 1085 IntRect scrollCornerAndResizerRect() const; | 1086 IntRect scrollCornerAndResizerRect() const; |
| 1086 | 1087 |
| 1087 void updateCompositingLayersAfterScroll(); | 1088 void updateCompositingLayersAfterScroll(); |
| 1088 | 1089 |
| 1089 IntSize scrollbarOffset(const Scrollbar*) const; | 1090 IntSize scrollbarOffset(const Scrollbar*) const; |
| 1090 | 1091 |
| 1091 void updateResizerAreaSet(); | 1092 void updateResizerAreaSet(); |
| 1092 void updateScrollableAreaSet(bool hasOverflow); | 1093 void updateScrollableAreaSet(bool hasOverflow); |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1370 | 1371 |
| 1371 } // namespace WebCore | 1372 } // namespace WebCore |
| 1372 | 1373 |
| 1373 #ifndef NDEBUG | 1374 #ifndef NDEBUG |
| 1374 // Outside the WebCore namespace for ease of invocation from gdb. | 1375 // Outside the WebCore namespace for ease of invocation from gdb. |
| 1375 void showLayerTree(const WebCore::RenderLayer*); | 1376 void showLayerTree(const WebCore::RenderLayer*); |
| 1376 void showLayerTree(const WebCore::RenderObject*); | 1377 void showLayerTree(const WebCore::RenderObject*); |
| 1377 #endif | 1378 #endif |
| 1378 | 1379 |
| 1379 #endif // RenderLayer_h | 1380 #endif // RenderLayer_h |
| OLD | NEW |