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

Unified Diff: third_party/WebKit/LayoutTests/compositing/overflow/absolute-element-in-isolated-composited-ancestor.html

Issue 2869813002: Fix the bug that absolute positioned element moves unexpectedly (Closed)
Patch Set: Add test expectation Created 3 years, 7 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/absolute-element-in-isolated-composited-ancestor.html
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/absolute-element-in-isolated-composited-ancestor.html b/third_party/WebKit/LayoutTests/compositing/overflow/absolute-element-in-isolated-composited-ancestor.html
new file mode 100644
index 0000000000000000000000000000000000000000..b698fb26373c6964bb1f7148dd088671ad20ad15
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/absolute-element-in-isolated-composited-ancestor.html
@@ -0,0 +1,66 @@
+<!DOCTYPE html>
+<style>
+body {
+ margin: 0px;
+}
+
+.scroller {
+ overflow: scroll;
+ width: 200px;
+ height: 600px;
+}
+
+.composited {
+ backface-visibility: hidden;
+ isolation: isolate;
+}
+
+.box {
+ background: rgba(0, 255, 0, 0.9);
+ position: absolute;
+ width: 185px;
+ height: 50px;
+ top: 0px;
+}
+
+.indicator {
+ position: absolute;
+ width: 185px;
+ height: 50px;
+ background: red; /* covered up by .box when working */
+}
+
+.container {
+ width: 100%;
+ height: 1000px;
+ background: grey;
+}
+</style>
+
+<div id="scroller" class="scroller">
+ <div class="composited container">
+ <div class="indicator"></div>
+ <div class="box"></div>
+ </div>
+</div>
+
+<script>
+ if (window.testRunner)
+ testRunner.waitUntilDone()
+
+ function doTest() {
+ let scroller = document.getElementById('scroller');
+ window.requestAnimationFrame(function() {
+ scroller.scrollTop = 200;
+ if (window.testRunner)
+ testRunner.notifyDone();
+ });
+ }
+
+ window.addEventListener('load', function() {
+ window.requestAnimationFrame(function() {
+ window.requestAnimationFrame(doTest);
+ })
+ });
+</script>
+

Powered by Google App Engine
This is Rietveld 408576698