Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 373d24af71c6ad6f1c03e521fa42de23dc98490a
https://github.com/WebKit/WebKit/commit/373d24af71c6ad6f1c03e521fa42de23dc98490a
Author: Simon Fraser <[email protected]>
Date: 2023-05-13 (Sat, 13 May 2023)
Changed paths:
M Source/WebCore/PAL/pal/HysteresisActivity.h
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
A Tools/TestWebKitAPI/Tests/WebCore/HysteresisActivityTests.cpp
Log Message:
-----------
REGRESSION (263946@main): Scroll momentum broken
https://bugs.webkit.org/show_bug.cgi?id=256748
rdar://109274749
Reviewed by Chris Dumez.
After 263946@main, reading HysteresisActivity::state() inside of the `started`
callback, triggered
from a call to HysteresisActivity::impulse() returned HysteresisState::Stopped
when it should have
returned HysteresisState::Started. This is because we no longer toggled
m_active to true, and the
time wasn't started yet.
Fix by toggling m_active to true around the callback. I tried just swapping
ordering with the timer
start, but that also caused in behavior changes, as indicated by the new API
tests.
Add a set of API tests for HysteresisActivity so we don't mess up again in
future.
* Source/WebCore/PAL/pal/HysteresisActivity.h:
(PAL::HysteresisActivity::impulse):
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebCore/HysteresisActivityTests.cpp: Added.
(TestWebKitAPI::TEST):
Canonical link: https://commits.webkit.org/264049@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes