-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[content-visibility] REGRESSION(267547@main): Blank panels on bing.co…
…m (content-visibility: auto) https://bugs.webkit.org/show_bug.cgi?id=264989 Reviewed by Simon Fraser. When content-visibility status changes from hidden/out of view to visible/in viewport we should use dirtyVisibleContentStatus since setHasVisibleContent has no effect on the subtree of the content-visibility root if the layer already has this flag set, causing the subtree to remain hidden. * LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-096-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-096.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-097-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-097.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-098-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-098.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-099-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-099.html: Added. * Source/WebCore/rendering/RenderElement.cpp: (WebCore::RenderElement::styleWillChange): Canonical link: https://commits.webkit.org/273399@main
- Loading branch information
Showing
9 changed files
with
360 additions
and
4 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
...eb-platform-tests/css/css-contain/content-visibility/content-visibility-096-expected.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,36 @@ | ||
<!doctype HTML> | ||
<html class="reftest-wait"> | ||
<meta charset="utf8"> | ||
<title>Content Visibility: auto, scroll away and back (Reference)</title> | ||
<link rel="author" title="Rob Buis" href="mailto:rbuis@igalia.com"> | ||
<link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> | ||
<script src="/common/reftest-wait.js"></script> | ||
|
||
<style> | ||
.spacer { | ||
height: 10000px; | ||
} | ||
#child { | ||
width: 100px; | ||
height: 100px; | ||
background: green; | ||
position: relative | ||
} | ||
#target { | ||
width: 10px; | ||
height: 10px; | ||
} | ||
|
||
</style> | ||
|
||
<div> | ||
<div id=child></div> | ||
</div> | ||
<div class=spacer></div> | ||
<div id=target></div> | ||
|
||
<script> | ||
requestAnimationFrame(takeScreenshot); | ||
</script> | ||
|
||
</html> |
56 changes: 56 additions & 0 deletions
56
...ted/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-096.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,56 @@ | ||
<!doctype HTML> | ||
<html class="reftest-wait"> | ||
<meta charset="utf8"> | ||
<title>Content Visibility: auto, scroll away and back</title> | ||
<link rel="author" title="Rob Buis" href="mailto:rbuis@igalia.com"> | ||
<link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> | ||
<link rel="match" href="content-visibility-096-ref.html"> | ||
<meta name="assert" content="scolling away from c-v: auto container and back renders as expected"> | ||
<script src="/common/reftest-wait.js"></script> | ||
|
||
<style> | ||
.spacer { | ||
height: 10000px; | ||
} | ||
#child { | ||
width: 100px; | ||
height: 100px; | ||
background: green; | ||
position: relative | ||
} | ||
#target { | ||
width: 10px; | ||
height: 10px; | ||
} | ||
.auto { content-visibility: auto; } | ||
|
||
</style> | ||
|
||
<div class="auto"> | ||
<div id=child></div> | ||
</div> | ||
<div class=spacer></div> | ||
<div id=target></div> | ||
|
||
<script> | ||
|
||
function runTest() { | ||
document.getElementById("target").scrollIntoView(true /* alignToTop */); | ||
requestAnimationFrame(finishTest); | ||
} | ||
|
||
function finishTest() { | ||
scrollTo(0, 0); | ||
requestAnimationFrame(takeScreenshot); | ||
} | ||
|
||
window.onload = requestAnimationFrame(() => { | ||
requestAnimationFrame(() => { | ||
requestAnimationFrame(() => { | ||
runTest(); | ||
}); | ||
}); | ||
}); | ||
|
||
</script> | ||
</html> |
36 changes: 36 additions & 0 deletions
36
...eb-platform-tests/css/css-contain/content-visibility/content-visibility-097-expected.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,36 @@ | ||
<!doctype HTML> | ||
<html class="reftest-wait"> | ||
<meta charset="utf8"> | ||
<title>Content Visibility: auto, scroll away and back (Reference)</title> | ||
<link rel="author" title="Rob Buis" href="mailto:rbuis@igalia.com"> | ||
<link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> | ||
<script src="/common/reftest-wait.js"></script> | ||
|
||
<style> | ||
.spacer { | ||
height: 10000px; | ||
} | ||
#child { | ||
width: 100px; | ||
height: 100px; | ||
background: green; | ||
position: relative | ||
} | ||
#target { | ||
width: 10px; | ||
height: 10px; | ||
} | ||
|
||
</style> | ||
|
||
<div> | ||
<div id=child></div> | ||
</div> | ||
<div class=spacer></div> | ||
<div id=target></div> | ||
|
||
<script> | ||
requestAnimationFrame(takeScreenshot); | ||
</script> | ||
|
||
</html> |
60 changes: 60 additions & 0 deletions
60
...ted/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-097.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,60 @@ | ||
<!doctype HTML> | ||
<html class="reftest-wait"> | ||
<meta charset="utf8"> | ||
<title>Content Visibility: auto, scroll away and back while toggling visibility</title> | ||
<link rel="author" title="Rob Buis" href="mailto:rbuis@igalia.com"> | ||
<link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> | ||
<link rel="match" href="content-visibility-097-ref.html"> | ||
<meta name="assert" content="scolling away from c-v: auto container and back while toggling visibility renders as expected"> | ||
<script src="/common/reftest-wait.js"></script> | ||
|
||
<style> | ||
.spacer { | ||
height: 10000px; | ||
} | ||
#child { | ||
width: 100px; | ||
height: 100px; | ||
background: green; | ||
position: relative | ||
} | ||
#target { | ||
width: 10px; | ||
height: 10px; | ||
} | ||
</style> | ||
|
||
<div id="container" style="content-visibility: auto"> | ||
<div id=child></div> | ||
</div> | ||
<div class=spacer></div> | ||
<div id=target></div> | ||
|
||
<script> | ||
|
||
function step1() { | ||
document.getElementById("target").scrollIntoView(true /* alignToTop */); | ||
requestAnimationFrame(step2); | ||
} | ||
|
||
function step2() { | ||
container.style.visibility = "hidden"; | ||
requestAnimationFrame(finishTest); | ||
} | ||
|
||
function finishTest() { | ||
container.setAttribute("style", "content-visibility: visible; visibility: visible"); | ||
window.scrollTo(0, 0); | ||
requestAnimationFrame(takeScreenshot); | ||
} | ||
|
||
window.onload = requestAnimationFrame(() => { | ||
requestAnimationFrame(() => { | ||
requestAnimationFrame(() => { | ||
step1(); | ||
}); | ||
}); | ||
}); | ||
|
||
</script> | ||
</html> |
17 changes: 17 additions & 0 deletions
17
...eb-platform-tests/css/css-contain/content-visibility/content-visibility-098-expected.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,17 @@ | ||
<!doctype HTML> | ||
<html> | ||
<meta charset="utf8"> | ||
<title>CSS Content Visibility: container (reference)</title> | ||
<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"> | ||
<link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> | ||
|
||
<style> | ||
#container { | ||
width: 150px; | ||
height: 150px; | ||
background: lightblue; | ||
} | ||
</style> | ||
|
||
<div id=container></div> | ||
|
52 changes: 52 additions & 0 deletions
52
...ted/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-098.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,52 @@ | ||
<!doctype HTML> | ||
<html class="reftest-wait"> | ||
<meta charset="utf8"> | ||
<title>Content Visibility: auto subtree becomes hidden in the viewport</title> | ||
<link rel="author" title="Rob Buis" href="mailto:rbuis@igalia.org"> | ||
<link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> | ||
<link rel="match" href="container-ref.html"> | ||
<meta name="assert" content="content-visibility:auto subtree becomes hidden (through both c-v and visibility properties) and so stops painting"> | ||
<script src="/common/reftest-wait.js"></script> | ||
|
||
<style> | ||
#container { | ||
width: 150px; | ||
height: 150px; | ||
background: lightblue; | ||
} | ||
#child { | ||
width: 50px; | ||
height: 50px; | ||
background: red; | ||
} | ||
#autocontainer { content-visibility: auto; } | ||
|
||
</style> | ||
|
||
<div id=container> | ||
<div id="autocontainer"> | ||
Test fails if you see this text or a red box. | ||
<div id=child></div> | ||
</div> | ||
</div> | ||
|
||
<script> | ||
|
||
function runTest() { | ||
document.getElementById("autocontainer").classList.remove("auto"); | ||
document.getElementById("autocontainer").classList.add("hidden"); | ||
document.getElementById("autocontainer").style.visibility = "hidden"; | ||
|
||
requestAnimationFrame(takeScreenshot); | ||
} | ||
|
||
window.onload = requestAnimationFrame(() => { | ||
requestAnimationFrame(() => { | ||
requestAnimationFrame(() => { | ||
runTest(); | ||
}); | ||
}); | ||
}); | ||
|
||
</script> | ||
</html> |
37 changes: 37 additions & 0 deletions
37
...eb-platform-tests/css/css-contain/content-visibility/content-visibility-099-expected.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,37 @@ | ||
<!doctype HTML> | ||
<html class="reftest-wait"> | ||
<meta charset="utf8"> | ||
<title>Content Visibility: auto, make unskipped, then skipped while also toggling visibility (Reference)</title> | ||
<link rel="author" title="Rob Buis" href="mailto:rbuis@igalia.com"> | ||
<link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> | ||
<script src="/common/reftest-wait.js"></script> | ||
|
||
<style> | ||
.spacer { | ||
height: 10000px; | ||
} | ||
#child { | ||
width: 100px; | ||
height: 0px; | ||
background: green; | ||
position: relative | ||
} | ||
#target { | ||
width: 10px; | ||
height: 10px; | ||
} | ||
|
||
</style> | ||
|
||
<div> | ||
<div id=child></div> | ||
</div> | ||
<div class=spacer></div> | ||
<div id=target></div> | ||
|
||
<script> | ||
document.getElementById("target").scrollIntoView(true /* alignToTop */); | ||
requestAnimationFrame(takeScreenshot); | ||
</script> | ||
|
||
</html> |
59 changes: 59 additions & 0 deletions
59
...ted/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-099.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,59 @@ | ||
<!doctype HTML> | ||
<html class="reftest-wait"> | ||
<meta charset="utf8"> | ||
<title>Content Visibility: auto, make unskipped, then skipped while also toggling visibility</title> | ||
<link rel="author" title="Rob Buis" href="mailto:rbuis@igalia.com"> | ||
<link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> | ||
<link rel="match" href="content-visibility-099-ref.html"> | ||
<meta name="assert" content="making c-v: auto container unskipped and then skipped while toggling visibility renders as expected"> | ||
<script src="/common/reftest-wait.js"></script> | ||
|
||
<style> | ||
.spacer { | ||
height: 10000px; | ||
} | ||
#child { | ||
width: 100px; | ||
height: 100px; | ||
background: green; | ||
position: relative | ||
} | ||
#target { | ||
width: 10px; | ||
height: 10px; | ||
} | ||
</style> | ||
|
||
<div id="container" style="content-visibility: auto"> | ||
<div id=child></div> | ||
</div> | ||
<div class=spacer></div> | ||
<div id=target></div> | ||
|
||
<script> | ||
|
||
function step1() { | ||
target.focus(); | ||
requestAnimationFrame(step2); | ||
} | ||
|
||
function step2() { | ||
document.getElementById("target").scrollIntoView(true /* alignToTop */); | ||
requestAnimationFrame(finishTest); | ||
} | ||
|
||
function finishTest() { | ||
container.setAttribute("style", "content-visibility: hidden; visibility: hidden"); | ||
requestAnimationFrame(takeScreenshot); | ||
} | ||
|
||
window.onload = requestAnimationFrame(() => { | ||
requestAnimationFrame(() => { | ||
requestAnimationFrame(() => { | ||
step1(); | ||
}); | ||
}); | ||
}); | ||
|
||
</script> | ||
</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