4 Test for bug
1371955: We don't incorrectly think that a table wrapper style
5 is the main table element style.
7 <link rel=
"author" href=
"mailto:emilio@crisal.io" title=
"Emilio Cobos Álvarez">
8 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
10 /* Test implicitly ::before and ::after too */
11 span::before, span::after {
16 <table id=
"realTable" style=
"margin: 10px"></table>
17 <span id=
"spanTable" style=
"display: table; padding: 10px;"></span>
19 SimpleTest
.waitForExplicitFinish();
20 const utils
= SpecialPowers
.getDOMWindowUtils(window
);
21 document
.documentElement
.offsetTop
;
22 for (const element
of [realTable
, spanTable
]) {
23 const previousReflowCount
= utils
.framesReflowed
;
24 const previousRestyleGeneration
= utils
.restyleGeneration
;
25 element
.style
.color
= "blue";
26 document
.documentElement
.offsetTop
;
27 isnot(previousRestyleGeneration
, utils
.restyleGeneration
,
28 "We should have restyled");
29 is(previousReflowCount
, utils
.framesReflowed
,
30 "We shouldn't have reflowed");