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

Unified Diff: LayoutTests/fast/events/touch/compositor-touch-hit-rects-scroll.html

Issue 17471008: Rework compositor touch hit testing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: CR feedback - accumulate LayoutRects instead of IntRects, disable when page isn't composited. Also… Created 7 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: LayoutTests/fast/events/touch/compositor-touch-hit-rects-scroll.html
diff --git a/LayoutTests/fast/events/touch/compositor-touch-hit-rects-scroll.html b/LayoutTests/fast/events/touch/compositor-touch-hit-rects-scroll.html
new file mode 100644
index 0000000000000000000000000000000000000000..0b9215acb847258acd405d1cb89bd49f83bc2bb5
--- /dev/null
+++ b/LayoutTests/fast/events/touch/compositor-touch-hit-rects-scroll.html
@@ -0,0 +1,97 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="stylesheet" href="resources/compositor-touch-hit-rects.css">
+<style>
+.scroll {
+ overflow-y: scroll;
+ overflow-x: hidden;
+ border: 1px solid lightgrey;
+ height: 50px;
+}
+#transformed {
+ -webkit-transform: translate3d(10px, 10px, 0);
+}
+</style>
+</head>
+<body>
+<p id="description">
+This test verifies the hit test regions given to the compositor specifically around composited
+overflow scroll elements.
+</p>
+
+<div id="tests">
+ <div id="scroll1" class="scroll">
+ <div style='height: 13px;'></div>
+ <div class="testcase" id="scrollContent">Scroll content</div>
+ <div style='height: 50px;'></div>
+ </div>
+ <div id="scroll2" class="scroll">
+ <div style='height: 10px;'></div>
+ <div id="scroll2b" class="scroll">
+ <div style='height: 30px;'></div>
+ <div class="testcase" id="nestedContent">Nested content</div>
+ <div style='height: 30px;'></div>
+ </div>
+ <div style='height: 50px;'></div>
+ </div>
+ <div id="scroll4" class="scroll">
+ <div style='height: 10px;'></div>
+ <div id="overflowWithHandler" class="scroll testcase">
+ <div style='height: 30px;'></div>
+ <div>Overflow div with a touch handler</div>
+ <div style='height: 60px;'></div>
+ </div>
+ <div style='height: 50px;'></div>
+ </div>
+ <!-- Note this case needs to be last because the transform can disable
+ accelerated overflow scrolling of any following elements -->
+ <div id="scroll3" class="scroll">
+ <div style='height: 13px;'></div>
+ <div class="testcase" id="withTransform">
+ <div id="transformed">Transformed</div>
+ </div>
+ <div style='height: 50px;'></div>
+ </div>
+
+
+</div>
+
+<div id="console"></div>
+<script src="resources/compositor-touch-hit-rects.js"></script>
+<script>
+
+// Scroll after layout has finished and verify that doesn't
+// cause the hit rects to be recomputed.
+preRunHandlerForTest['scrollContent'] = function(e) {
+ checkForRectUpdate(false, function() {
+ // Scroll so the rect is visible but slighly clipped.
+ document.getElementById('scroll1').scrollTop = 15;
+ });
+};
+
+preRunHandlerForTest['nestedContent'] = function(e) {
+ checkForRectUpdate(false, function() {
+ document.getElementById('scroll2').scrollTop = 20;
+ document.getElementById('scroll2b').scrollTop = 18;
+ });
+};
+
+preRunHandlerForTest['withTransform'] = function(e) {
+ checkForRectUpdate(false, function() {
+ document.getElementById('scroll3').scrollTop = 20;
+ });
+};
+
+preRunHandlerForTest['overflowWithHandler'] = function(e) {
+ checkForRectUpdate(false, function() {
+ document.getElementById('scroll4').scrollTop = 20;
+ document.getElementById('overflowWithHandler').scrollTop = 18;
+ });
+};
+
+if (window.internals) {
+ window.internals.settings.setAcceleratedCompositingForOverflowScrollEnabled(true);
+}
+</script>
+</body>

Powered by Google App Engine
This is Rietveld 408576698