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/c/chromium/src/+/2583083 Auto-Submit: vmpstr <vmpstr@chromium.org> Reviewed-by:Stefan Zager <szager@chromium.org> Commit-Queue: vmpstr <vmpstr@chromium.org> Cr-Commit-Position: refs/heads/master@{#835658}
Showing
Please register or sign in to comment