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

Unified Diff: third_party/WebKit/Source/web/tests/data/sticky-position.html

Issue 2401903002: Compute and include the offset of the sticky box to its enclosing composited layer. (Closed)
Patch Set: Merge with master and fix long line. Created 4 years, 2 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/Source/web/tests/data/sticky-position.html
diff --git a/third_party/WebKit/Source/web/tests/data/sticky-position.html b/third_party/WebKit/Source/web/tests/data/sticky-position.html
new file mode 100644
index 0000000000000000000000000000000000000000..613a7bd8008ed5f44480b468d05590d8cdcaa286
--- /dev/null
+++ b/third_party/WebKit/Source/web/tests/data/sticky-position.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ html, body {
+ margin: 0;
+ }
+ .sticky {
+ position: sticky;
+ width: 10px;
+ height: 10px;
+ }
+ .top {
+ top: 1px;
+ }
+ .bottom {
+ bottom: 1px;
+ }
+ .left {
+ left: 1px;
+ }
+ .right {
+ right: 1px;
+ }
+ .container {
+ position: absolute;
+ top: 100px;
+ left: 100px;
+ width: 200px;
+ height: 200px;
+ }
+ .composited {
+ will-change: transform;
+ }
+ .spacer {
+ height: 10px;
+ }
+ </style>
+</head>
+
+<!-- Fixed position elements may skip compositing without a scrollable
+ancestor. To make sure this test covers the intended scenario, we force the
+body element to be tall, so that the FrameView is scrolling. -->
+<body style="height: 4000px">
+ <div class="container">
+ <div id="div-tl" class="sticky top left">X</div>
+ <div id="div-tr" class="sticky top right">X</div>
+ <div id="div-bl" class="sticky bottom left">X</div>
+ <div id="div-br" class="sticky bottom right">X</div>
+ <span id="span-tl" class="sticky top left">X</span>
+ <span id="span-tlbr" class="sticky top left bottom right">X</span>
+ </div>
+ <div class="composited container">
+ <div class="spacer"></div>
+ <div id="composited-top" class="sticky top">X</div>
+ </div>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698