Closed Bug 2073671 Opened 2 months ago Closed 2 months ago

[wpt-sync] Sync PR 62799 - [html-in-canvas] Add support for hit test clip rect

Categories

(Core :: Graphics: Canvas2D, task, P4)

task

Tracking

()

RESOLVED FIXED
158 Branch
Tracking Status
firefox158 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Attachments

(1 file)

Sync web-platform-tests PR 62799 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/62799
Details from upstream follow.

Philip Rogers <pdr@chromium.org> wrote:

[html-in-canvas] Add support for hit test clip rect

This patch adds support for a hit test clip rect. It adds a 2d rect to
UpdateElementGeometryOptions, and automatically sets it based on the
src rect parameters when using drawElementImage with default options.
FloatClipRect is used which supports an infinite clip rect for the
no-clip state, so the code largely mirrors the canvas transform code.
Similar to CSS clip-path, the canvas clip affects hit testing,
including APIs like elementsFromPoint, but does not affect geometry
APIs like getBoundingClientRect. In the future we may support
expanding this clip to be a path and to include the current context's
clip, but for now it is only set based on the src rect parameters.

Fixed: 556756510
Change-Id: I2f12309991a2ca999193220543d1e270a72735d5
Reviewed-on: https://chromium-review.googlesource.com/8413537
WPT-Export-Revision: aad565c1640bfa3bd3baf95444348a941673cd97

Component: web-platform-tests → Graphics: Canvas2D
Product: Testing → Core
Attached file Notable wpt changes —

CI Results

Ran 4 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 135 tests and 6 subtests

Status Summary

Firefox

OK : 3[GitHub] 127[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS : 1[GitHub] 12[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL : 35[GitHub] 214[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
TIMEOUT: 1
ERROR : 5
NOTRUN : 17

Chrome

OK : 2
PASS : 3
FAIL : 24
TIMEOUT: 2
NOTRUN : 8

Safari

OK : 3
PASS : 1
FAIL : 35

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

(See attachment for full changes)

Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 158 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: