[Webkit-unassigned] [Bug 240779] New: [compat] loadededdata event should be fired once the current frame has been displayed.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun May 22 17:55:08 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=240779

            Bug ID: 240779
           Summary: [compat] loadededdata event should be fired once the
                    current frame has been displayed.
           Product: WebKit
           Version: Other
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Media
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: jean-yves.avenard at apple.com

similar to bug 236755.

Consider the following code:

```
    function loadeddata()
    {
        if (!modified) {
            canvas = document.createElement("canvas");
            canvas.width = 2.5 * video.videoWidth;
            canvas.height = 2.5 * video.videoHeight;
            document.body.appendChild(canvas);

            context = canvas.getContext("2d");
            context.fillStyle = context.createPattern(video, "repeat");

            video.src = findMediaFile("video", "../../media/content/counting");
            modified = !modified;
        } else {
            context.fillRect(0, 0, canvas.width, canvas.height);

            expectedResults.forEach(function(element) {
                checkPixels(context, element[0], element[1], element[2], element[3], element[4], videoCanvasPixelComparisonTolerance());
            });

            finishJSTest();
        }
    }
```
(from LayoutTests/fast/canvas/canvas-createPattern-video-modify.html)

This waits for the loadeddata event to read the canvas. However it will intermittently read black because the frame hasn't been painted.

Loadeddata should be fired only once a frame has been painted.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220523/3b116fae/attachment.htm>


More information about the webkit-unassigned mailing list