OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010, 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 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
676 | 676 |
677 ScrollAnimatorBase* ScrollAnimatorBase::create(ScrollableArea* scrollableArea) | 677 ScrollAnimatorBase* ScrollAnimatorBase::create(ScrollableArea* scrollableArea) |
678 { | 678 { |
679 return new ScrollAnimatorMac(scrollableArea); | 679 return new ScrollAnimatorMac(scrollableArea); |
680 } | 680 } |
681 | 681 |
682 ScrollAnimatorMac::ScrollAnimatorMac(ScrollableArea* scrollableArea) | 682 ScrollAnimatorMac::ScrollAnimatorMac(ScrollableArea* scrollableArea) |
683 : ScrollAnimatorBase(scrollableArea) | 683 : ScrollAnimatorBase(scrollableArea) |
684 , m_initialScrollbarPaintTaskFactory(CancellableTaskFactory::create(this, &S
crollAnimatorMac::initialScrollbarPaintTask)) | 684 , m_initialScrollbarPaintTaskFactory(CancellableTaskFactory::create(this, &S
crollAnimatorMac::initialScrollbarPaintTask)) |
685 , m_sendContentAreaScrolledTaskFactory(CancellableTaskFactory::create(this,
&ScrollAnimatorMac::sendContentAreaScrolledTask)) | 685 , m_sendContentAreaScrolledTaskFactory(CancellableTaskFactory::create(this,
&ScrollAnimatorMac::sendContentAreaScrolledTask)) |
686 , m_taskRunner(wrapUnique(Platform::current()->currentThread()->scheduler()-
>timerTaskRunner()->clone())) | 686 , m_taskRunner(Platform::current()->currentThread()->scheduler()->timerTaskR
unner()->clone()) |
687 , m_haveScrolledSincePageLoad(false) | 687 , m_haveScrolledSincePageLoad(false) |
688 , m_needsScrollerStyleUpdate(false) | 688 , m_needsScrollerStyleUpdate(false) |
689 { | 689 { |
690 ThreadState::current()->registerPreFinalizer(this); | 690 ThreadState::current()->registerPreFinalizer(this); |
691 | 691 |
692 m_scrollAnimationHelperDelegate.adoptNS([[BlinkScrollAnimationHelperDelegate
alloc] initWithScrollAnimator:this]); | 692 m_scrollAnimationHelperDelegate.adoptNS([[BlinkScrollAnimationHelperDelegate
alloc] initWithScrollAnimator:this]); |
693 m_scrollAnimationHelper.adoptNS([[NSClassFromString(@"NSScrollAnimationHelpe
r") alloc] initWithDelegate:m_scrollAnimationHelperDelegate.get()]); | 693 m_scrollAnimationHelper.adoptNS([[NSClassFromString(@"NSScrollAnimationHelpe
r") alloc] initWithDelegate:m_scrollAnimationHelperDelegate.get()]); |
694 | 694 |
695 m_scrollbarPainterControllerDelegate.adoptNS([[BlinkScrollbarPainterControll
erDelegate alloc] initWithScrollableArea:scrollableArea]); | 695 m_scrollbarPainterControllerDelegate.adoptNS([[BlinkScrollbarPainterControll
erDelegate alloc] initWithScrollableArea:scrollableArea]); |
696 m_scrollbarPainterController = [[[NSClassFromString(@"NSScrollerImpPair") al
loc] init] autorelease]; | 696 m_scrollbarPainterController = [[[NSClassFromString(@"NSScrollerImpPair") al
loc] init] autorelease]; |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1101 if (Scrollbar* verticalScrollbar = m_scrollableArea->verticalScrollbar()) | 1101 if (Scrollbar* verticalScrollbar = m_scrollableArea->verticalScrollbar()) |
1102 rectInViewCoordinates = verticalScrollbar->convertToContainingWidget(scr
ollerThumb); | 1102 rectInViewCoordinates = verticalScrollbar->convertToContainingWidget(scr
ollerThumb); |
1103 | 1103 |
1104 if (rectInViewCoordinates == m_visibleScrollerThumbRect) | 1104 if (rectInViewCoordinates == m_visibleScrollerThumbRect) |
1105 return; | 1105 return; |
1106 | 1106 |
1107 m_visibleScrollerThumbRect = rectInViewCoordinates; | 1107 m_visibleScrollerThumbRect = rectInViewCoordinates; |
1108 } | 1108 } |
1109 | 1109 |
1110 } // namespace blink | 1110 } // namespace blink |
OLD | NEW |