WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
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+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
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
Created
attachment 236134
[details]
Patch
Radar WebKit Bug Importer
Comment 3
2014-08-06 16:00:44 PDT
<
rdar://problem/17938368
>
Brent Fulgham
Comment 4
2014-08-06 16:04:24 PDT
Committed
r172182
: <
http://trac.webkit.org/changeset/172182
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug