Changeset 89305 in webkit
- Timestamp:
- Jun 20, 2011 4:16:24 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 3 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r89304 r89305 1 2011-06-20 Scott Byer <scottbyer@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 Smooth scrolling for Chromium, initial patch. 6 https://bugs.webkit.org/show_bug.cgi?id=61878 7 8 Add in a default scrolling animator in the platform directory, with a run time enable switch, to provide 9 animated / smooth scrolling on platforms and for input devices where it's not provided by the platform, and to 10 be easily configurable to what situatuations the animations are provided for. The smooth scrolling code is 11 compiled out by default. 12 13 Unit tests in chromium/ScrollAnimatorNoneTest.cpp 14 15 * WebCore.gypi: 16 * page/FrameView.cpp: 17 (WebCore::FrameView::scrollAnimatorEnabled): 18 * page/FrameView.h: 19 * page/Settings.cpp: 20 (WebCore::Settings::Settings): 21 * page/Settings.h: 22 (WebCore::Settings::setEnableScrollAnimator): 23 (WebCore::Settings::scrollAnimatorEnabled): 24 * platform/ScrollAnimatorNone.cpp: Added. 25 (WebCore::ScrollAnimator::create): 26 (WebCore::ScrollAnimatorNone::Parameters::Parameters): 27 (WebCore::ScrollAnimatorNone::PerAxisData::curveAt): 28 (WebCore::ScrollAnimatorNone::PerAxisData::attackCurve): 29 (WebCore::ScrollAnimatorNone::PerAxisData::releaseCurve): 30 (WebCore::ScrollAnimatorNone::PerAxisData::curveDerivativeAt): 31 (WebCore::ScrollAnimatorNone::PerAxisData::PerAxisData): 32 (WebCore::ScrollAnimatorNone::PerAxisData::reset): 33 (WebCore::ScrollAnimatorNone::PerAxisData::updateDataFromParameters): 34 (WebCore::ScrollAnimatorNone::PerAxisData::animateScroll): 35 (WebCore::ScrollAnimatorNone::ScrollAnimatorNone): 36 (WebCore::ScrollAnimatorNone::~ScrollAnimatorNone): 37 (WebCore::ScrollAnimatorNone::scroll): 38 (WebCore::ScrollAnimatorNone::scrollToOffsetWithoutAnimation): 39 (WebCore::ScrollAnimatorNone::animationTimerFired): 40 (WebCore::ScrollAnimatorNone::stopAnimationTimerIfNeeded): 41 * platform/ScrollAnimatorNone.h: Added. 42 * platform/ScrollableArea.h: 43 (WebCore::ScrollableArea::scrollAnimatorEnabled): 44 1 45 2011-06-20 Julien Chaffraix <jchaffraix@webkit.org> 2 46 -
trunk/Source/WebCore/WebCore.gypi
r89266 r89305 3659 3659 'platform/ScrollAnimator.cpp', 3660 3660 'platform/ScrollAnimator.h', 3661 'platform/ScrollAnimatorNone.cpp', 3662 'platform/ScrollAnimatorNone.h', 3661 3663 'platform/ScrollAnimatorWin.cpp', 3662 3664 'platform/ScrollAnimatorWin.h', -
trunk/Source/WebCore/page/FrameView.cpp
r88982 r89305 2272 2272 } 2273 2273 2274 bool FrameView::scrollAnimatorEnabled() const 2275 { 2276 #if ENABLE(SMOOTH_SCROLLING) 2277 if (m_page && m_page->settings()) 2278 return m_page->settings()->scrollAnimatorEnabled(); 2279 #endif 2280 return false; 2281 } 2282 2274 2283 #if ENABLE(DASHBOARD_SUPPORT) 2275 2284 void FrameView::updateDashboardRegions() -
trunk/Source/WebCore/page/FrameView.h
r88982 r89305 339 339 virtual void disconnectFromPage() { m_page = 0; } 340 340 341 virtual bool scrollAnimatorEnabled() const; 342 341 343 void deferredRepaintTimerFired(Timer<FrameView>*); 342 344 void doDeferredRepaints(); -
trunk/Source/WebCore/page/Settings.cpp
r87329 r89305 182 182 , m_allowDisplayOfInsecureContent(true) 183 183 , m_allowRunningOfInsecureContent(true) 184 #if ENABLE(SMOOTH_SCROLLING) 185 , m_scrollAnimatorEnabled(false) 186 #endif 184 187 , m_loadsImagesAutomaticallyTimer(this, &Settings::loadsImagesAutomaticallyTimerFired) 185 188 { -
trunk/Source/WebCore/page/Settings.h
r87329 r89305 405 405 void setAllowRunningOfInsecureContent(bool flag) { m_allowRunningOfInsecureContent = flag; } 406 406 bool allowRunningOfInsecureContent() const { return m_allowRunningOfInsecureContent; } 407 408 #if ENABLE(SMOOTH_SCROLLING) 409 void setEnableScrollAnimator(bool flag) { m_scrollAnimatorEnabled = flag; } 410 bool scrollAnimatorEnabled() const { return m_scrollAnimatorEnabled; } 411 #endif 407 412 408 413 private: … … 511 516 bool m_allowDisplayOfInsecureContent : 1; 512 517 bool m_allowRunningOfInsecureContent : 1; 518 #if ENABLE(SMOOTH_SCROLLING) 519 bool m_scrollAnimatorEnabled : 1; 520 #endif 513 521 514 522 Timer<Settings> m_loadsImagesAutomaticallyTimer; -
trunk/Source/WebCore/platform/ScrollableArea.h
r88982 r89305 147 147 virtual void disconnectFromPage() { } 148 148 149 virtual bool scrollAnimatorEnabled() const { return false; } 150 149 151 private: 150 152 // NOTE: Only called from the ScrollAnimator. -
trunk/Source/WebKit/chromium/ChangeLog
r89260 r89305 1 2011-06-20 Scott Byer <scottbyer@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 Smooth scrolling for Chromium, initial patch. 6 https://bugs.webkit.org/show_bug.cgi?id=61878 7 8 Add in a default scrolling animator in the platform directory, with a run time enable switch, to provide 9 animated / smooth scrolling on platforms and for input devices where it's not provided by the platform, and to 10 be easily configurable to what situatuations the animations are provided for. The smooth scrolling code is 11 compiled out by default. 12 13 Unit tests ScrollAnimatorNoneTest.cpp 14 15 * WebKit.gypi: 16 * features.gypi: 17 * public/WebSettings.h: 18 * src/WebSettingsImpl.cpp: 19 (WebKit::WebSettingsImpl::setEnableScrollAnimator): 20 * src/WebSettingsImpl.h: 21 * tests/ScrollAnimatorNoneTest.cpp: Added. 22 (MockScrollableArea::MockScrollableArea): 23 (MockScrollableArea::scrollAnimatorEnabled): 24 (MockScrollAnimatorNone::MockScrollAnimatorNone): 25 (MockScrollAnimatorNone::currentX): 26 (MockScrollAnimatorNone::currentY): 27 (MockScrollAnimatorNone::reset): 28 (TEST): 29 (ScrollAnimatorNoneTest::ScrollAnimatorNoneTest): 30 (ScrollAnimatorNoneTest::SetUp): 31 (ScrollAnimatorNoneTest::TearDown): 32 (ScrollAnimatorNoneTest::reset): 33 (ScrollAnimatorNoneTest::updateDataFromParameters): 34 (ScrollAnimatorNoneTest::animateScroll): 35 (ScrollAnimatorNoneTest::curveIntegralAt): 36 (ScrollAnimatorNoneTest::attackArea): 37 (ScrollAnimatorNoneTest::releaseArea): 38 (ScrollAnimatorNoneTest::attackCurve): 39 (ScrollAnimatorNoneTest::releaseCurve): 40 (ScrollAnimatorNoneTest::curveDerivativeAt): 41 (ScrollAnimatorNoneTest::curveTestInner): 42 (ScrollAnimatorNoneTest::curveTest): 43 (TEST_F): 44 1 45 2011-06-20 Adam Barth <abarth@webkit.org> 2 46 -
trunk/Source/WebKit/chromium/WebKit.gypi
r89089 r89305 66 66 'tests/PODIntervalTreeTest.cpp', 67 67 'tests/PODRedBlackTreeTest.cpp', 68 'tests/ScrollAnimatorNoneTest.cpp', 68 69 'tests/TilingDataTest.cpp', 69 70 'tests/TreeSynchronizerTest.cpp', -
trunk/Source/WebKit/chromium/features.gypi
r89188 r89305 108 108 'use_skia_gpu%': 0, 109 109 'enable_touch_icon_loading%' : 0, 110 'enable_smooth_scrolling%': 0, 110 111 }, 111 112 'use_accelerated_compositing%': '<(use_accelerated_compositing)', … … 113 114 'enable_svg%': '<(enable_svg)', 114 115 'enable_touch_events%': '<(enable_touch_events)', 116 'enable_smooth_scrolling%': '<(enable_smooth_scrolling)', 115 117 'conditions': [ 116 118 ['use_accelerated_compositing==1', { … … 152 154 ], 153 155 }], 156 ['enable_smooth_scrolling==1', { 157 'feature_defines': [ 158 'ENABLE_SMOOTH_SCROLLING=1', 159 ], 160 }], 154 161 ], 155 162 }, -
trunk/Source/WebKit/chromium/public/WebSettings.h
r88728 r89305 125 125 virtual void setAllowRunningOfInsecureContent(bool) = 0; 126 126 virtual void setShouldPrintBackgrounds(bool) = 0; 127 virtual void setEnableScrollAnimator(bool) = 0; 127 128 128 129 protected: -
trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp
r88728 r89305 423 423 } 424 424 425 void WebSettingsImpl::setEnableScrollAnimator(bool enabled) 426 { 427 #if ENABLE(SMOOTH_SCROLLING) 428 m_settings->setEnableScrollAnimator(enabled); 429 #else 430 UNUSED_PARAM(enabled); 431 #endif 432 } 433 425 434 } // namespace WebKit -
trunk/Source/WebKit/chromium/src/WebSettingsImpl.h
r88728 r89305 118 118 virtual void setAllowRunningOfInsecureContent(bool); 119 119 virtual void setShouldPrintBackgrounds(bool); 120 virtual void setEnableScrollAnimator(bool); 120 121 121 122 private:
Note: See TracChangeset
for help on using the changeset viewer.