Bug 211431 - [Win] Implement DisplayRefreshMonitor by using RunLoop::Timer
Summary: [Win] Implement DisplayRefreshMonitor by using RunLoop::Timer
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Windows 10
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-05-04 21:14 PDT by Pavel Feldman
Modified: 2020-05-11 11:24 PDT (History)
11 users (show)

See Also:


Attachments
Patch (8.82 KB, patch)
2020-05-06 17:29 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (8.86 KB, patch)
2020-05-06 18:14 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Feldman 2020-05-04 21:14:54 PDT
Creating a simple CSS animation fires random rafs every 2-20ms. In some of these rafs animated element is not moving. See console for the following snippet:

<style>button { transition: margin 500ms linear 0s; margin-left: 0; }</style>
<button id=button>Hello</button>

<script>
requestAnimationFrame(foo);
let lastFrame = performance.now();
function foo(time) {
  console.log(time - lastFrame);
  lastFrame = time;
  console.log(button.getBoundingClientRect().x);
  if (button.getBoundingClientRect().x < 100)
    requestAnimationFrame(foo);
}
setTimeout(() => {
  button.style.marginLeft = "100px";
});
</script>
Comment 1 Fujii Hironori 2020-05-06 17:29:47 PDT
Created attachment 398686 [details]
Patch
Comment 2 Fujii Hironori 2020-05-06 18:14:50 PDT
Created attachment 398690 [details]
Patch
Comment 3 Don Olmstead 2020-05-06 19:06:09 PDT
Comment on attachment 398690 [details]
Patch

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

r=me

> Source/WTF/wtf/PlatformUse.h:190
>  #define USE_REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR 1

There going to be a followup that removes references to this USE statement?
Comment 4 Fujii Hironori 2020-05-06 19:51:07 PDT
Comment on attachment 398690 [details]
Patch

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

>> Source/WTF/wtf/PlatformUse.h:190
>>  #define USE_REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR 1
> 
> There going to be a followup that removes references to this USE statement?

Yup.
Comment 5 Fujii Hironori 2020-05-06 20:41:17 PDT
Comment on attachment 398690 [details]
Patch

Clearing flags on attachment: 398690

Committed r261264: <https://trac.webkit.org/changeset/261264>
Comment 6 Fujii Hironori 2020-05-06 20:41:20 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2020-05-06 20:42:21 PDT
<rdar://problem/62959022>