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

Unified Diff: third_party/WebKit/LayoutTests/compositing/overflow/composited-nested-sticky-table.html

Issue 2636253002: Handle nested position:sticky elements (Closed)
Patch Set: Rebase Created 3 years, 10 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/composited-nested-sticky-table.html
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/composited-nested-sticky-table.html b/third_party/WebKit/LayoutTests/compositing/overflow/composited-nested-sticky-table.html
new file mode 100644
index 0000000000000000000000000000000000000000..79d2df2cd04387c00f73c98c4f972fddb8dd608c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/composited-nested-sticky-table.html
@@ -0,0 +1,82 @@
+<script>
+if (window.testRunner)
+ testRunner.waitUntilDone();
+
+function doTest() {
+ finishTestInXFrames(2);
+}
+
+function finishTestInXFrames(frames) {
+ if (frames > 0) {
+ requestAnimationFrame(finishTestInXFrames.bind(null, frames - 1));
+ return;
+ }
+ finishTest();
+}
+
+function finishTest() {
+ document.querySelector('.scroller').scrollTop = 200;
+ if (window.testRunner)
+ testRunner.notifyDone();
+}
+
+window.addEventListener('load', doTest, false);
+</script>
+
+<style>
+body {
+ margin: 0;
+}
+
+table {
+ will-change: transform;
+
+ background: red;
+ border-collapse: collapse;
+}
+
+td, th {
+ height: 50px;
+ width: 50px;
+ padding: 0;
+}
+
+th {
+ background: green;
+}
+
+.scroller {
+ will-change: transform;
+
+ overflow: hidden; /* hide scrollbars */
+ width: 100px;
+ height: 200px;
+ outline: 2px solid black;
+}
+
+.sticky {
+ position: sticky;
+ top: 25px;
+}
+</style>
+
+<div class="scroller">
+ <table>
+ <thead class="sticky">
+ <tr class="sticky">
+ <th class="sticky"></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr><td></td></tr>
+ <tr><td></td></tr>
+ <tr><td></td></tr>
+ <tr><td></td></tr>
+ <tr><td></td></tr>
+ <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