Bug 50024 - [WK2] Support repeating timers
Summary: [WK2] Support repeating timers
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-24 07:51 PST by Balazs Kelemen
Modified: 2010-11-29 11:45 PST (History)
0 users

See Also:


Attachments
Patch (2.33 KB, patch)
2010-11-24 07:57 PST, Balazs Kelemen
no flags Details | Formatted Diff | Diff
Patch (6.30 KB, patch)
2010-11-26 07:09 PST, Balazs Kelemen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Balazs Kelemen 2010-11-24 07:51:29 PST
Our RunLoop::Timer implementation lacks support for repeating timers. Let's fix this.
Comment 1 Balazs Kelemen 2010-11-24 07:57:15 PST
Created attachment 74760 [details]
Patch
Comment 2 Andreas Kling 2010-11-24 13:19:28 PST
Comment on attachment 74760 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=74760&action=review

> WebKit2/Platform/qt/RunLoopQt.cpp:116
> +    ASSERT(!repeatInterval || nextFireInterval == repeatInterval);

Hmm. This seems mysterious. Will nextFireInterval always == repeatInterval for repeat timers?
If so, this function should be changed to take a "bool isSingleShot" instead of a second interval IMO.
Comment 3 Balazs Kelemen 2010-11-25 07:15:01 PST
(In reply to comment #2)
> (From update of attachment 74760 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=74760&action=review
> 
> > WebKit2/Platform/qt/RunLoopQt.cpp:116
> > +    ASSERT(!repeatInterval || nextFireInterval == repeatInterval);
> 
> Hmm. This seems mysterious. Will nextFireInterval always == repeatInterval for repeat timers?
> If so, this function should be changed to take a "bool isSingleShot" instead of a second interval IMO.

Right. I would not like to touch the common part, but that was not the right
decision.
Comment 4 Balazs Kelemen 2010-11-25 16:30:50 PST
Should be fixed on Windows as well.
Comment 5 Balazs Kelemen 2010-11-26 07:09:36 PST
Created attachment 74938 [details]
Patch
Comment 6 Balazs Kelemen 2010-11-29 11:44:55 PST
Comment on attachment 74938 [details]
Patch

Clearing flags on attachment: 74938

Committed r72816: <http://trac.webkit.org/changeset/72816>
Comment 7 Balazs Kelemen 2010-11-29 11:45:04 PST
All reviewed patches have been landed.  Closing bug.