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

Unified Diff: LayoutTests/fast/repaint/fixed-descendant-of-transformed-scrolled.html

Issue 839103002: Consider transformed container's scroll offset when calculating fixed descendant's offset (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 11 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: LayoutTests/fast/repaint/fixed-descendant-of-transformed-scrolled.html
diff --git a/LayoutTests/fast/repaint/fixed-descendant-of-transformed-scrolled.html b/LayoutTests/fast/repaint/fixed-descendant-of-transformed-scrolled.html
new file mode 100644
index 0000000000000000000000000000000000000000..e53e136de370e8e2b08894059492c71035a5a4c3
--- /dev/null
+++ b/LayoutTests/fast/repaint/fixed-descendant-of-transformed-scrolled.html
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<script src="resources/text-based-repaint.js"></script>
+<script>
+function repaintTest() {
+ document.getElementById('fixed').style.backgroundColor = 'green';
+}
+onload = function() {
+ document.getElementById('transformed').scrollTop = 50;
+ runRepaintTest();
+}
+</script>
+<style>
+#transformed {
+ position: absolute;
+ top: 50px;
+ left: 100px;
+ transform: translateX(0);
+ overflow: scroll;
+ width: 300px;
+ height: 300px;
+}
+#fixed {
+ position: fixed;
+ top: 150px;
+ left: 100px;
+ width: 100px;
+ height: 100px;
+ background-color: red;
+}
+#relative {
+ position: relative;
+ top: 50px;
+ left: 50px;
+}
+/* to make the transformed container scrollable */
+#content {
+ width: 1000px;
+ height: 1000px;
+}
+</style>
+Tests invalidation of a fixed-position descendant of a transformed scrolled element.
+Passes if there is a green box at the center of the scrollable area.
+<div id="transformed">
+ <div id="relative">
+ <div id="fixed"></div>
+ <div id="content"></div>
+ </div>
+</div>

Powered by Google App Engine
This is Rietveld 408576698