WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
170659
Drop Timer::startOneShot() overload taking a double
https://bugs.webkit.org/show_bug.cgi?id=170659
Summary
Drop Timer::startOneShot() overload taking a double
Chris Dumez
Reported
2017-04-09 16:20:33 PDT
Drop Timer::startOneShot() overload taking a double as people should use Seconds type now.
Attachments
Patch
(146.59 KB, patch)
2017-04-09 21:58 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(146.58 KB, patch)
2017-04-09 22:07 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(146.56 KB, patch)
2017-04-09 22:14 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(146.54 KB, patch)
2017-04-09 22:19 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(147.09 KB, patch)
2017-04-09 22:31 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(147.00 KB, patch)
2017-04-09 22:38 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(147.39 KB, patch)
2017-04-09 22:44 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(147.58 KB, patch)
2017-04-09 23:06 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(7)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2017-04-09 21:58:32 PDT
Created
attachment 306650
[details]
Patch
Chris Dumez
Comment 2
2017-04-09 22:07:46 PDT
Created
attachment 306652
[details]
Patch
Chris Dumez
Comment 3
2017-04-09 22:14:38 PDT
Created
attachment 306653
[details]
Patch
Chris Dumez
Comment 4
2017-04-09 22:19:08 PDT
Created
attachment 306654
[details]
Patch
Chris Dumez
Comment 5
2017-04-09 22:31:29 PDT
Created
attachment 306655
[details]
Patch
Chris Dumez
Comment 6
2017-04-09 22:38:27 PDT
Created
attachment 306656
[details]
Patch
Chris Dumez
Comment 7
2017-04-09 22:44:06 PDT
Created
attachment 306659
[details]
Patch
Chris Dumez
Comment 8
2017-04-09 23:06:43 PDT
Created
attachment 306661
[details]
Patch
Yusuke Suzuki
Comment 9
2017-04-10 00:34:37 PDT
Comment on
attachment 306661
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=306661&action=review
r=me with future clean up suggestion. Basically, I think `1_s * xxx` should be removed in the future.
> Source/WebCore/page/EventSource.cpp:141 > + m_connectTimer.startOneShot(1_ms * m_reconnectDelay);
Nice.
> Source/WebCore/platform/ScrollAnimationSmooth.cpp:403 > + Seconds deltaToNextFrame = 1_s * ceil((currentTime - m_startTime).value() * frameRate) / frameRate - (currentTime - m_startTime);
Looking the code, I think ceil, round, floor etc. overloading for Seconds would be nice. We already have several overloading functions, like, isnan, isinf, isfinite for Seconds.
> Source/WebCore/platform/graphics/BitmapImage.cpp:342 > + m_desiredFrameStartTime = std::max(time, m_desiredFrameStartTime + Seconds { frameDurationAtIndex(m_currentFrame) });
In a separate patch, we should return Seconds from frameDurationAtIndex.
> Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp:774 > + d->m_timeoutSource.startOneShot(1_s * d->m_firstRequest.timeoutInterval());
In a separate patch, we should change this timeoutInterval() to Seconds.
> Source/WebCore/replay/EventLoopInputDispatcher.cpp:121 > + m_timer.startOneShot(1_s * waitInterval);
In a separate patch, we should change this waitInterval (and related ones) to Seconds.
> Source/WebKit/mac/Plugins/WebNetscapePluginView.mm:133 > + Seconds timeInterval = 1_ms * m_interval;
In a separate patch, we should change this m_interval to Seconds.
> Source/WebKit/mac/Storage/WebStorageManager.mm:118 > + (void)setStorageDatabaseIdleInterval:(double)interval
In a separate patch, we should change this interval to Seconds.
> Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:155 > nextUpdateTime = std::max((1 / targetFPS) - (monotonicallyIncreasingTime() - m_lastUpdateTime), 0.0);
In a separate patch, we should change this m_lastUpdateTime to MonotonicTime and change nextUpdateTime to Seconds.
> Source/WebKit2/Shared/WebMemorySampler.cpp:91 > m_sampleTimer.startRepeating(1_s);
In a separate patch, we should chnage this initializeTimers's double to Seconds.
WebKit Commit Bot
Comment 10
2017-04-10 01:02:26 PDT
Comment on
attachment 306661
[details]
Patch Clearing flags on attachment: 306661 Committed
r215173
: <
http://trac.webkit.org/changeset/215173
>
WebKit Commit Bot
Comment 11
2017-04-10 01:02:28 PDT
All reviewed patches have been landed. Closing bug.
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