mirror of
https://github.com/servo/servo.git
synced 2025-09-19 11:20:09 +01:00
layout: Gracefully handle script queries on nodes with uninvertible transforms (#39075)
Instead of panicking when doing a geometry script query on a node with an uninvertible transform, return a zero-sized rectangle at the untransformed position. This is similar to what Gecko and Blink do (though it seems there are some differences in positioning this zero-sized rectangle). Mostly importantly, do not panic. Testing: This change adds a new WPT crash test. Fixes: #38848. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
4de84b0ca5
commit
efe9ea2306
4 changed files with 53 additions and 6 deletions
7
tests/wpt/meta/MANIFEST.json
vendored
7
tests/wpt/meta/MANIFEST.json
vendored
|
@ -5819,6 +5819,13 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"uninvertible-transform-and-script-queries.html": [
|
||||
"8a3c88fcb8ade4038ba47a347cf3a5375d521bd4",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"w-crossing-zero-001.html": [
|
||||
"64ba0e85f24d501e4115d7e697052acb3a84f27a",
|
||||
[
|
||||
|
|
16
tests/wpt/tests/css/css-transforms/crashtests/uninvertible-transform-and-script-queries.html
vendored
Normal file
16
tests/wpt/tests/css/css-transforms/crashtests/uninvertible-transform-and-script-queries.html
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<link rel="help" href="https://github.com/servo/servo/issues/38848">
|
||||
|
||||
<div style="transform: scale(0)">
|
||||
<img style="height: 200px; width: 200px; border: solid;" id="img">
|
||||
<div style="height: 200px; width: 200px; border: solid;" id="div"></div>
|
||||
</div>
|
||||
<script>
|
||||
div.getBoundingClientRect();
|
||||
div.getClientRects();
|
||||
img.getBoundingClientRect();
|
||||
img.getClientRects();
|
||||
img.height;
|
||||
img.width;
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue