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 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 bool ScrollableArea::shouldScrollOnMainThread() const | 528 bool ScrollableArea::shouldScrollOnMainThread() const |
529 { | 529 { |
530 if (GraphicsLayer* layer = layerForScrolling()) { | 530 if (GraphicsLayer* layer = layerForScrolling()) { |
531 uint32_t reasons = layer->platformLayer()->mainThreadScrollingReasons(); | 531 uint32_t reasons = layer->platformLayer()->mainThreadScrollingReasons(); |
532 // Should scroll on main thread unless the reason is the one that is set | 532 // Should scroll on main thread unless the reason is the one that is set |
533 // by the ScrollAnimator, in which case, the animation can still be | 533 // by the ScrollAnimator, in which case, the animation can still be |
534 // scheduled on the compositor. | 534 // scheduled on the compositor. |
535 // TODO(ymalik): We have a non-transient "main thread scrolling reason" | 535 // TODO(ymalik): We have a non-transient "main thread scrolling reason" |
536 // that doesn't actually cause shouldScrollOnMainThread() to be true. | 536 // that doesn't actually cause shouldScrollOnMainThread() to be true. |
537 // This is confusing and should be cleaned up. | 537 // This is confusing and should be cleaned up. |
538 return !!(reasons & ~MainThreadScrollingReason::kAnimatingScrollOnMainTh
read); | 538 return !!(reasons & ~MainThreadScrollingReason::kHandlingScrollFromMainT
hread); |
539 } | 539 } |
540 return true; | 540 return true; |
541 } | 541 } |
542 | 542 |
543 DoubleRect ScrollableArea::visibleContentRectDouble(IncludeScrollbarsInRect scro
llbarInclusion) const | 543 DoubleRect ScrollableArea::visibleContentRectDouble(IncludeScrollbarsInRect scro
llbarInclusion) const |
544 { | 544 { |
545 return visibleContentRect(scrollbarInclusion); | 545 return visibleContentRect(scrollbarInclusion); |
546 } | 546 } |
547 | 547 |
548 IntRect ScrollableArea::visibleContentRect(IncludeScrollbarsInRect scrollbarIncl
usion) const | 548 IntRect ScrollableArea::visibleContentRect(IncludeScrollbarsInRect scrollbarIncl
usion) const |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 std::max(0, size.height() - horizontalScrollbarHeight())); | 612 std::max(0, size.height() - horizontalScrollbarHeight())); |
613 } | 613 } |
614 | 614 |
615 DEFINE_TRACE(ScrollableArea) | 615 DEFINE_TRACE(ScrollableArea) |
616 { | 616 { |
617 visitor->trace(m_scrollAnimator); | 617 visitor->trace(m_scrollAnimator); |
618 visitor->trace(m_programmaticScrollAnimator); | 618 visitor->trace(m_programmaticScrollAnimator); |
619 } | 619 } |
620 | 620 |
621 } // namespace blink | 621 } // namespace blink |
OLD | NEW |