4 https://bugzilla.mozilla.org/show_bug.cgi?id=1426594
7 <title>Test for Bug
1426594</title>
8 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
10 <script class=
"testbody" type=
"application/javascript">
11 SimpleTest.waitForExplicitFinish();
14 let textElement = document.getElementById(
"textId"),
15 textClientRect = textElement.getBoundingClientRect(),
16 tspanClientRect = document.getElementById(
"tspanId").getBoundingClientRect();
18 // TODO: tspan bounds should account for stroke, decorations and text-shadow
19 isfuzzy(textClientRect.width, tspanClientRect.width,
6,
"unexpected width");
20 isfuzzy(textClientRect.height, tspanClientRect.height,
6,
"unexpected height");
26 <body onload=
"runTests()">
27 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=589640">Mozilla Bug
1426594</a>
28 <svg height=
"1.5em" width=
"200px">
29 <text id=
"textId" y=
"1em"><tspan id=
"tspanId">ABCDEF
</tspan></text>
31 <div style=
"pointer-events: none; border: 1px solid red; position: absolute;