NEW 240779
[compat] loadededdata event should be fired once the current frame has been displayed.
https://bugs.webkit.org/show_bug.cgi?id=240779
Summary [compat] loadededdata event should be fired once the current frame has been d...
Jean-Yves Avenard [:jya]
Reported 2022-05-22 17:55:08 PDT
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.
Attachments
Radar WebKit Bug Importer
Comment 1 2022-05-22 17:55:30 PDT
Note You need to log in before you can comment on or make changes to this bug.