RESOLVED FIXED 135670
Consolidate logic for calculating scrollbar page step size
https://bugs.webkit.org/show_bug.cgi?id=135670
Summary Consolidate logic for calculating scrollbar page step size
Brent Fulgham
Reported 2014-08-06 14:04:50 PDT
There are a number of places in WebCore where the same complicated declaration is used: int pageStep = std::max(std::max<int>(clientWidth * Scrollbar::minFractionToStepWhenPaging(), clientWidth - Scrollbar::maxOverlapBetweenPages()), 1); To ensure that the correct rounding/truncating and clamping are used in all of these places, we should create a method that does this job for us: int pageStep = Scrollbar::pageStep(clientWidth);
Attachments
Patch (8.03 KB, patch)
2014-08-06 14:12 PDT, Brent Fulgham
simon.fraser: review+
Brent Fulgham
Comment 1 2014-08-06 14:11:03 PDT
Furthermore, attempt to reduce small scroll calculation errors by properly rounding fractional step amounts by using lroundf during the calculation of the step size.
Brent Fulgham
Comment 2 2014-08-06 14:12:45 PDT
Radar WebKit Bug Importer
Comment 3 2014-08-06 16:00:44 PDT
Brent Fulgham
Comment 4 2014-08-06 16:04:24 PDT
Note You need to log in before you can comment on or make changes to this bug.