| 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 PassOwnPtrWillBeRawPtr<ScrollAnimatorBase> ScrollAnimatorBase::create(Scrollable
Area* scrollableArea) | 56 RawPtr<ScrollAnimatorBase> ScrollAnimatorBase::create(ScrollableArea* scrollable
Area) |
| 57 { | 57 { |
| 58 if (scrollableArea && scrollableArea->scrollAnimatorEnabled()) | 58 if (scrollableArea && scrollableArea->scrollAnimatorEnabled()) |
| 59 return adoptPtrWillBeNoop(new ScrollAnimator(scrollableArea)); | 59 return new ScrollAnimator(scrollableArea); |
| 60 return adoptPtrWillBeNoop(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) |
| 67 { | 67 { |
| 68 } | 68 } |
| 69 | 69 |
| 70 ScrollAnimator::~ScrollAnimator() | 70 ScrollAnimator::~ScrollAnimator() |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 } | 413 } |
| 414 return true; | 414 return true; |
| 415 } | 415 } |
| 416 | 416 |
| 417 DEFINE_TRACE(ScrollAnimator) | 417 DEFINE_TRACE(ScrollAnimator) |
| 418 { | 418 { |
| 419 ScrollAnimatorBase::trace(visitor); | 419 ScrollAnimatorBase::trace(visitor); |
| 420 } | 420 } |
| 421 | 421 |
| 422 } // namespace blink | 422 } // namespace blink |
| OLD | NEW |