Skip to content

Commit ef384fe

Browse files
Sergey Poromovjgraham
Sergey Poromov
authored andcommitted
Bug 1564658 [wpt PR 17553] - Revert "[PW] Fix paint worklet canvas clip bound calculation", a=testonly
Automatic update from web-platform-tests Revert "[PW] Fix paint worklet canvas clip bound calculation" This reverts commit aa7c84555637cabd3fdb0c03d781cc6f72b9efa2. Reason for revert: virtual/scalefactor200/external/wpt/css/css-paint-api/hidpi/canvas-transform.https.html test fails on WebKit Mac10.13 (retina). This test consistently fails starting from https://ci.chromium.org/p/chromium/builders/ci/WebKit%20Mac10.13%20%28retina%29/16135 Original change's description: > [PW] Fix paint worklet canvas clip bound calculation > > Right now when we initialize the paint canvas for paint worklet with a > scale factor or browser zoom, we do not record the zoom factor in the > canvas transform. As a result, when computing the clip bound we will > apply the wrong transformation matrix and thus sometimes the contents > can be completely clipped out while it should not. > > This CL fixes the problem and adds a layout test. > > Bug: 970783 > Change-Id: Ie3709ea5845ca2b405245d4b36f9fe8f99052bad > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1678287 > Reviewed-by: Stephen McGruer > Commit-Queue: Xida Chen > Cr-Commit-Position: refs/heads/master@{#672722} [email protected],[email protected] Change-Id: I6c6710f76ba204c2db9d90be56845c04ff072a54 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 970783 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1679696 Reviewed-by: Sergey Poromov Commit-Queue: Sergey Poromov Cr-Commit-Position: refs/heads/master@{#672870} -- wpt-commits: 0804e0fcb5033df46553c9e245ffd4abbf122cf2 wpt-pr: 17553
1 parent 1ef38c3 commit ef384fe

File tree

4 files changed

+9
-137
lines changed

4 files changed

+9
-137
lines changed

testing/web-platform/tests/css/css-paint-api/hidpi/canvas-transform-ref.html

Lines changed: 0 additions & 22 deletions
This file was deleted.

testing/web-platform/tests/css/css-paint-api/hidpi/canvas-transform.https.html

Lines changed: 0 additions & 43 deletions
This file was deleted.

testing/web-platform/tests/shape-detection/detection-HTMLVideoElement-invalid-state.html

Lines changed: 0 additions & 50 deletions
This file was deleted.

testing/web-platform/tests/shape-detection/shapedetection-cross-origin.sub.html

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
img.src = IMAGE_URL;
3131
await imgWatcher.wait_for("load");
3232
const detector = crossOriginTest.createDetector();
33-
await promise_rejects(t, "SecurityError", detector.detect(img));
34-
}, `${crossOriginTest.detectorType} should reject cross-origin \
35-
HTMLImageElements with a SecurityError.`);
33+
promise_rejects(t, "SecurityError", detector.detect(img));
34+
}, crossOriginTest.detectorType
35+
+ " should reject cross-origin HTMLImageElements with a SecurityError.");
3636

3737
// Verifies that Detector rejects a cross-origin ImageBitmap.
3838
promise_test(async t => {
@@ -42,9 +42,9 @@
4242
await imgWatcher.wait_for("load");
4343
const imgBitmap = await createImageBitmap(img);
4444
const detector = crossOriginTest.createDetector();
45-
await promise_rejects(t, "SecurityError", detector.detect(imgBitmap));
46-
}, `${crossOriginTest.detectorType} should reject cross-origin \
47-
ImageBitmaps with a SecurityError.`);
45+
promise_rejects(t, "SecurityError", detector.detect(imgBitmap));
46+
}, crossOriginTest.detectorType
47+
+ " should reject cross-origin ImageBitmaps with a SecurityError.");
4848

4949
// Verifies that Detector rejects a cross-origin HTMLVideoElement.
5050
promise_test(async t => {
@@ -53,22 +53,9 @@
5353
video.src = VIDEO_URL;
5454
await videoWatcher.wait_for("loadeddata");
5555
const detector = crossOriginTest.createDetector();
56-
await promise_rejects(t, "SecurityError", detector.detect(video));
57-
}, `${crossOriginTest.detectorType} should reject cross-origin \
58-
HTMLVideoElements with a SecurityError.`);
59-
60-
// Verifies that Detector rejects a cross-origin HTMLCanvasElement.
61-
promise_test(async t => {
62-
const img = new Image();
63-
const imgWatcher = new EventWatcher(t, img, ["load", "error"]);
64-
img.src = IMAGE_URL;
65-
await imgWatcher.wait_for("load");
66-
const canvas = document.createElement("canvas");
67-
canvas.getContext("2d").drawImage(img, 0, 0);
68-
const detector = crossOriginTest.createDetector();
69-
await promise_rejects(t, "SecurityError", detector.detect(canvas));
70-
}, `${crossOriginTest.detectorType} should reject cross-origin \
71-
HTMLCanvasElement with a SecurityError.`);
56+
promise_rejects(t, "SecurityError", detector.detect(video));
57+
}, crossOriginTest.detectorType
58+
+ " should reject cross-origin HTMLVideoElements with a SecurityError.");
7259

7360
}
7461

0 commit comments

Comments
 (0)