Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<link rel="author" href="mailto:mrobinson@igalia.com.org">
<title>CSS OM View Test: HTMLImageElement's 'x' and 'y' property values should ignore transforms</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
.transformed {
transform: translate(40px, 40px);
}
</style>
<div id="container">
<img id="image" src="/images/green.png">
</div>
<script>
test(() => {
const unTransformedX = image.x;
const unTransformedY = image.y;
container.classList.add("transformed");
assert_equals(unTransformedX, image.x);
assert_equals(unTransformedY, image.y);
}, `HTMLImageElement's 'x' and 'y' property values ignore transforms`);
</script>