forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1829016 - The size of content-visibility auto does not refresh wh…
…en its content changes, r=emilio Differential Revision: https://phabricator.services.mozilla.com/D183414
- Loading branch information
1 parent
9311915
commit 2183329
Showing
3 changed files
with
64 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
8 changes: 8 additions & 0 deletions
8
...ing/web-platform/tests/css/css-contain/content-visibility/content-visibility-085-ref.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,8 @@ | ||
<!doctype HTML> | ||
<html> | ||
<meta charset="utf8"> | ||
<title>CSS Content Visibility: auto with content changes</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> | ||
|
||
<p>Test passes if you see the word “PASS” below. | ||
<div>PASS</div> |
33 changes: 33 additions & 0 deletions
33
testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-085.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,33 @@ | ||
<!doctype HTML> | ||
<meta charset="utf8"> | ||
<title>CSS Content Visibility: auto with content changes</title> | ||
<link rel="author" title="Cathie Chen" href="mailto:[email protected]"> | ||
<link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> | ||
<link rel="match" href="content-visibility-079-ref.html"> | ||
<meta name="assert" content="content-visibility auto element should be resized when content changes"> | ||
|
||
<style> | ||
.auto { | ||
content-visibility: auto; | ||
width: fit-content; | ||
} | ||
.hidden { height: 0; } | ||
</style> | ||
|
||
<p>Test passes if you see the word “PASS” below. | ||
<div class="auto"> | ||
<div id ="target" class="hidden">PASS</div> | ||
</div> | ||
|
||
<script> | ||
function changeContent() { | ||
requestAnimationFrame(() => { | ||
target.classList.toggle("hidden"); | ||
}); | ||
} | ||
function runTest() { | ||
requestAnimationFrame(changeContent); | ||
} | ||
|
||
window.onload = () => { requestAnimationFrame(runTest); }; | ||
</script> |