Closed Bug 1681394 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 26807 - IO: Use pre-margin target rect for an empty check for intersection threshold

Categories

(Core :: Layout, task, P4)

task

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

b'Vladimir Levin <vmpstr@chromium.org>' wrote:

IO: Use pre-margin target rect for an empty check for intersection threshold

This patch ensures that we use a pre-margin versio of the target rect
if we are checking whether it was empty. This is to make sure that we
compute a "1" intersection ratio in cases where an ancestor of a
margin-padded target causes it to be empty.

In this case, we should report 1 intersection, because we are intersecting
and target is an empty rect. However, because we padded the target
with a margin, we ended up doing the wrong check and ultimately compute
0 intersection in a different conditional branch (before this patch).

This patch restores correct behavior.

R=szager@chromium.org, chrishtr@chromium.org
Fixed: 1156815

Change-Id: I1697388dd127737a0203d1c3ff15095de4ab41df

Reviewed-on: https://chromium-review.googlesource.com/2580046
WPT-Export-Revision: 395ae00286e2eb77eb8542dca1cdf7944c194408

Component: web-platform-tests → Layout
Product: Testing → Core

CI Results

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

Total 1 tests

Status Summary

Firefox

PASS: 1

Chrome

FAIL: 1

Safari

PASS: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a4b1b9d46874
[wpt PR 26807] - IO: Use pre-margin target rect for an empty check for intersection threshold, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
You need to log in before you can comment on or make changes to this bug.