| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010, Google Inc. All rights reserved. | 2 * Copyright (c) 2010, Google Inc. All rights reserved. |
| 3 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved. | 3 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 ScrollbarOrientation orientation) { | 390 ScrollbarOrientation orientation) { |
| 391 if (ScrollAnimatorBase* scroll_animator = ExistingScrollAnimator()) { | 391 if (ScrollAnimatorBase* scroll_animator = ExistingScrollAnimator()) { |
| 392 if (orientation == kVerticalScrollbar) | 392 if (orientation == kVerticalScrollbar) |
| 393 scroll_animator->WillRemoveVerticalScrollbar(scrollbar); | 393 scroll_animator->WillRemoveVerticalScrollbar(scrollbar); |
| 394 else | 394 else |
| 395 scroll_animator->WillRemoveHorizontalScrollbar(scrollbar); | 395 scroll_animator->WillRemoveHorizontalScrollbar(scrollbar); |
| 396 } | 396 } |
| 397 } | 397 } |
| 398 | 398 |
| 399 void ScrollableArea::ContentsResized() { | 399 void ScrollableArea::ContentsResized() { |
| 400 ShowOverlayScrollbars(); | |
| 401 if (ScrollAnimatorBase* scroll_animator = ExistingScrollAnimator()) | 400 if (ScrollAnimatorBase* scroll_animator = ExistingScrollAnimator()) |
| 402 scroll_animator->ContentsResized(); | 401 scroll_animator->ContentsResized(); |
| 403 } | 402 } |
| 404 | 403 |
| 405 bool ScrollableArea::HasOverlayScrollbars() const { | 404 bool ScrollableArea::HasOverlayScrollbars() const { |
| 406 Scrollbar* v_scrollbar = VerticalScrollbar(); | 405 Scrollbar* v_scrollbar = VerticalScrollbar(); |
| 407 if (v_scrollbar && v_scrollbar->IsOverlayScrollbar()) | 406 if (v_scrollbar && v_scrollbar->IsOverlayScrollbar()) |
| 408 return true; | 407 return true; |
| 409 Scrollbar* h_scrollbar = HorizontalScrollbar(); | 408 Scrollbar* h_scrollbar = HorizontalScrollbar(); |
| 410 return h_scrollbar && h_scrollbar->IsOverlayScrollbar(); | 409 return h_scrollbar && h_scrollbar->IsOverlayScrollbar(); |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 offset.y() - ScrollOrigin().Y()); | 670 offset.y() - ScrollOrigin().Y()); |
| 672 SetScrollOffset(new_offset, kCompositorScroll); | 671 SetScrollOffset(new_offset, kCompositorScroll); |
| 673 } | 672 } |
| 674 | 673 |
| 675 DEFINE_TRACE(ScrollableArea) { | 674 DEFINE_TRACE(ScrollableArea) { |
| 676 visitor->Trace(scroll_animator_); | 675 visitor->Trace(scroll_animator_); |
| 677 visitor->Trace(programmatic_scroll_animator_); | 676 visitor->Trace(programmatic_scroll_animator_); |
| 678 } | 677 } |
| 679 | 678 |
| 680 } // namespace blink | 679 } // namespace blink |
| OLD | NEW |