| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 } | 87 } |
| 88 | 88 |
| 89 ScrollingCoordinator::ScrollingCoordinator(Page* page) | 89 ScrollingCoordinator::ScrollingCoordinator(Page* page) |
| 90 : m_page(page) | 90 : m_page(page) |
| 91 , m_scrollGestureRegionIsDirty(false) | 91 , m_scrollGestureRegionIsDirty(false) |
| 92 , m_touchEventTargetRectsAreDirty(false) | 92 , m_touchEventTargetRectsAreDirty(false) |
| 93 , m_shouldScrollOnMainThreadDirty(false) | 93 , m_shouldScrollOnMainThreadDirty(false) |
| 94 , m_wasFrameScrollable(false) | 94 , m_wasFrameScrollable(false) |
| 95 , m_lastMainThreadScrollingReasons(0) | 95 , m_lastMainThreadScrollingReasons(0) |
| 96 { | 96 { |
| 97 if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled()) { | 97 if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled() && Platfor
m::current()->isThreadedAnimationEnabled()) { |
| 98 ASSERT(m_page); | 98 ASSERT(m_page); |
| 99 ASSERT(m_page->mainFrame()->isLocalFrame()); | 99 ASSERT(m_page->mainFrame()->isLocalFrame()); |
| 100 ASSERT(Platform::current()->compositorSupport()); | 100 ASSERT(Platform::current()->compositorSupport()); |
| 101 m_programmaticScrollAnimatorTimeline = adoptPtr(Platform::current()->com
positorSupport()->createAnimationTimeline()); | 101 m_programmaticScrollAnimatorTimeline = adoptPtr(Platform::current()->com
positorSupport()->createAnimationTimeline()); |
| 102 m_page->chromeClient().attachCompositorAnimationTimeline(m_programmaticS
crollAnimatorTimeline.get(), toLocalFrame(m_page->mainFrame())); | 102 m_page->chromeClient().attachCompositorAnimationTimeline(m_programmaticS
crollAnimatorTimeline.get(), toLocalFrame(m_page->mainFrame())); |
| 103 } | 103 } |
| 104 } | 104 } |
| 105 | 105 |
| 106 ScrollingCoordinator::~ScrollingCoordinator() | 106 ScrollingCoordinator::~ScrollingCoordinator() |
| 107 { | 107 { |
| (...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1076 bool frameIsScrollable = frameView && frameView->isScrollable(); | 1076 bool frameIsScrollable = frameView && frameView->isScrollable(); |
| 1077 if (frameIsScrollable != m_wasFrameScrollable) | 1077 if (frameIsScrollable != m_wasFrameScrollable) |
| 1078 return true; | 1078 return true; |
| 1079 | 1079 |
| 1080 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll
ing()) : nullptr) | 1080 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll
ing()) : nullptr) |
| 1081 return WebSize(frameView->contentsSize()) != scrollLayer->bounds(); | 1081 return WebSize(frameView->contentsSize()) != scrollLayer->bounds(); |
| 1082 return false; | 1082 return false; |
| 1083 } | 1083 } |
| 1084 | 1084 |
| 1085 } // namespace blink | 1085 } // namespace blink |
| OLD | NEW |