| 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 virtual bool ScrollAnimatorEnabled() const { return false; } | 254 virtual bool ScrollAnimatorEnabled() const { return false; } |
| 255 | 255 |
| 256 // NOTE: Only called from Internals for testing. | 256 // NOTE: Only called from Internals for testing. |
| 257 void UpdateScrollOffsetFromInternals(const IntSize&); | 257 void UpdateScrollOffsetFromInternals(const IntSize&); |
| 258 | 258 |
| 259 IntSize ClampScrollOffset(const IntSize&) const; | 259 IntSize ClampScrollOffset(const IntSize&) const; |
| 260 ScrollOffset ClampScrollOffset(const ScrollOffset&) const; | 260 ScrollOffset ClampScrollOffset(const ScrollOffset&) const; |
| 261 | 261 |
| 262 // Let subclasses provide a way of asking for and servicing scroll | 262 // Let subclasses provide a way of asking for and servicing scroll |
| 263 // animations. | 263 // animations. |
| 264 virtual bool ScheduleAnimation(); | 264 virtual bool ScheduleAnimation() { return false; } |
| 265 virtual void ServiceScrollAnimations(double monotonic_time); | 265 virtual void ServiceScrollAnimations(double monotonic_time); |
| 266 virtual void UpdateCompositorScrollAnimations(); | 266 virtual void UpdateCompositorScrollAnimations(); |
| 267 virtual void RegisterForAnimation() {} | 267 virtual void RegisterForAnimation() {} |
| 268 virtual void DeregisterForAnimation() {} | 268 virtual void DeregisterForAnimation() {} |
| 269 | 269 |
| 270 virtual bool UsesCompositedScrolling() const { return false; } | 270 virtual bool UsesCompositedScrolling() const { return false; } |
| 271 virtual bool ShouldScrollOnMainThread() const; | 271 virtual bool ShouldScrollOnMainThread() const; |
| 272 | 272 |
| 273 // Overlay scrollbars can "fade-out" when inactive. | 273 // Overlay scrollbars can "fade-out" when inactive. |
| 274 virtual bool ScrollbarsHidden() const; | 274 virtual bool ScrollbarsHidden() const; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 | 334 |
| 335 // Subtracts space occupied by this ScrollableArea's scrollbars. | 335 // Subtracts space occupied by this ScrollableArea's scrollbars. |
| 336 // Does nothing if overlay scrollbars are enabled. | 336 // Does nothing if overlay scrollbars are enabled. |
| 337 IntSize ExcludeScrollbars(const IntSize&) const; | 337 IntSize ExcludeScrollbars(const IntSize&) const; |
| 338 | 338 |
| 339 virtual int VerticalScrollbarWidth( | 339 virtual int VerticalScrollbarWidth( |
| 340 OverlayScrollbarClipBehavior = kIgnorePlatformOverlayScrollbarSize) const; | 340 OverlayScrollbarClipBehavior = kIgnorePlatformOverlayScrollbarSize) const; |
| 341 virtual int HorizontalScrollbarHeight( | 341 virtual int HorizontalScrollbarHeight( |
| 342 OverlayScrollbarClipBehavior = kIgnorePlatformOverlayScrollbarSize) const; | 342 OverlayScrollbarClipBehavior = kIgnorePlatformOverlayScrollbarSize) const; |
| 343 | 343 |
| 344 // Returns the widget associated with this ScrollableArea. | |
| 345 virtual FrameViewBase* GetFrameViewBase() { return nullptr; } | |
| 346 | |
| 347 virtual LayoutBox* GetLayoutBox() const { return nullptr; } | 344 virtual LayoutBox* GetLayoutBox() const { return nullptr; } |
| 348 | 345 |
| 349 // Maps a quad from the coordinate system of a LayoutObject contained by the | 346 // Maps a quad from the coordinate system of a LayoutObject contained by the |
| 350 // ScrollableArea to the coordinate system of the ScrollableArea's visible | 347 // ScrollableArea to the coordinate system of the ScrollableArea's visible |
| 351 // content rect. If the LayoutObject* argument is null, the argument quad is | 348 // content rect. If the LayoutObject* argument is null, the argument quad is |
| 352 // considered to be in the coordinate space of the overflow rect. | 349 // considered to be in the coordinate space of the overflow rect. |
| 353 virtual FloatQuad LocalToVisibleContentQuad(const FloatQuad&, | 350 virtual FloatQuad LocalToVisibleContentQuad(const FloatQuad&, |
| 354 const LayoutObject*, | 351 const LayoutObject*, |
| 355 unsigned = 0) const; | 352 unsigned = 0) const; |
| 356 | 353 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 // vertical-lr / ltr NO NO | 459 // vertical-lr / ltr NO NO |
| 463 // vertical-lr / rtl NO YES | 460 // vertical-lr / rtl NO YES |
| 464 // vertical-rl / ltr YES NO | 461 // vertical-rl / ltr YES NO |
| 465 // vertical-rl / rtl YES YES | 462 // vertical-rl / rtl YES YES |
| 466 IntPoint scroll_origin_; | 463 IntPoint scroll_origin_; |
| 467 }; | 464 }; |
| 468 | 465 |
| 469 } // namespace blink | 466 } // namespace blink |
| 470 | 467 |
| 471 #endif // ScrollableArea_h | 468 #endif // ScrollableArea_h |
| OLD | NEW |