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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-style-change-ref.html

Issue 2907243002: Sticky position should be observable by getBoundingClientRect (Closed)
Patch Set: nit 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/external/wpt/css/css-position-3/position-sticky-style-change-ref.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-style-change-ref.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-style-change-ref.html
new file mode 100644
index 0000000000000000000000000000000000000000..f43229212261396f8489e6ceb13dbe6a60799879
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-style-change-ref.html
@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+<title>Sticky positioned element should behave correctly when style changes
+</title>
+
+<style>
+html {
+ overflow: hidden; /* hide scrollbars */
+}
+
+body {
+ margin: 0;
+}
+
+.container {
+ width: 200px;
+ height: 200px;
+}
+
+.spacer {
+ height: 2000px;
+}
+
+.box {
+ width: 100px;
+ height: 100px;
+ background-color: green;
+}
+
+.relative {
+ top: 50px;
+ position: relative;
+}
+
+.absolute {
+ top: 200px;
+ position: absolute;
+}
+
+</style>
+
+<script>
+window.addEventListener('load', function() {
+ document.getElementById('scroller1').scrollTop = 100;
+ document.getElementById('scroller2').scrollTop = 100;
+});
+</script>
+
+<div id="scroller1" class="container">
+ <div class="relative box"></div>
+ <div class="spacer"></div>
+</div>
+<div id="scroller2" class="container">
+ <div class="absolute box"></div>
+ <div class="spacer"></div>
+</div>
+

Powered by Google App Engine
This is Rietveld 408576698