-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1485896 [wpt PR 12665] - HTML: force layout in legend-dynamic-upd…
…ate.html, a=testonly Automatic update from web-platform-testsHTML: force layout in legend-dynamic-update.html -- wpt-commits: 1580d7706c8b19b79cfa9cfd465ef90d3394894f wpt-pr: 12665
- Loading branch information
1 parent
cd8b1b2
commit b5ddd28
Showing
2 changed files
with
11 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 10 additions & 1 deletion
11
...ts/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-dynamic-update.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
<!DOCTYPE html> | ||
<html class=reftest-wait> | ||
<title>legend and dynamic update</title> | ||
<link rel=fieldset-foo-ref.html> | ||
<p>There should be a normal fieldset below with the legend "Foo".</p> | ||
<fieldset> | ||
<legend>F</legend> | ||
</fieldset> | ||
<script> | ||
document.querySelector('legend').textContent += "oo"; | ||
const legend = document.querySelector('legend'); | ||
// force layout | ||
legend.offsetTop; | ||
requestAnimationFrame(() => { | ||
legend.textContent += "oo"; | ||
requestAnimationFrame(() => { | ||
document.documentElement.removeAttribute('class'); | ||
}); | ||
}); | ||
</script> |