Closed Bug 1681599 Opened 4 years ago Closed 4 years ago

[wpt-sync] Sync PR 26827 - Reland "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: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

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

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

This includes a fix to the original patch and a new test

Original change's description:

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

This patch ensures that we use a pre-margin version 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: Icdc333dc60e6892783f59260d59eca682a3fc7e5
Reviewed-on: https://chromium-review.googlesource.com/2583083
WPT-Export-Revision: 900e0fc01c719151d6c44c25ef38ecd7236c854b

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/edf48134c1dd [wpt PR 26827] - Reland "IO: Use pre-margin target rect for an empty check for intersection threshold", a=testonly
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
You need to log in before you can comment on or make changes to this bug.