mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-13 20:14:57 -10:00
Automatic update from web-platform-tests Make TransformState::Move accumulate into existing transform more often. The substantive change here is the removal of the test of accumulating_transform_ in TransformState::Move. At least when direction_ is kApplyTransformDirection, optimizing away the modification to the existing transform into a move is not safe. The remainder of the code changes are removing accumulating_transform_, since its remaining uses are all in DCHECK()s and its meaning is somewhat unclear. It's not clear whether it's intended to be an indicator for whether accumulated_transform_ would be non-null were it not for the caching optimization in TransformState::FlattenWithTransform, or whether it's an indication of the state of flattening or preserve-3d. Without the code change here, virtual/transform-interop-disabled/external/wpt/css/css-transforms/transform-getBoundingClientRect-001.html fails (with 75 rather than 125), but external/wpt/css/css-transforms/transform-getBoundingClientRect-001.html passes both with and without the change. Bug: 1247858 Change-Id: Id32a11b2bf66757b0dbbab251c598222f9d120a7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3152179 Reviewed-by: Xianzhu Wang <[email protected]> Commit-Queue: David Baron <[email protected]> Cr-Commit-Position: refs/heads/main@{#920070} -- wpt-commits: d5bc1f8e51fecfc2f359b0c811050593abb11dfa wpt-pr: 30492
42 lines
1.0 KiB
HTML
42 lines
1.0 KiB
HTML
<meta charset=UTF-8>
|
|
<title>CSS Test: transform and getBoundingClientRect</title>
|
|
<link rel="author" title="L. David Baron" href="https://dbaron.org/">
|
|
<link rel="author" title="Google" href="http://www.google.com/">
|
|
<link rel="help" href="https://drafts.csswg.org/css-transforms-1/#transform-property">
|
|
<link rel="help" href="https://drafts.csswg.org/cssom-view/#extension-to-the-element-interface">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
}
|
|
|
|
div {
|
|
height: 100px;
|
|
width: 100px;
|
|
}
|
|
|
|
#outer {
|
|
transform: translate(100px, 100px);
|
|
}
|
|
|
|
#inner {
|
|
transform: scale(0.5);
|
|
transform-origin: center;
|
|
}
|
|
</style>
|
|
|
|
<div id="outer">
|
|
<div>
|
|
<div id="inner"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
test(function() {
|
|
let bcr = document.getElementById("inner").getBoundingClientRect();
|
|
assert_equals(bcr.x, 125);
|
|
assert_equals(bcr.y, 125);
|
|
}, "correct getBoundingClientRect() result within set of transforms");
|
|
</script>
|