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 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 bool ScrollableArea::hasLayerForVerticalScrollbar() const | 480 bool ScrollableArea::hasLayerForVerticalScrollbar() const |
481 { | 481 { |
482 return layerForVerticalScrollbar(); | 482 return layerForVerticalScrollbar(); |
483 } | 483 } |
484 | 484 |
485 bool ScrollableArea::hasLayerForScrollCorner() const | 485 bool ScrollableArea::hasLayerForScrollCorner() const |
486 { | 486 { |
487 return layerForScrollCorner(); | 487 return layerForScrollCorner(); |
488 } | 488 } |
489 | 489 |
490 void ScrollableArea::layerForScrollingDidChange() | 490 void ScrollableArea::layerForScrollingDidChange(WebCompositorAnimationTimeline*
timeline) |
491 { | 491 { |
492 if (ProgrammaticScrollAnimator* programmaticScrollAnimator = existingProgram
maticScrollAnimator()) | 492 if (ProgrammaticScrollAnimator* programmaticScrollAnimator = existingProgram
maticScrollAnimator()) |
493 programmaticScrollAnimator->layerForCompositedScrollingDidChange(); | 493 programmaticScrollAnimator->layerForCompositedScrollingDidChange(timelin
e); |
494 } | 494 } |
495 | 495 |
496 bool ScrollableArea::scheduleAnimation() | 496 bool ScrollableArea::scheduleAnimation() |
497 { | 497 { |
498 if (HostWindow* window = hostWindow()) { | 498 if (HostWindow* window = hostWindow()) { |
499 window->scheduleAnimation(); | 499 window->scheduleAnimation(); |
500 return true; | 500 return true; |
501 } | 501 } |
502 return false; | 502 return false; |
503 } | 503 } |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 verticalScrollbarWidth = !verticalBar->isOverlayScrollbar() ? verticalBa
r->width() : 0; | 610 verticalScrollbarWidth = !verticalBar->isOverlayScrollbar() ? verticalBa
r->width() : 0; |
611 if (Scrollbar* horizontalBar = horizontalScrollbar()) | 611 if (Scrollbar* horizontalBar = horizontalScrollbar()) |
612 horizontalScrollbarHeight = !horizontalBar->isOverlayScrollbar() ? horiz
ontalBar->height() : 0; | 612 horizontalScrollbarHeight = !horizontalBar->isOverlayScrollbar() ? horiz
ontalBar->height() : 0; |
613 | 613 |
614 return IntSize(std::max(0, size.width() - verticalScrollbarWidth), | 614 return IntSize(std::max(0, size.width() - verticalScrollbarWidth), |
615 std::max(0, size.height() - horizontalScrollbarHeight)); | 615 std::max(0, size.height() - horizontalScrollbarHeight)); |
616 | 616 |
617 } | 617 } |
618 | 618 |
619 } // namespace blink | 619 } // namespace blink |
OLD | NEW |