Closed Bug 1763358 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 33531 - Use layout coordinates for LayoutClipRect of ClipPathClip and MaskClip

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
101 Branch
Tracking Status
firefox101 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Xianzhu Wang <wangxianzhu@chromium.org> wrote:

Use layout coordinates for LayoutClipRect of ClipPathClip and MaskClip

This is to ensure correct inclusive intersection for empty objects
with empty clip-path/mask. Previously, we failed to detect viewport
intersection and start loading a lazy loading \<img> which was empty
with an empty clip-path before the image was loaded.

A change (crrev.com/936552) from blink::EnclosingIntRect(FloatRect) to
gfx::ToEnclosingRect(gfx::RectF) exposed the issue. The difference
between the two functions was that for an empty input rect with
non-integral origin, the former returned an non-empty IntRect, while
the latter returns an empty gfx::Rect. An alternative to this CL is to
add a version of gfx::ToEnclosingRect() behaving the same as
blink::EnclosingIntRect(), but I think this CL is better by making
LayoutClipRect for ClipPathClip and MaskClip correct.

Bug: 1308299, 1248598
Change-Id: I242c1d38277cdd91aa596fda15156d991f2626d7

Reviewed-on: https://chromium-review.googlesource.com/3568746
WPT-Export-Revision: e9b964ec456fc7992c602212cd5f58249110821f

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

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

Total 2 tests

Status Summary

Firefox

PASS : 1
FAIL : 1

Chrome

TIMEOUT: 2

Safari

PASS : 1
FAIL : 1

Links

GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/html/semantics/embedded-content/the-img-element/image-loading-lazy-mask.html: FAIL (Chrome: TIMEOUT, Safari: FAIL)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2b2a7ed03b35
[wpt PR 33531] - Use layout coordinates for LayoutClipRect of ClipPathClip and MaskClip, a=testonly
https://hg.mozilla.org/integration/autoland/rev/268de405c456
[wpt PR 33531] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch
You need to log in before you can comment on or make changes to this bug.