Changeset 283355 in webkit
- Timestamp:
- Sep 30, 2021, 6:30:29 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
platform/ScrollingEffectsController.h (modified) (1 diff)
-
platform/mac/ScrollingEffectsController.mm (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r283354 r283355 1 2021-09-30 Simon Fraser <simon.fraser@apple.com> 2 3 Rename snapRubberBand() to have a clearer name 4 https://bugs.webkit.org/show_bug.cgi?id=231051 5 6 Reviewed by Myles C. Maxfield. 7 8 It wasn't clear that snapRubberBand() started the timer, sometimes. Make that 9 more obvious. 10 11 * platform/ScrollingEffectsController.h: 12 * platform/mac/ScrollingEffectsController.mm: 13 (WebCore::ScrollingEffectsController::handleWheelEvent): 14 (WebCore::ScrollingEffectsController::updateRubberBandAnimatingState): 15 (WebCore::ScrollingEffectsController::stopRubberbanding): 16 (WebCore::ScrollingEffectsController::stopRubberbandAnimation): 17 (WebCore::ScrollingEffectsController::startRubberbandAnimationIfNecessary): 18 (WebCore::ScrollingEffectsController::stopSnapRubberbandAnimation): Deleted. 19 (WebCore::ScrollingEffectsController::snapRubberBand): Deleted. 20 1 21 2021-09-30 Cathie Chen <cathiechen@igalia.com> 2 22 -
trunk/Source/WebCore/platform/ScrollingEffectsController.h
r283335 r283355 199 199 void stopDeferringWheelEventTestCompletionDueToScrollSnapping(); 200 200 201 void startRubberbandAnimationIfNecessary(); 201 202 void startRubberbandAnimation(); 202 void stopSnapRubberbandAnimation(); 203 204 void snapRubberBand(); 203 void stopRubberbandAnimation(); 204 205 205 bool shouldRubberBandOnSide(BoxSide) const; 206 206 bool isRubberBandInProgressInternal() const; -
trunk/Source/WebCore/platform/mac/ScrollingEffectsController.mm
r283335 r283355 152 152 m_unappliedOverscrollDelta = { }; 153 153 154 stop SnapRubberbandAnimation();154 stopRubberbandAnimation(); 155 155 updateRubberBandingState(); 156 156 return true; … … 159 159 if (wheelEvent.phase() == PlatformWheelEventPhase::Ended) { 160 160 // FIXME: This triggers the rubberband timer even when we don't start rubberbanding. 161 s napRubberBand();161 startRubberbandAnimationIfNecessary(); 162 162 updateRubberBandingState(); 163 163 return true; … … 301 301 m_ignoreMomentumScrolls = true; 302 302 m_momentumScrollInProgress = false; 303 s napRubberBand();303 startRubberbandAnimationIfNecessary(); 304 304 } 305 305 } … … 359 359 if (m_startStretch.isZero()) { 360 360 m_startStretch = m_client.stretchAmount(); 361 if (m_startStretch == FloatSize()) {361 if (m_startStretch.isZero()) { 362 362 stopRubberbanding(); 363 363 return; … … 407 407 m_startStretch = { }; 408 408 if (!isRubberBandInProgressInternal()) 409 stop SnapRubberbandAnimation();409 stopRubberbandAnimation(); 410 410 } 411 411 … … 441 441 void ScrollingEffectsController::stopRubberbanding() 442 442 { 443 stop SnapRubberbandAnimation();443 stopRubberbandAnimation(); 444 444 m_stretchScrollForce = { }; 445 445 m_startTime = { }; … … 458 458 } 459 459 460 void ScrollingEffectsController::stop SnapRubberbandAnimation()460 void ScrollingEffectsController::stopRubberbandAnimation() 461 461 { 462 462 m_client.didStopRubberbandSnapAnimation(); … … 467 467 } 468 468 469 void ScrollingEffectsController::s napRubberBand()469 void ScrollingEffectsController::startRubberbandAnimationIfNecessary() 470 470 { 471 471 auto timeDelta = WallTime::now() - m_lastMomentumScrollTimestamp;
Note:
See TracChangeset
for help on using the changeset viewer.