Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(797)

Unified Diff: third_party/WebKit/LayoutTests/compositing/overflow/non-composited-sticky-element-in-main-thread-scrolled-composited-ancestor-expected.html

Issue 2845613002: Fix the bug that sticky element may not be correctly invalidated due to non-promotion (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/compositing/overflow/non-composited-sticky-element-in-main-thread-scrolled-composited-ancestor-expected.html
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/non-composited-sticky-element-in-main-thread-scrolled-composited-ancestor-expected.html b/third_party/WebKit/LayoutTests/compositing/overflow/non-composited-sticky-element-in-main-thread-scrolled-composited-ancestor-expected.html
new file mode 100644
index 0000000000000000000000000000000000000000..086e59b0b2c838c61a55f90aca4b0b67c6856319
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/non-composited-sticky-element-in-main-thread-scrolled-composited-ancestor-expected.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<style>
+body {
+ margin: 0;
+}
+
+table {
+ background: red;
+}
+
+td, th {
+ height: 50px;
+ width: 50px;
+ padding: 0;
+}
+
+th {
+ background: green;
+ position: sticky;
+ top: 0px;
+}
+
+.scroller {
+ width: 100px;
+ height: 200px;
+}
+</style>
+
+<script>
+function doTest() {
+ for (let scroller of document.querySelectorAll('.scroller')) {
+ scroller.scrollTop = 200;
+ }
+}
+
+window.addEventListener('load', function() {
+ window.requestAnimationFrame(function() {
flackr 2017/04/26 15:21:00 There's no need to delay the scroll for the expect
yigu 2017/04/26 21:46:57 Done.
+ window.requestAnimationFrame(doTest);
+ })
+});
+</script>
+
+<div class="scroller">
+ <table>
+ <thead>
+ <tr><th></th></tr>
+ </thead>
+ <tbody>
+ <tr><td></td></tr>
+ <tr><td></td></tr>
+ <tr><td></td></tr>
+ <tr><td></td></tr>
+ </tbody>
+ </table>
+</div>

Powered by Google App Engine
This is Rietveld 408576698