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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/sticky/sticky-overflowing.html

Issue 1308273010: Adapt and reland old position sticky implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make sticky vertical ref tests expectations not dependent on font size. Created 4 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/fast/css/sticky/sticky-overflowing.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-overflowing.html b/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-overflowing.html
new file mode 100644
index 0000000000000000000000000000000000000000..62d0307c7a57e45a11392acbd64bdbda69dd58ba
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-overflowing.html
@@ -0,0 +1,80 @@
+<!DOCTYPE html>
+<script>
+if (window.internals) {
+ internals.settings.setCSSStickyPositionEnabled(true);
+}
+</script>
+
+<html>
+<head>
+<style>
+ body {
+ margin: 0;
+ height: 2000px;
+ overflow: hidden; /* hide scrollbars */
+ }
+
+ .container {
+ position: absolute;
+ width: 200px;
+ height: 400px;
+ margin: 10px;
+ left: 300px;
+ top: -200px;
+ font-family: Ahem;
+ font-size: 24px;
+ outline: 2px solid black;
+ }
+
+ .vertical.container {
+ -webkit-writing-mode: vertical-rl;
+ top: 300px;
+ left: 800px;
+ width: 400px;
+ height: 200px;
+ }
+
+ .spacer {
+ height: 350px;
+ width: 20px;
+ background-color: black;
+ }
+
+ .vertical .spacer {
+ height: 20px;
+ width: 350px;
+ }
+
+ .box {
+ width: 150px;
+ height: 150px;
+ }
+
+ .sticky {
+ position: sticky;
+ top: 200px;
+ right: 200px;
+ background-color: green;
+ opacity: 0.75;
+ }
+</style>
+<script>
+ function doTest()
+ {
+ window.scrollTo(100, 100);
+ }
+ window.addEventListener('load', doTest, false);
+</script>
+</head>
+<body>
+ <div class="container">
+ <div class="spacer"></div>
+ <div class="sticky box"></div>
+ </div>
+
+ <div class="vertical container">
+ <div class="spacer"></div>
+ <div class="sticky box"></div>
+ </div>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698