WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
141842
Rename ScrollElasticityController to ScrollController
https://bugs.webkit.org/show_bug.cgi?id=141842
Summary
Rename ScrollElasticityController to ScrollController
Brent Fulgham
Reported
2015-02-20 11:23:58 PST
As a first step in some scrolling refactoring, rename ScrollElasticityController to ScrollController.
Attachments
Patch
(64.05 KB, patch)
2015-02-20 11:30 PST
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Patch v2 (clean up style warnings)
(68.51 KB, patch)
2015-02-20 11:41 PST
,
Brent Fulgham
simon.fraser
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Brent Fulgham
Comment 1
2015-02-20 11:30:45 PST
Created
attachment 246979
[details]
Patch
WebKit Commit Bot
Comment 2
2015-02-20 11:33:33 PST
Attachment 246979
[details]
did not pass style-queue: ERROR: Source/WebCore/platform/mac/ScrollController.mm:31: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/platform/mac/ScrollController.mm:107: Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side. [whitespace/operators] [4] ERROR: Source/WebCore/platform/mac/ScrollController.mm:107: Multi line control clauses should use braces. [whitespace/braces] [4] ERROR: Source/WebCore/platform/mac/ScrollController.mm:193: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] ERROR: Source/WebCore/platform/mac/ScrollController.mm:204: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] ERROR: Source/WebCore/platform/mac/ScrollController.mm:227: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] ERROR: Source/WebCore/platform/mac/ScrollController.mm:229: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] ERROR: Source/WebCore/platform/mac/ScrollController.mm:233: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] ERROR: Source/WebCore/platform/mac/ScrollController.mm:241: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] ERROR: Source/WebCore/platform/mac/ScrollController.mm:251: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] ERROR: Source/WebCore/platform/mac/ScrollController.mm:335: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 11 in 10 files If any of these errors are false positives, please file a bug against check-webkit-style.
Brent Fulgham
Comment 3
2015-02-20 11:41:26 PST
Created
attachment 246982
[details]
Patch v2 (clean up style warnings)
Simon Fraser (smfr)
Comment 4
2015-02-20 11:49:10 PST
Comment on
attachment 246982
[details]
Patch v2 (clean up style warnings) View in context:
https://bugs.webkit.org/attachment.cgi?id=246982&action=review
> Source/WebCore/platform/mac/ScrollController.mm:57 > +static NSTimeInterval systemUptime() > +{ > + if ([[NSProcessInfo processInfo] respondsToSelector:@selector(systemUptime)]) > + return [[NSProcessInfo processInfo] systemUptime]; > + > + // Get how long system has been up. Found by looking getting "boottime" from the kernel. > + static struct timeval boottime = {0, 0}; > + if (!boottime.tv_sec) { > + int mib[2] = {CTL_KERN, KERN_BOOTTIME}; > + size_t size = sizeof(boottime); > + if (-1 == sysctl(mib, 2, &boottime, &size, 0, 0)) > + boottime.tv_sec = 0; > + } > + struct timeval now; > + if (boottime.tv_sec && -1 != gettimeofday(&now, 0)) { > + struct timeval uptime; > + timersub(&now, &boottime, &uptime); > + NSTimeInterval result = uptime.tv_sec + (uptime.tv_usec / 1E+6); > + return result; > + } > + return 0; > +}
Why the heck is this here? Can't we just use monotonicallyIncreasingTime or some std::chrono?
Brent Fulgham
Comment 5
2015-02-20 11:54:18 PST
(In reply to
comment #4
)
> Comment on
attachment 246982
[details]
> Patch v2 (clean up style warnings) > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=246982&action=review
> > > Source/WebCore/platform/mac/ScrollController.mm:57 > > +static NSTimeInterval systemUptime() > > +{ > > + if ([[NSProcessInfo processInfo] respondsToSelector:@selector(systemUptime)]) > > + return [[NSProcessInfo processInfo] systemUptime]; > > + > > + // Get how long system has been up. Found by looking getting "boottime" from the kernel. > > + static struct timeval boottime = {0, 0}; > > + if (!boottime.tv_sec) { > > + int mib[2] = {CTL_KERN, KERN_BOOTTIME}; > > + size_t size = sizeof(boottime); > > + if (-1 == sysctl(mib, 2, &boottime, &size, 0, 0)) > > + boottime.tv_sec = 0; > > + } > > + struct timeval now; > > + if (boottime.tv_sec && -1 != gettimeofday(&now, 0)) { > > + struct timeval uptime; > > + timersub(&now, &boottime, &uptime); > > + NSTimeInterval result = uptime.tv_sec + (uptime.tv_usec / 1E+6); > > + return result; > > + } > > + return 0; > > +} > > Why the heck is this here? Can't we just use monotonicallyIncreasingTime or > some std::chrono?
I'm not sure! Beth, do you remember why this is here?
Beth Dakin
Comment 6
2015-02-20 12:00:51 PST
(In reply to
comment #5
)
> (In reply to
comment #4
) > > Comment on
attachment 246982
[details]
> > Patch v2 (clean up style warnings) > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=246982&action=review
> > > > > Source/WebCore/platform/mac/ScrollController.mm:57 > > > +static NSTimeInterval systemUptime() > > > +{ > > > + if ([[NSProcessInfo processInfo] respondsToSelector:@selector(systemUptime)]) > > > + return [[NSProcessInfo processInfo] systemUptime]; > > > + > > > + // Get how long system has been up. Found by looking getting "boottime" from the kernel. > > > + static struct timeval boottime = {0, 0}; > > > + if (!boottime.tv_sec) { > > > + int mib[2] = {CTL_KERN, KERN_BOOTTIME}; > > > + size_t size = sizeof(boottime); > > > + if (-1 == sysctl(mib, 2, &boottime, &size, 0, 0)) > > > + boottime.tv_sec = 0; > > > + } > > > + struct timeval now; > > > + if (boottime.tv_sec && -1 != gettimeofday(&now, 0)) { > > > + struct timeval uptime; > > > + timersub(&now, &boottime, &uptime); > > > + NSTimeInterval result = uptime.tv_sec + (uptime.tv_usec / 1E+6); > > > + return result; > > > + } > > > + return 0; > > > +} > > > > Why the heck is this here? Can't we just use monotonicallyIncreasingTime or > > some std::chrono? > > I'm not sure! Beth, do you remember why this is here?
I don't know. Looks like Anders added that code. Any memory of what it's for, Anders?
Brent Fulgham
Comment 7
2015-02-20 12:50:59 PST
Committed
r180447
: <
http://trac.webkit.org/changeset/180447
>
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