OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011, Google Inc. All rights reserved. | 2 * Copyright (c) 2011, Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 | 46 |
47 namespace { | 47 namespace { |
48 | 48 |
49 WebLayer* toWebLayer(GraphicsLayer* layer) | 49 WebLayer* toWebLayer(GraphicsLayer* layer) |
50 { | 50 { |
51 return layer ? layer->platformLayer() : nullptr; | 51 return layer ? layer->platformLayer() : nullptr; |
52 } | 52 } |
53 | 53 |
54 } // namespace | 54 } // namespace |
55 | 55 |
56 RawPtr<ScrollAnimatorBase> ScrollAnimatorBase::create(ScrollableArea* scrollable
Area) | 56 ScrollAnimatorBase* ScrollAnimatorBase::create(ScrollableArea* scrollableArea) |
57 { | 57 { |
58 if (scrollableArea && scrollableArea->scrollAnimatorEnabled()) | 58 if (scrollableArea && scrollableArea->scrollAnimatorEnabled()) |
59 return new ScrollAnimator(scrollableArea); | 59 return new ScrollAnimator(scrollableArea); |
60 return new ScrollAnimatorBase(scrollableArea); | 60 return new ScrollAnimatorBase(scrollableArea); |
61 } | 61 } |
62 | 62 |
63 ScrollAnimator::ScrollAnimator(ScrollableArea* scrollableArea, WTF::TimeFunction
timeFunction) | 63 ScrollAnimator::ScrollAnimator(ScrollableArea* scrollableArea, WTF::TimeFunction
timeFunction) |
64 : ScrollAnimatorBase(scrollableArea) | 64 : ScrollAnimatorBase(scrollableArea) |
65 , m_timeFunction(timeFunction) | 65 , m_timeFunction(timeFunction) |
66 , m_lastGranularity(ScrollByPixel) | 66 , m_lastGranularity(ScrollByPixel) |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 } | 421 } |
422 return true; | 422 return true; |
423 } | 423 } |
424 | 424 |
425 DEFINE_TRACE(ScrollAnimator) | 425 DEFINE_TRACE(ScrollAnimator) |
426 { | 426 { |
427 ScrollAnimatorBase::trace(visitor); | 427 ScrollAnimatorBase::trace(visitor); |
428 } | 428 } |
429 | 429 |
430 } // namespace blink | 430 } // namespace blink |
OLD | NEW |