| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 virtual GraphicsLayer* layerForHorizontalScrollbar() const { return 0; } | 237 virtual GraphicsLayer* layerForHorizontalScrollbar() const { return 0; } |
| 238 virtual GraphicsLayer* layerForVerticalScrollbar() const { return 0; } | 238 virtual GraphicsLayer* layerForVerticalScrollbar() const { return 0; } |
| 239 virtual GraphicsLayer* layerForScrollCorner() const { return 0; } | 239 virtual GraphicsLayer* layerForScrollCorner() const { return 0; } |
| 240 bool hasLayerForHorizontalScrollbar() const; | 240 bool hasLayerForHorizontalScrollbar() const; |
| 241 bool hasLayerForVerticalScrollbar() const; | 241 bool hasLayerForVerticalScrollbar() const; |
| 242 bool hasLayerForScrollCorner() const; | 242 bool hasLayerForScrollCorner() const; |
| 243 | 243 |
| 244 void layerForScrollingDidChange(WebCompositorAnimationTimeline*); | 244 void layerForScrollingDidChange(WebCompositorAnimationTimeline*); |
| 245 | 245 |
| 246 void cancelScrollAnimation(); | 246 void cancelScrollAnimation(); |
| 247 void cancelProgrammaticScrollAnimation(); | 247 virtual void cancelProgrammaticScrollAnimation(); |
| 248 | 248 |
| 249 virtual ~ScrollableArea(); | 249 virtual ~ScrollableArea(); |
| 250 | 250 |
| 251 // Called when any of horizontal scrollbar, vertical scrollbar and scroll co
rner is setNeedsPaintInvalidation. | 251 // Called when any of horizontal scrollbar, vertical scrollbar and scroll co
rner is setNeedsPaintInvalidation. |
| 252 virtual void scrollControlWasSetNeedsPaintInvalidation() = 0; | 252 virtual void scrollControlWasSetNeedsPaintInvalidation() = 0; |
| 253 | 253 |
| 254 // Returns the default scroll style this area should scroll with when not | 254 // Returns the default scroll style this area should scroll with when not |
| 255 // explicitly specified. E.g. The scrolling behavior of an element can be | 255 // explicitly specified. E.g. The scrolling behavior of an element can be |
| 256 // specified in CSS. | 256 // specified in CSS. |
| 257 virtual ScrollBehavior scrollBehaviorStyle() const { return ScrollBehaviorIn
stant; } | 257 virtual ScrollBehavior scrollBehaviorStyle() const { return ScrollBehaviorIn
stant; } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 273 // Does nothing if overlay scrollbars are enabled. | 273 // Does nothing if overlay scrollbars are enabled. |
| 274 IntSize excludeScrollbars(const IntSize&) const; | 274 IntSize excludeScrollbars(const IntSize&) const; |
| 275 | 275 |
| 276 // Need to promptly let go of owned animator objects. | 276 // Need to promptly let go of owned animator objects. |
| 277 EAGERLY_FINALIZE(); | 277 EAGERLY_FINALIZE(); |
| 278 DECLARE_VIRTUAL_TRACE(); | 278 DECLARE_VIRTUAL_TRACE(); |
| 279 | 279 |
| 280 protected: | 280 protected: |
| 281 ScrollableArea(); | 281 ScrollableArea(); |
| 282 | 282 |
| 283 ScrollbarOrientation scrollbarOrientationFromDirection(ScrollDirectionPhysic
al) const; |
| 284 float scrollStep(ScrollGranularity, ScrollbarOrientation) const; |
| 285 |
| 283 void setScrollOrigin(const IntPoint&); | 286 void setScrollOrigin(const IntPoint&); |
| 284 void resetScrollOriginChanged() { m_scrollOriginChanged = false; } | 287 void resetScrollOriginChanged() { m_scrollOriginChanged = false; } |
| 285 | 288 |
| 286 // Needed to let the animators call scrollPositionChanged. | 289 // Needed to let the animators call scrollPositionChanged. |
| 287 friend class ScrollAnimatorBase; | 290 friend class ScrollAnimatorBase; |
| 288 friend class ProgrammaticScrollAnimator; | 291 friend class ProgrammaticScrollAnimator; |
| 289 void scrollPositionChanged(const DoublePoint&, ScrollType); | 292 void scrollPositionChanged(const DoublePoint&, ScrollType); |
| 290 | 293 |
| 291 void clearScrollAnimators(); | 294 void clearScrollAnimators(); |
| 292 | 295 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 // vertical-lr / ltr NO NO | 348 // vertical-lr / ltr NO NO |
| 346 // vertical-lr / rtl NO YES | 349 // vertical-lr / rtl NO YES |
| 347 // vertical-rl / ltr YES NO | 350 // vertical-rl / ltr YES NO |
| 348 // vertical-rl / rtl YES YES | 351 // vertical-rl / rtl YES YES |
| 349 IntPoint m_scrollOrigin; | 352 IntPoint m_scrollOrigin; |
| 350 }; | 353 }; |
| 351 | 354 |
| 352 } // namespace blink | 355 } // namespace blink |
| 353 | 356 |
| 354 #endif // ScrollableArea_h | 357 #endif // ScrollableArea_h |
| OLD | NEW |