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

Unified Diff: content/test/data/accessibility/css/fixed-transformed-with-scrolling.html

Issue 2956053005: Keep track of fixed positioning in accessibility tree.
Patch Set: GetSimpleRelativeBounds, add failing test for fixed with transform Created 3 years, 5 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: content/test/data/accessibility/css/fixed-transformed-with-scrolling.html
diff --git a/content/test/data/accessibility/css/fixed-transformed-with-scrolling.html b/content/test/data/accessibility/css/fixed-transformed-with-scrolling.html
new file mode 100644
index 0000000000000000000000000000000000000000..36f9f5809264433fd92ebcab814fec04ec3d00ba
--- /dev/null
+++ b/content/test/data/accessibility/css/fixed-transformed-with-scrolling.html
@@ -0,0 +1,47 @@
+<!--
+@BLINK-ALLOW:pageLocation*
+@BLINK-ALLOW:scrollY=*
+@WAIT-FOR:After
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ body {
+ margin: 0;
+ padding: 0;
+ transform: translate(100px);
+ }
+ .big {
+ height: 1000px;
+ }
+ .fixed {
+ position: fixed;
+ left: 100px;
+ top: 100px;
+ }
+ </style>
+</head>
+<body>
+ <div class="big">Before</div>
+ <div class="fixed">Fixed</div>
+ <div id="after"></div>
+ <script>
+ // Wait for a short timeout to ensure the initial accessibility tree
+ // contains the unscrolled layout. Then scroll the page, and change
+ // the accessible text of an element to contain the text "After" to
+ // signal that the test is done running.
+ //
+ // NOTE: We use aria-label to trigger the test being done rather than
+ // adding text to the page, because adding text to the page triggers
+ // layout, and triggering layout would actually force an update of a
+ // fixed-position element! The purpose of this test is to ensure that
+ // fixed-position elements work correctly when scrolling, so we need to
+ // make sure we only scroll and not layout again.
+ window.setTimeout(function() {
+ window.scrollTo(0, 50);
+ document.getElementById("after").setAttribute("aria-label", "After");
+ }, 100);
+ </script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698