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

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

Issue 2733633002: Handle nested position:sticky elements correctly (compositor) (Closed)
Patch Set: Addressed the easier reviewer comments. Created 3 years, 9 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-top.html
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/composited-nested-sticky-top.html b/third_party/WebKit/LayoutTests/compositing/overflow/composited-nested-sticky-top.html
new file mode 100644
index 0000000000000000000000000000000000000000..92180d809d18a9a32ba729ed1d68a1fce063a245
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/composited-nested-sticky-top.html
@@ -0,0 +1,92 @@
+<style>
+body {
+ margin: 0;
+}
+
+.group {
+ display: inline-block;
+ position: relative;
+ width: 250px;
+ height: 350px;
+}
+
+.scroller {
+ will-change: transform;
+
+ overflow: hidden; /* hide scrollbars */
+ width: 200px;
+ height: 350px;
+ outline: 2px solid black;
+}
+
+.container {
+ width: 200px;
+ height: 700px;
+}
+
+.outerSticky {
+ will-change: transform;
+
+ position: sticky;
+ background-color: green;
+ width: 200px;
+ height: 200px;
+}
+
+.innerSticky {
+ will-change: transform;
+
+ position: sticky;
+ background-color: red;
+ width: 200px;
+ height: 100px;
+}
+</style>
+
+<script>
+if (window.testRunner)
+ testRunner.waitUntilDone();
+
+function finishTest() {
+ for (const scroller of document.querySelectorAll('.scroller')) {
+ scroller.scrollTop = 200;
+ }
+ if (window.testRunner)
+ testRunner.notifyDone();
+}
+
+window.addEventListener('load', function() {
+ requestAnimationFrame(function() {
+ requestAnimationFrame(finishTest);
+ });
+});
+</script>
+<div class="group">
+ <div class="scroller">
+ <div class="container">
+ <div class="outerSticky" style="top: 50px;">
+ <div class="innerSticky" style="top: 50px;"></div>
+ </div>
+ </div>
+ </div>
+</div>
+
+<div class="group">
+ <div class="scroller">
+ <div class="container">
+ <div class="outerSticky" style="top: 50px;">
+ <div class="innerSticky" style="top: 100px;"></div>
+ </div>
+ </div>
+ </div>
+</div>
+
+<div class="group">
+ <div class="scroller">
+ <div class="container">
+ <div class="outerSticky" style="top: 50px;">
+ <div class="innerSticky" style="top: 300px;"></div>
+ </div>
+ </div>
+ </div>
+</div>

Powered by Google App Engine
This is Rietveld 408576698