Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #18696 - emilio:ua-sheets-reflow, r=jdm
layout_thread: Avoid adding the UA sheets multiple times when there's no root flow. <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18696) <!-- Reviewable:end -->
- Loading branch information
Showing
3 changed files
with
42 additions
and
16 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
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
16 changes: 16 additions & 0 deletions
16
tests/wpt/mozilla/tests/mozilla/first-reflow-sheet-assert.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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<title>Issue 18631: Assertion failure when double-adding the UA sheets to the page</title> | ||
<style> | ||
* { display: none } | ||
</style> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script> | ||
// Trigger two forced reflows. | ||
test(function() { | ||
document.documentElement.offsetTop; | ||
document.documentElement.offsetTop; | ||
assert_true(true, "Didn't assert"); | ||
}, "Passes if it doesn't assert"); | ||
</script> |