mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #14845 - jdm:restyle-ood, r=emilio
Avoid restyling elements that aren't in a document - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #14480 - [X] There are tests for these changes <!-- 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/14845) <!-- Reviewable:end -->
This commit is contained in:
commit
2fe914e2fa
5 changed files with 49 additions and 3 deletions
|
@ -6438,6 +6438,18 @@
|
|||
"url": "/_mozilla/mozilla/iframe/resize_after_load.html"
|
||||
}
|
||||
],
|
||||
"mozilla/restyle-out-of-document.html": [
|
||||
{
|
||||
"path": "mozilla/restyle-out-of-document.html",
|
||||
"references": [
|
||||
[
|
||||
"/_mozilla/mozilla/restyle-out-of-document-ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
"url": "/_mozilla/mozilla/restyle-out-of-document.html"
|
||||
}
|
||||
],
|
||||
"mozilla/scrolling_div_background_borders.html": [
|
||||
{
|
||||
"path": "mozilla/scrolling_div_background_borders.html",
|
||||
|
@ -21732,6 +21744,18 @@
|
|||
"url": "/_mozilla/mozilla/iframe/resize_after_load.html"
|
||||
}
|
||||
],
|
||||
"mozilla/restyle-out-of-document.html": [
|
||||
{
|
||||
"path": "mozilla/restyle-out-of-document.html",
|
||||
"references": [
|
||||
[
|
||||
"/_mozilla/mozilla/restyle-out-of-document-ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
"url": "/_mozilla/mozilla/restyle-out-of-document.html"
|
||||
}
|
||||
],
|
||||
"mozilla/scrolling_div_background_borders.html": [
|
||||
{
|
||||
"path": "mozilla/scrolling_div_background_borders.html",
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<span>Visible content.</span>
|
13
tests/wpt/mozilla/tests/mozilla/restyle-out-of-document.html
Normal file
13
tests/wpt/mozilla/tests/mozilla/restyle-out-of-document.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Verify that dirtying an element and removing it from the document before it's restyled doesn't mess up layout</title>
|
||||
<link rel='match' href='restyle-out-of-document-ref.html'>
|
||||
<div><strong>Removed content.</strong></div>
|
||||
<span>Visible content.</span>
|
||||
<script>
|
||||
addEventListener('load', function() {
|
||||
var d = document.querySelector('div');
|
||||
d.firstChild.style.display = "none";
|
||||
d.remove();
|
||||
}, true);
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue