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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-style-change.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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-style-change-ref.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-style-change.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-style-change.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-style-change.html
new file mode 100644
index 0000000000000000000000000000000000000000..224c7bd9cf73b0681b02b5db246228134ae45ac4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-style-change.html
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<title>Sticky positioned element should behave correctly when style changes</title>
+<link rel="match" href="position-sticky-style-change-ref.html" />
+<link rel="help" href="https://www.w3.org/TR/css-position-3/#sticky-pos" />
+<meta name="assert" content="This test checks that sticky positioned element behaves correctly when style changes." />
+
+<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;
+ top: 50px;
+}
+
+.sticky {
+ position: sticky;
+}
+
+.relative {
+ position: relative;
+}
+</style>
+
+<script>
+window.addEventListener('load', function() {
+ document.getElementById('scroller1').scrollTop = 100;
+ document.getElementById('scroller2').scrollTop = 100;
+
+ var sticky1 = document.getElementById('sticky1');
+ sticky1.style.position = 'relative';
flackr 2017/05/31 14:13:47 I thought the thing we wanted to test was that que
yigu 2017/05/31 20:06:24 Done.
+
+ var sticky2 = document.getElementById('sticky2');
+ sticky2.style.position = 'sticky';
+});
+</script>
+
+<div id="scroller1" class="container">
+ <div id="sticky1" class="sticky box"></div>
+ <div class="spacer"></div>
+</div>
+<div id="scroller2" class="container">
+ <div id="sticky2" class="relative box"></div>
+ <div class="spacer"></div>
+</div>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-style-change-ref.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698