Commit 4a72139a authored by Koji Ishii's avatar Koji Ishii Committed by Commit Bot

Add test for hit-testing floats in relatively positioned inline

This tests the change reverted at r825301 <crrev.com/c/2525882>.

Bug: 1146797
Change-Id: Ibf5c0601efead3d9f31204c866458c5793af8dca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2526743Reviewed-by: default avatarIan Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#825370}
parent 98308108
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/cssom-view/#dom-document-elementfrompoint" />
<link rel="help" href="https://crbug.com/1146797">
<link rel="author" title="Koji Ishii" href="mailto:kojii@chromium.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<div>
<span style="position: relative">
<span>
<a id="target" href="#" style="float: left">link</a>
</span>
</span>
</div>
<script>
test(() => {
let target = document.getElementById('target');
let bounds = target.getBoundingClientRect();
let result = document.elementFromPoint(bounds.left + 1, bounds.top + 1);
assert_equals(result, target);
});
</script>
</body>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment