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

Unified Diff: LayoutTests/fast/events/touch/compositor-touch-hit-rects-global.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-global.html
diff --git a/LayoutTests/fast/events/touch/compositor-touch-hit-rects-global.html b/LayoutTests/fast/events/touch/compositor-touch-hit-rects-global.html
new file mode 100644
index 0000000000000000000000000000000000000000..dfeb0af8d39cc5496d4fdffc533b241263a4cb81
--- /dev/null
+++ b/LayoutTests/fast/events/touch/compositor-touch-hit-rects-global.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="stylesheet" href="resources/compositor-touch-hit-rects.css">
+<style>
+body {
+ /* make it easy to validate rects are covering the entire document */
+ height: 1968px;
+ margin: 16px 5px;
+}
+</style>
+</head>
+<body>
+<p id="description">
+This tests verifies the hit test regions given to the compositor in the simple case where
+touch handles cover (or nearly cover) the entire document. It can only be run in DumpRenderTree.
+</p>
+
+<div id="tests">
+</div>
+
+<div id="console"></div>
+<script src="resources/compositor-touch-hit-rects.js"></script>
+<script>
+
+function runGlobalTest(name, element) {
+ // With a global handler, no other handlers should matter
+ var elements = [document.getElementById('description'), element, document.getElementById('tests')];
+ for (var i = 0; i < elements.length; i++)
+ elements[i].addEventListener('touchmove', listener, false);
+
+ logRects(name, true);
+
+ for (var i = 0; i < elements.length; i++)
+ elements[i].removeEventListener('touchmove', listener, false);
+}
+
+function additionalTests() {
+ runGlobalTest('document', document);
+ runGlobalTest('html', document.documentElement);
+ runGlobalTest('body', document.body);
+}
+</script>
+</body>

Powered by Google App Engine
This is Rietveld 408576698